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
20715ed5
Commit
20715ed5
authored
Jan 07, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实收统计2
parent
ba53ea5f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
Finance.php
application/index/controller/Finance.php
+6
-3
OPartialCommission.php
application/model/OPartialCommission.php
+14
-5
No files found.
application/index/controller/Finance.php
View file @
20715ed5
...
...
@@ -1510,7 +1510,7 @@ class Finance extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$operation_start_data
=
$operation_end_data
=
$income_date
=
$operation_date
=
''
;
$where
[
'a.confirm_status'
]
=
1
;
$is_bargain
=
0
;
/**收佣日期 start**/
if
(
!
empty
(
$this
->
params
[
'income_start_date'
])
&&
empty
(
$this
->
params
[
'income_end_date'
]))
{
$where
[
0
]
=
[
'EXP'
,
"b.income_time > '
{
$this
->
params
[
'income_start_date'
]
}
' OR c.operation_date > '
{
$this
->
params
[
'income_start_date'
]
}
'"
];
...
...
@@ -1540,6 +1540,7 @@ class Finance extends Basic
$operation_date
=
date
(
'Y.m.d'
,
strtotime
(
$this
->
params
[
'bargain_start_date'
]));
$operation_start_data
=
$this
->
params
[
'bargain_start_date'
];
$is_bargain
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'bargain_end_date'
])
&&
empty
(
$this
->
params
[
'bargain_start_date'
]))
{
...
...
@@ -1547,6 +1548,7 @@ class Finance extends Basic
$operation_date
=
date
(
'Y.m.d'
,
strtotime
(
$this
->
params
[
'bargain_end_date'
]));
$operation_end_data
=
$this
->
params
[
'bargain_end_date'
];
$is_bargain
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'bargain_start_date'
])
&&
!
empty
(
$this
->
params
[
'bargain_end_date'
]))
{
...
...
@@ -1557,6 +1559,7 @@ class Finance extends Basic
$operation_start_data
=
$this
->
params
[
'bargain_start_date'
];
$operation_end_data
=
$this
->
params
[
'bargain_end_date'
];
$is_bargain
=
1
;
}
/**部门id**/
...
...
@@ -1591,7 +1594,7 @@ class Finance extends Basic
$where
[
'a.confirm_date'
]
=
[
'<='
,
$this
->
params
[
'confirm_date'
]
.
' 23:59:59'
];
}
$list
=
$m_partial
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
);
$list
=
$m_partial
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
,
$is_bargain
);
foreach
(
$list
as
$k
=>
$v
)
{
$list
[
$k
][
'income_date'
]
=
$income_date
;
$list
[
$k
][
'operation_date'
]
=
$operation_date
;
...
...
@@ -1620,7 +1623,7 @@ class Finance extends Basic
$where
[
'a.confirm_date'
]
=
[
'<='
,
$this
->
params
[
'confirm_date'
]
.
' 23:59:59'
];
$where
[
'a.confirm_status'
]
=
1
;
}
$result_data
=
$m_partial
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
);
$result_data
=
$m_partial
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
,
$is_bargain
);
foreach
(
$result_data
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'income_date'
]
=
$income_date
;
//收佣日期
...
...
application/model/OPartialCommission.php
View file @
20715ed5
...
...
@@ -211,11 +211,15 @@ class OPartialCommission extends BaseModel
* @param int $pageSize
* @param string $field
* @param string $params
* @return mixed
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
* @param $operation_start_data
* @param $operation_end_data
* @param $is_bargain
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getCommissionTotalList
(
$pageNo
=
1
,
$pageSize
=
15
,
$field
=
''
,
$params
=
''
,
$operation_start_data
,
$operation_end_data
)
public
function
getCommissionTotalList
(
$pageNo
=
1
,
$pageSize
=
15
,
$field
=
''
,
$params
=
''
,
$operation_start_data
,
$operation_end_data
,
$is_bargain
)
{
$agent_id
=
$this
->
alias
(
'a'
)
->
field
(
'a.agent_id,d.name,d.store_id,d.district_id,e.status'
)
...
...
@@ -240,7 +244,12 @@ class OPartialCommission extends BaseModel
if
(
in_array
(
$v
[
'status'
],
[
10
,
11
,
13
]))
{
$partial_where
[
'a.agent_id'
]
=
$v
[
'agent_id'
];
$partial_where
[
'c.income_time'
]
=
[
'between'
,
[
$operation_start_data
,
$operation_end_data
]];
if
(
$is_bargain
!=
1
)
{
$partial_where
[
'c.income_time'
]
=
[
'between'
,
[
$operation_start_data
,
$operation_end_data
]];
}
else
{
$partial_where
[
'b.create_time'
]
=
[
'between'
,
[
$operation_start_data
,
$operation_end_data
]];
}
$result
[
$k
]
=
$this
->
getSumMoney
(
$field
,
$partial_where
);
}
else
{
$result
[
$k
][
'practical_fee'
]
=
0
;
...
...
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