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
772254d4
Commit
772254d4
authored
Dec 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent_id
parent
ab22631f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
Finance.php
application/index/controller/Finance.php
+3
-30
No files found.
application/index/controller/Finance.php
View file @
772254d4
...
@@ -2172,37 +2172,10 @@ class Finance extends Basic
...
@@ -2172,37 +2172,10 @@ class Finance extends Basic
if
(
!
empty
(
$where
))
{
if
(
!
empty
(
$where
))
{
//获取被修改人信息
//获取被修改人信息
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$m_agent_total
=
new
TAgentTotalModel
();
$agent_data
=
$m_agent
->
agentBargainAll
(
'a.id,a.store_id,a.district_id,b.create_time'
,
$where
);
$agent_data
=
$m_agent
->
agentBargainAll
(
'a.id,a.store_id,a.district_id,b.create_time'
,
$where
);
foreach
(
$agent_data
as
$k
=>
$v
)
{
foreach
(
$agent_data
as
$k
=>
$v
)
{
$this
->
updatePerformanceData
(
$v
[
'id'
],
$v
[
'create_time'
],
$v
[
'store_id'
],
$v
[
'district_id'
]);
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
$this
->
totalOfficialReceipts
(
$v
[
'id'
],
$v
[
'district_id'
],
$v
[
'store_id'
],
$create_time
);
if
(
$is_select
)
{
$create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
[
'create_time'
]));
$where_bargain
[
'agent_id'
]
=
$v
[
'id'
];
$where_bargain
[
'create_time'
]
=
[
'BETWEEN'
,
[
$create_time
.
' 00:00:00'
,
$create_time
.
' 23:59:59'
]];
$bargainSum
=
$this
->
m_bargain
->
getAddBargainNumGroupTimeNew
(
$where_bargain
,
1
);
$id
=
$m_agent_total
->
getTotalEndTimeByAgentId
(
'id'
,
[
'total_time'
=>
$create_time
,
'agent_id'
=>
$where_bargain
[
'agent_id'
]]);
if
(
!
empty
(
$id
))
{
$update_data
[
$k
][
"performance"
]
=
!
empty
(
$bargainSum
[
0
][
"num"
])
?
$bargainSum
[
0
][
"num"
]
:
0
;
$update_data
[
$k
][
'id'
]
=
$id
[
0
][
'id'
];
}
if
(
empty
(
$update_data
))
{
$insert_data
[]
=
[
'store_id'
=>
$v
[
'store_id'
],
'district_id'
=>
$v
[
'district_id'
],
'agent_id'
=>
$v
[
'agent_id'
],
'total_time'
=>
date
(
'Y-m-d'
),
'create_time'
=>
date
(
'Y-m-d H:i:s'
)
];
$m_agent_total
->
addTotal
(
$insert_data
);
}
else
{
$m_agent_total
->
saveTotal
(
$update_data
);
}
}
}
}
}
}
return
true
;
return
true
;
...
@@ -3012,7 +2985,7 @@ class Finance extends Basic
...
@@ -3012,7 +2985,7 @@ class Finance extends Basic
//提交人姓名
//提交人姓名
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'd.
agent_
id'
]
=
$this
->
params
[
'agent_id'
];
$where
[
'd.id'
]
=
$this
->
params
[
'agent_id'
];
$is_show
=
1
;
$is_show
=
1
;
}
}
...
...
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