Commit 72b9252e authored by zhuwei's avatar zhuwei

1

parent 8520e0a9
...@@ -266,38 +266,41 @@ class CostParameter extends Basic ...@@ -266,38 +266,41 @@ class CostParameter extends Basic
*/ */
public function getCompanyCostParameterList() public function getCompanyCostParameterList()
{ {
// $params = $this->params; $params = $this->params;
//
// // $params = array( $params = array(
// // "store_id" => '1', "store_id" => '1',
// // "setting_date" => '2019-07-01', "setting_date" => '2019-07-01',
// // ); );
//
// $checkResult = $this->validate($params, "CostParameterValidate.getCompanyCostParameterList"); $checkResult = $this->validate($params, "CostParameterValidate.getCompanyCostParameterList");
// if (true !== $checkResult) { if (true !== $checkResult) {
// return $this->response("101", $checkResult); return $this->response("101", $checkResult);
// } }
// //费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪 //费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪
// $type_list = [0,1,2,3,4,5,6];
// foreach ($type_list as $k => $v) { $f_params['setting_date'] = $params['setting_date'];
// // `fixed_fee` decimal(9,2) DEFAULT '0.00' COMMENT '本月固定成本 如果type为同联发展基金和总经理基薪逻辑独立判断', $f_field = 'type,fixed_fee,apply_for_fee,discounts';
// // `apply_for_fee` decimal(7,2) DEFAULT '0.00' COMMENT '本月报销费用', $company_data = $this->m_company_data->selectCompanyData($f_field, $f_params);
// // `discounts` tinyint(2) DEFAULT '0' COMMENT '百分比 5% 存 5 ', $list = [];
// if(!$company_data){
// $list_['type'] = ; $type_list = [0,1,2,3,4,5,6];
// $list_['fixed_fee'] = ; foreach ($type_list as $k => $v) {
// $list_['apply_for_fee'] = ; // `fixed_fee` decimal(9,2) DEFAULT '0.00' COMMENT '本月固定成本 如果type为同联发展基金和总经理基薪逻辑独立判断',
// $list_['discounts'] = ; // `apply_for_fee` decimal(7,2) DEFAULT '0.00' COMMENT '本月报销费用',
// $list_['type'] = ; // `discounts` tinyint(2) DEFAULT '0' COMMENT '百分比 5% 存 5 ',
//
// $list = $list_; $list_['type'] = $v;//
// } $list_['fixed_fee'] = 0;//本月固定成本
// $list_['apply_for_fee'] = 0;//本月报销费用
// $list_['discounts'] = 0;//百分比
// $result["list"] = $list; $list = $list_;
// return $this->response("200", "success", $result); }
}
$result["list"] = $list;
return $this->response("200", "success", $result);
} }
// $this->m_company_data->saveCompanyData($data);
public function editCompanyCostParameter() public function editCompanyCostParameter()
...@@ -309,27 +312,6 @@ class CostParameter extends Basic ...@@ -309,27 +312,6 @@ class CostParameter extends Basic
// "setting_date" => '2019-07-23', // "setting_date" => '2019-07-23',
// ); // );
//`fixed_fee` decimal(9,2) DEFAULT '0.00' COMMENT '本月固定成本 如果type为同联发展基金和总经理基薪逻辑独立判断',
//`apply_for_fee` decimal(7,2) DEFAULT '0.00' COMMENT '本月报销费用',
//`discounts` tinyint(2) DEFAULT '0' COMMENT '百分比 5% 存 5 ',
// $checkResult = $this->validate($params, "CostParameterValidate.editCostParameter");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
//
// $f_params['store_id'] = $params['store_id'];
// $f_params['setting_date'] = $params['setting_date'];
// $store_data_res = $this->m_store_data->findByOne('id',$params);
//
// if ($store_data_res) {//修改
// $this->updateStoreData($store_data_res['id'],$params);
// } else {//新增
// $this->saveStoreData($params);
// }
return $this->response("200", "成功"); return $this->response("200", "成功");
} }
......
...@@ -40,4 +40,19 @@ class FCompanyData extends BaseModel ...@@ -40,4 +40,19 @@ class FCompanyData extends BaseModel
->find(); ->find();
return $result; return $result;
} }
/**
* 查询多条数据
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public function selectCompanyData($field,$params) {
$params["is_del"] = 0;
$result = $this->db_
->field($field)
->where($params)
->select();
return $result;
}
} }
...@@ -551,6 +551,8 @@ Route::group('index', [ ...@@ -551,6 +551,8 @@ Route::group('index', [
'getStoreCostParameterList' => ['index/CostParameter/getStoreCostParameterList', ['method' => 'POST|GET']], 'getStoreCostParameterList' => ['index/CostParameter/getStoreCostParameterList', ['method' => 'POST|GET']],
'editCostParameter' => ['index/CostParameter/editCostParameter', ['method' => 'POST|GET']], 'editCostParameter' => ['index/CostParameter/editCostParameter', ['method' => 'POST|GET']],
'getCompanyCostParameterList' => ['index/CostParameter/getCompanyCostParameterList', ['method' => 'POST|GET']],
]); ]);
......
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