Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
72b9252e
Commit
72b9252e
authored
Jul 23, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8520e0a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
52 deletions
+51
-52
CostParameter.php
application/index/controller/CostParameter.php
+34
-52
FCompanyData.php
application/model/FCompanyData.php
+15
-0
route.php
application/route.php
+2
-0
No files found.
application/index/controller/CostParameter.php
View file @
72b9252e
...
@@ -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"
,
"成功"
);
}
}
...
...
application/model/FCompanyData.php
View file @
72b9252e
...
@@ -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
;
}
}
}
application/route.php
View file @
72b9252e
...
@@ -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'
]],
]);
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment