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
a6f86a07
Commit
a6f86a07
authored
Jul 23, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b2fd82ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
14 deletions
+38
-14
CostParameter.php
application/index/controller/CostParameter.php
+24
-14
AStore.php
application/model/AStore.php
+14
-0
No files found.
application/index/controller/CostParameter.php
View file @
a6f86a07
...
@@ -66,16 +66,26 @@ class CostParameter extends Basic
...
@@ -66,16 +66,26 @@ class CostParameter extends Basic
return
$this
->
response
(
"200"
,
"success"
,
[]);
return
$this
->
response
(
"200"
,
"success"
,
[]);
foreach
(
$list
as
$k
=>
$v
)
{
foreach
(
$list
as
$k
=>
$v
)
{
$transfer_charge
=
$this
->
getTransferCharge
(
730
);
$f_params
[
'c.store_id'
]
=
$v
[
'id'
];
$list
[
$k
][
'transfer_charge'
]
=
$transfer_charge
;
//手续费
$f_params
[
'c.setting_date'
]
=
$params
[
'setting_date'
];
$store_data_res
=
$this
->
m_store
->
getStoreCostParameter
(
$field
,
$f_params
);
$social_security_fee
=
$this
->
getLastSocialSecurityFee
(
730
);
if
(
!
$store_data_res
){
$list
[
$k
][
'social_security_fee'
]
=
$social_security_fee
;
//当月社保报销
$transfer_charge
=
$this
->
getTransferCharge
(
730
);
$list
[
$k
][
'transfer_charge'
]
=
$transfer_charge
;
//手续费
$list
[
$k
][
'attendance_num'
]
=
0
;
//当月考勤
$social_security_fee
=
$this
->
getLastSocialSecurityFee
(
730
);
$list
[
$k
][
'official_receipts'
]
=
0
;
//当月合计总实收
$list
[
$k
][
'social_security_fee'
]
=
$social_security_fee
;
//当月社保报销
$list
[
$k
][
'last_official_receipts'
]
=
0
;
//当月守护者实收
$list
[
$k
][
'attendance_num'
]
=
0
;
//当月考勤
$list
[
$k
][
'deduct'
]
=
0
;
//盈利不足2万扣除
$list
[
$k
][
'official_receipts'
]
=
0
;
//当月合计总实收
$list
[
$k
][
'last_official_receipts'
]
=
0
;
//当月守护者实收
$list
[
$k
][
'deduct'
]
=
0
;
//盈利不足2万扣除
}
else
{
$list
[
$k
][
'transfer_charge'
]
=
$store_data_res
[
'transfer_charge'
];
//手续费
$list
[
$k
][
'social_security_fee'
]
=
$store_data_res
[
'social_security_fee'
];
//当月社保报销
$list
[
$k
][
'attendance_num'
]
=
$store_data_res
[
'attendance_num'
];
//当月考勤
$list
[
$k
][
'official_receipts'
]
=
$store_data_res
[
'official_receipts'
];
//当月合计总实收
$list
[
$k
][
'last_official_receipts'
]
=
$store_data_res
[
'last_official_receipts'
];
//当月守护者实收
$list
[
$k
][
'deduct'
]
=
$store_data_res
[
'deduct'
];
//盈利不足2万扣除
}
}
}
$count
=
$this
->
m_store
->
getStoreCostParameterListTotal
(
$field
,
$conditions
);
$count
=
$this
->
m_store
->
getStoreCostParameterListTotal
(
$field
,
$conditions
);
...
@@ -268,9 +278,9 @@ class CostParameter extends Basic
...
@@ -268,9 +278,9 @@ class CostParameter extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
//
$params = array(
"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
)
{
...
@@ -282,7 +292,7 @@ class CostParameter extends Basic
...
@@ -282,7 +292,7 @@ class CostParameter extends Basic
$f_params
[
'type'
]
=
$v
;
$f_params
[
'type'
]
=
$v
;
$f_params
[
'setting_date'
]
=
$params
[
'setting_date'
];
$f_params
[
'setting_date'
]
=
$params
[
'setting_date'
];
$f_field
=
'type,fixed_fee,apply_for_fee,discounts'
;
$f_field
=
'type,fixed_fee,apply_for_fee,discounts'
;
$list_
=
$this
->
m_company_data
->
selectCompanyData
(
$f_field
,
$f_params
);
$list_
=
$this
->
m_company_data
->
findByOne
(
$f_field
,
$f_params
);
if
(
!
$company_data
)
if
(
!
$company_data
)
$list_
[
'type'
]
=
$v
;
//费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪
$list_
[
'type'
]
=
$v
;
//费用类型 0上海总部成本 1杭州总部成本 2深圳总部成本 3广州总部成本 4北京总部成本 5同联发展基金 6总经理基薪
$list_
[
'fixed_fee'
]
=
0
;
//本月固定成本
$list_
[
'fixed_fee'
]
=
0
;
//本月固定成本
...
...
application/model/AStore.php
View file @
a6f86a07
...
@@ -405,6 +405,20 @@ class AStore extends BaseModel
...
@@ -405,6 +405,20 @@ class AStore extends BaseModel
return
$result
;
return
$result
;
}
}
public
function
getStoreCostParameter
(
$field
,
$params
)
{
$params
[
"a.status"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'f_office b'
,
'a.office_id = b.id'
,
'left'
)
->
join
(
'f_store_data c'
,
'a.id = c.store_id'
,
'left'
)
->
join
(
'a_agents d'
,
'a.id = d.store_id and (level = 20 or level = 40) '
,
'left'
)
->
where
(
$params
)
->
find
();
return
$result
;
}
/**
/**
* @param $field
* @param $field
* @param $params
* @param $params
...
...
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