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
ba20c0db
Commit
ba20c0db
authored
Aug 20, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a291b239
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
RankingListService.php
application/index/service/RankingListService.php
+9
-0
AStore.php
application/model/AStore.php
+1
-1
No files found.
application/index/service/RankingListService.php
View file @
ba20c0db
...
...
@@ -129,6 +129,7 @@ class RankingListService
{
$date
=
$this
->
getTotalDate
(
$pk_type
,
1
,
$siteId
);
if
(
count
(
$date
)
<=
0
)
{
return
null
;
}
...
...
@@ -145,6 +146,8 @@ class RankingListService
return
null
;
}
//分组
$result
=
$this
->
group
(
$resultArr
,
$siteId
,
$pk_type
);
//循环分组后的数组,查询出各组本月业绩排行
...
...
@@ -159,15 +162,19 @@ class RankingListService
$param_now
[
"a.status"
]
=
0
;
$param_now
[
'b.total_time'
]
=
array
(
'between'
,
array
(
$sort_begin_time
,
$sort_end_time
));
foreach
(
$result
as
$index
=>
$item
)
{
$ids
=
""
;
foreach
(
$item
as
$key
=>
$value
)
{
$ids
.=
$value
[
"id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
$param_now
[
"a.id"
]
=
array
(
"in"
,
$ids
);
$sort_arr
=
$this
->
getStoreSort
(
$param_now
,
$sort_begin_time
,
$sort_end_time
,
$ids
);
$result
[
$index
]
=
$sort_arr
;
}
return
$result
;
}
...
...
@@ -287,8 +294,10 @@ class RankingListService
$fields
=
"a.id,a.store_name,SUM(b.performance) as performance"
;
//查询出有业绩的经纪人
$have_performance_arr
=
$storeModel
->
getStoreListByPK
(
$fields
,
$params
);
//查询出无业绩的经纪人
$arr
=
$storeModel
->
getStoreListByPk1
(
$params
[
"a.site_id"
],
$begin_time
,
$end_time
,
$ids
,
$notIds
);
return
array_merge
(
$have_performance_arr
,
$arr
);
}
...
...
application/model/AStore.php
View file @
ba20c0db
...
...
@@ -334,7 +334,7 @@ class AStore extends BaseModel
->
group
(
"b.store_id"
)
->
order
(
"performance desc"
)
->
select
();
//echo $this->getLastSql()
;
echo
$this
->
getLastSql
();
exit
;
return
$data
;
}
public
function
getStoreListByPk1
(
$siteId
,
$startTime
,
$endTime
,
$ids
,
$notIds
){
...
...
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