Commit aeda6327 authored by clone's avatar clone

1

parent 70f4307d
...@@ -56,7 +56,12 @@ class StoreFee extends Basic ...@@ -56,7 +56,12 @@ class StoreFee extends Basic
//todo 1.判断是否都审核过, //todo 1.判断是否都审核过,
//todo 2.计算门店成本 3.总部成本,4.分部成本,5.同联发展基金 6门店单独成本 //todo 2.计算门店成本 3.总部成本,4.分部成本,5.同联发展基金 6门店单独成本
$this->service_->calculateStoreFee($setting_date, $agent_id,$agent_name); $msg = $this->service_->calculateStoreFee($setting_date, $agent_id,$agent_name);
if($msg != 1){
return $this->response("101", $msg);
}else{
return $this->response("200", "success");
}
} }
/** /**
......
...@@ -90,7 +90,7 @@ class FApplyForFee extends BaseModel ...@@ -90,7 +90,7 @@ class FApplyForFee extends BaseModel
return $this->db_ return $this->db_
->field($field) ->field($field)
->alias("a") ->alias("a")
->join("f_apply_for_fee b","a.store_id = b.id","left") ->join("a_store b","a.store_id = b.id","left")
->where($params) ->where($params)
->select(); ->select();
} }
......
...@@ -35,6 +35,9 @@ class FOffice extends BaseModel ...@@ -35,6 +35,9 @@ class FOffice extends BaseModel
* @param $field * @param $field
* @param $params * @param $params
* @return array|false|\PDOStatement|string|Model * @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function findByOne($field,$params) { public function findByOne($field,$params) {
$params["is_del"] = 0; $params["is_del"] = 0;
...@@ -46,12 +49,15 @@ class FOffice extends BaseModel ...@@ -46,12 +49,15 @@ class FOffice extends BaseModel
return $result; return $result;
} }
/**查询数据
/**
* 查询数据
* @param $field * @param $field
* @param $params * @param $params
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection * @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function getOffice($field,$params,$pageNo, $pageSize) public function getOffice($field,$params,$pageNo, $pageSize)
{ {
...@@ -65,6 +71,11 @@ class FOffice extends BaseModel ...@@ -65,6 +71,11 @@ class FOffice extends BaseModel
return $result; return $result;
} }
/**
* @param $field
* @param $params
* @return int|string
*/
public function getOfficeTotal($field,$params) public function getOfficeTotal($field,$params)
{ {
$params['is_del'] = 0; $params['is_del'] = 0;
...@@ -75,10 +86,11 @@ class FOffice extends BaseModel ...@@ -75,10 +86,11 @@ class FOffice extends BaseModel
return $result; return $result;
} }
/** /**更新数据
* 更新数据
* @param $params * @param $params
* @return int|string * @return int|string
* @throws \think\Exception
* @throws \think\exception\PDOException
*/ */
public function updateOffice($params) public function updateOffice($params)
{ {
......
...@@ -16,6 +16,18 @@ class FStoreCostExt extends BaseModel ...@@ -16,6 +16,18 @@ class FStoreCostExt extends BaseModel
$this->db_ = Db::name($this->table); $this->db_ = Db::name($this->table);
} }
public function addCostExt($params)
{
Db::startTrans();
try {
$this->db_->insertAll($params);
Db::commit();
return 1;
} catch (\Exception $e) {
Db::rollback();
return 0;
}
}
/** /**
* 查询数据 * 查询数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment