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
20ded7c0
Commit
20ded7c0
authored
Nov 23, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a51ebbae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
Statement.php
application/api_broker/controller/Statement.php
+3
-3
StatementService.php
application/api_broker/service/StatementService.php
+4
-6
No files found.
application/api_broker/controller/Statement.php
View file @
20ded7c0
...
...
@@ -214,12 +214,12 @@ class Statement extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*
$params = array(
$params
=
array
(
"agent_id"
=>
5739
,
//5739 总监 5740店长
"day_or_week"
=>
0
,
//0 日报 1 周报
);
*/
);
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"
time_start"
])
||
!
isset
(
$params
[
"time_end"
])
)
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"
day_or_week"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
application/api_broker/service/StatementService.php
View file @
20ded7c0
...
...
@@ -555,11 +555,10 @@ class StatementService
public
function
selectStatementForClerk
(
$agent_id
,
$agent_level
,
$store_id
,
$district_id
)
{
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
time
());
$time_
=
date
(
"Y-m-d"
,
time
());
$conditions
[
'agent_id'
]
=
$agent_id
;
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$
start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$
time_
.
" 00:00:00"
,
$time_
.
" 23:59:59"
)
);
//todo 房源
$result
[
"house_num"
]
=
$this
->
housesToAgents
->
getAddHouseNumByAgentId
(
$conditions
);
...
...
@@ -580,12 +579,11 @@ class StatementService
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$conditions
,
1
);
//1表示业绩 2表示实收
$result
[
"
director_performance
_month"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$result
[
"
performance_for
_month"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//todo 本月-成交单数
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNumV2
(
$conditions
,
3
);
//1表示业绩 2表示实收
//dump($where_);exit;
$result
[
"bargain_sum"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$result
[
"bargain_sum_for_month"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
return
$result
;
}
...
...
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