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
f6e74b16
Commit
f6e74b16
authored
Jul 19, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日报修改
parent
e7f37f0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
Statement.php
application/api_broker/controller/Statement.php
+2
-2
StatementService.php
application/api_broker/service/StatementService.php
+33
-0
No files found.
application/api_broker/controller/Statement.php
View file @
f6e74b16
...
...
@@ -35,8 +35,8 @@ class Statement extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*
$params = array(
"agent_id" =>
10015
,
/*
$params = array(
"agent_id" =>
5739
,
"time_start" => date("Y-m-d", time()),
"time_end" => date("Y-m-d", time()) . " 23:59:59",
);*/
...
...
application/api_broker/service/StatementService.php
View file @
f6e74b16
...
...
@@ -5,6 +5,7 @@ namespace app\api_broker\service;
use
app\model\AAgents
;
use
app\model\FollowUpLogModel
;
use
app\model\GHouses
;
use
app\model\OBargainModel
;
use
app\model\OReportModel
;
use
app\model\Users
;
...
...
@@ -129,10 +130,42 @@ class StatementService
$result
[
"agent_total"
]
=
$agent_total
;
$result
[
"house_num"
]
=
$this
->
houseModel
->
getAddHouseNumByAgentId
(
$conditions
);
//dump($conditions);
$result
[
"user_num"
]
=
$this
->
userModel
->
getAddUserNumByAgentId
(
$conditions
);
//$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
$result
[
"follow_up_num"
]
=
$this
->
reportModel
->
getAddFollowUpNumByAgentId
(
$conditions
);
//本月业绩
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));;
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$obargain
=
new
OBargainModel
();
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$result
[
"performance_month"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//本周业绩
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$where_
[
'create_time'
]
=
[
'between'
,
[
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
]];
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$result
[
"performance_week"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//本月完成单数
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
3
);
//1表示业绩 2表示实收
$result
[
"bargain_sum"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//客源
$addUserNum
=
$this
->
userModel
->
getAddUserNum
(
$where_
);
$result
[
"add_user_num"
]
=
isset
(
$addUserNum
[
0
][
"num"
])
?
$addUserNum
[
0
][
"num"
]
:
0
;
//todo
$result
[
"store_list"
]
=
$store_list
;
$result
[
"district_list"
]
=
$district_list
;
...
...
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