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
c302622a
Commit
c302622a
authored
Nov 14, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pk
parent
bb17f7ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
RankingList.php
application/index/controller/RankingList.php
+14
-3
No files found.
application/index/controller/RankingList.php
View file @
c302622a
...
@@ -4,6 +4,7 @@ namespace app\index\controller;
...
@@ -4,6 +4,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\service\RankingListService
;
use
app\index\service\RankingListService
;
use
app\index\untils\ExportExcelUntil
;
use
app\index\untils\ExportExcelUntil
;
use
app\model\AAgents
;
use
think\Request
;
use
think\Request
;
/**
/**
...
@@ -78,19 +79,27 @@ class RankingList extends Basic{
...
@@ -78,19 +79,27 @@ class RankingList extends Basic{
}
}
/**
/**
* 查询分区业绩pk by 个人
* 查询分区业绩pk by 个人
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getRandKingListByAgentId
(){
public
function
getRandKingListByAgentId
(){
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*$params["position"] = 1;
/*$params["agent_id"] = 1;
/*$params["agent_id"] = 1;
$this->siteId = 10001;*/
$this->siteId = 10001;*/
if
(
!
isset
(
$params
[
"
position"
])
||
$params
[
"position"
]
<
0
||
$params
[
"position"
]
>
5
){
if
(
!
isset
(
$params
[
"
agent_id"
])
){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$result
=
$this
->
service_
->
RankingList
(
$params
[
"position"
],
$this
->
siteId
);
$agentModel
=
new
AAgents
();
$agent_info
=
$agentModel
->
getAgentInfo
(
"id,position"
,
$params
[
"agent_id"
]);
if
(
$agent_info
[
"position"
]
==
5
){
return
$this
->
response
(
"101"
,
"该经纪人没有分配职称"
);
}
$result
=
$this
->
service_
->
RankingList
(
$agent_info
[
"position"
],
$this
->
siteId
);
$agent_id
=
$params
[
"agent_id"
];
$agent_id
=
$params
[
"agent_id"
];
foreach
(
$result
as
$key
=>
$value
){
foreach
(
$result
as
$key
=>
$value
){
$is_exits
=
false
;
$is_exits
=
false
;
...
@@ -106,5 +115,6 @@ class RankingList extends Basic{
...
@@ -106,5 +115,6 @@ class RankingList extends Basic{
if
(
count
(
$result
)
>
0
){
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
return
$this
->
response
(
"200"
,
"null"
);
}
}
}
}
\ No newline at end of file
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