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
38b051ec
Commit
38b051ec
authored
Jul 20, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
2ef8ce10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
StatementService.php
application/api_broker/service/StatementService.php
+12
-7
No files found.
application/api_broker/service/StatementService.php
View file @
38b051ec
...
@@ -137,8 +137,12 @@ class StatementService
...
@@ -137,8 +137,12 @@ class StatementService
//本月业绩
//本月业绩
$start_time
=
date
(
"Y-m-01"
,
time
());
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));;
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
if
(
$user_type
==
2
){
//如果是总监
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
}
else
{
$where_
[
"district_id"
]
=
$district_id
;
}
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
...
@@ -156,9 +160,12 @@ class StatementService
...
@@ -156,9 +160,12 @@ class StatementService
//本月完成单数
//本月完成单数
$start_time
=
date
(
"Y-m-01"
,
time
());
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
if
(
$user_type
==
2
){
//如果是总监
$where_
[
"agent_id"
]
=
array
(
"in"
,
$agentIds
);
}
else
{
$where_
[
"district_id"
]
=
$district_id
;
}
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
3
);
//1表示业绩 2表示实收
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
3
);
//1表示业绩 2表示实收
$result
[
"bargain_sum"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$result
[
"bargain_sum"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
...
@@ -215,7 +222,7 @@ class StatementService
...
@@ -215,7 +222,7 @@ class StatementService
//todo 本月业绩
//todo 本月业绩
$where_
=
[];
$where_
=
[];
$start_time
=
date
(
"Y-m-01"
,
time
());
$start_time
=
date
(
"Y-m-01"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
;
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$where_
[
"district_id"
]
=
$district_id
;
$where_
[
"district_id"
]
=
$district_id
;
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$obargain
=
new
OBargainModel
();
$obargain
=
new
OBargainModel
();
...
@@ -367,7 +374,6 @@ class StatementService
...
@@ -367,7 +374,6 @@ class StatementService
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$where_
[
"store_id"
]
=
$value
[
"store_id"
];
$where_
[
"store_id"
]
=
$value
[
"store_id"
];
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$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表示实收
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$results
[
$key
][
"director_last_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$results
[
$key
][
"director_last_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
//todo 本周周业绩
//todo 本周周业绩
...
@@ -376,7 +382,6 @@ class StatementService
...
@@ -376,7 +382,6 @@ class StatementService
$end_time
=
date
(
"Y-m-d"
,
time
());
$end_time
=
date
(
"Y-m-d"
,
time
());
$where_
[
"store_id"
]
=
$value
[
"store_id"
];
$where_
[
"store_id"
]
=
$value
[
"store_id"
];
$where_
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$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表示实收
$performanceSum
=
$obargain
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$results
[
$key
][
"director_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$results
[
$key
][
"director_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
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