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
23d32e61
Commit
23d32e61
authored
Aug 22, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2e9b0e37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Performance.php
application/api_broker/controller/Performance.php
+9
-4
PerformanceService.php
application/api_broker/service/PerformanceService.php
+6
-1
No files found.
application/api_broker/controller/Performance.php
View file @
23d32e61
...
...
@@ -54,15 +54,20 @@ class Performance extends Basic
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$params
[
"site_id"
]);
$all_performance_total
=
$all_official_receipts_total
=
0
;
foreach
(
$list
as
$key
=>
$value
)
{
$all_performance_total
+=
$value
[
'performance_total'
];
$all_official_receipts_total
+=
$value
[
'official_receipts_total'
];
}
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
;
$result
[
"start_time"
]
=
$start_day
;
$result
[
"end_time"
]
=
$end_day
;
$result
[
"is_boss"
]
=
0
;
$vip
=
new
VipService
();
//0:有权限 1:无权限
$result
[
"is_boss"
]
=
$vip
->
checkRule
(
$params
[
"agent_id"
],
'boss'
);
$result
[
"is_boss"
]
=
$vip
->
checkRule
(
$params
[
"agent_id"
],
'boss'
);
$result
[
"all_performance_total"
]
=
$all_performance_total
;
$result
[
"all_official_receipts_total"
]
=
$all_official_receipts_total
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
return
$this
->
response
(
"200"
,
"request null"
);
...
...
application/api_broker/service/PerformanceService.php
View file @
23d32e61
...
...
@@ -76,7 +76,12 @@ class PerformanceService
$where_
[
'd.site_id'
]
=
$site_id
;
$where_
[
'a.total_time'
]
=
array
(
'between'
,
array
(
$yesterday
,
$end_day
)
);
$field
=
"a.agent_id,a.store_id,a.district_id,sum(a.performance) as performance_total"
;
$field
=
" a.agent_id,
a.store_id,
a.district_id,
sum(a.performance) as performance_total,
sum(a.official_receipts) as official_receipts_total
"
;
$order
=
"performance_total desc"
;
$result
=
$this
->
totalModel
->
getTotalByAgentIdSite
(
$field
,
$where_
,
$type
,
$order
);
//dump($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