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
133d1455
Commit
133d1455
authored
Aug 20, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增盘方业绩统计
parent
3c90daf9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
GHousesToAgents.php
application/model/GHousesToAgents.php
+15
-0
No files found.
application/model/GHousesToAgents.php
View file @
133d1455
...
...
@@ -2,6 +2,7 @@
namespace
app\model
;
use
app\task\controller\ResultsSummaryNewTask
;
use
Think\Db
;
...
...
@@ -92,6 +93,7 @@ class GHousesToAgents extends BaseModel
continue
;
}
$name
[]
=
$agents
->
where
(
'id'
,
$v2
)
->
value
(
'name'
);
$agent_id
[]
=
$v2
;
}
$num
=
$this
->
where
(
'houses_id'
,
$houses_id
)
->
count
();
...
...
@@ -110,6 +112,19 @@ class GHousesToAgents extends BaseModel
}
$res
=
$this
->
saveAll
(
$agent_arr
);
if
(
$type
==
2
&&
count
(
$agent_id
)
>
0
)
{
$date
=
date
(
'Y-m-d'
);
foreach
(
$agent_id
as
$k
=>
$v
)
{
//获取被修改人信息
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
agentBragainDetail
(
'a.id,a.store_id,a.district_id,b.create_time'
,
[
'a.id'
=>
$v
]);
//更新业绩统计
$sum
=
new
ResultsSummaryNewTask
();
$sum
->
updateTotalByAgentId
(
$agent_data
[
'id'
],
$agent_data
[
'store_id'
],
$agent_data
[
'district_id'
],
$date
);
//被修改的人
}
}
}
return
$res
;
...
...
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