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
1b3335b6
Commit
1b3335b6
authored
Nov 14, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pk
parent
ab12e9fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
Basic.php
application/index/extend/Basic.php
+1
-0
RankingListService.php
application/index/service/RankingListService.php
+1
-3
AAgents.php
application/model/AAgents.php
+6
-4
No files found.
application/index/extend/Basic.php
View file @
1b3335b6
...
@@ -66,6 +66,7 @@ class Basic extends Controller
...
@@ -66,6 +66,7 @@ class Basic extends Controller
'index/shareShop'
,
'index/shareShop'
,
'index/yindaoAndroid'
,
'index/yindaoAndroid'
,
'index/yindaoIos'
,
'index/yindaoIos'
,
'index/exportReport'
,
);
);
/**
/**
...
...
application/index/service/RankingListService.php
View file @
1b3335b6
...
@@ -76,8 +76,6 @@ class RankingListService
...
@@ -76,8 +76,6 @@ class RankingListService
}
}
}
}
}
}
//循环分组后的数组,查询出各组本月业绩排行
//循环分组后的数组,查询出各组本月业绩排行
...
@@ -105,7 +103,7 @@ class RankingListService
...
@@ -105,7 +103,7 @@ class RankingListService
}
}
public
function
getSort
(
$params
,
$begin_time
,
$end_time
,
$ids
){
public
function
getSort
(
$params
,
$begin_time
,
$end_time
,
$ids
){
$fields
=
"a.id,
a.store_id,a.district_id
,a.name,a.phone,SUM(b.performance) as performance"
;
$fields
=
"a.id,
c.store_name
,a.name,a.phone,SUM(b.performance) as performance"
;
//查询出有业绩的经纪人
//查询出有业绩的经纪人
$have_performance_arr
=
$this
->
agentModel
->
getAgentsListByPK
(
$fields
,
$params
);
$have_performance_arr
=
$this
->
agentModel
->
getAgentsListByPK
(
$fields
,
$params
);
//查询出无业绩的经纪人
//查询出无业绩的经纪人
...
...
application/model/AAgents.php
View file @
1b3335b6
...
@@ -423,6 +423,7 @@ class AAgents extends BaseModel
...
@@ -423,6 +423,7 @@ class AAgents extends BaseModel
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"t_agent_total b"
,
"a.id=b.agent_id"
,
"left"
)
->
join
(
"t_agent_total b"
,
"a.id=b.agent_id"
,
"left"
)
->
join
(
"a_store c"
,
"a.store_id=c.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
->
group
(
"b.agent_id"
)
->
group
(
"b.agent_id"
)
->
order
(
"performance desc"
)
->
order
(
"performance desc"
)
...
@@ -437,12 +438,13 @@ class AAgents extends BaseModel
...
@@ -437,12 +438,13 @@ class AAgents extends BaseModel
$str_ids
=
" and id in (
$ids
)"
;
$str_ids
=
" and id in (
$ids
)"
;
$str_ids1
=
" and a.id in (
$ids
)"
;
$str_ids1
=
" and a.id in (
$ids
)"
;
}
}
$sql
=
"select aa.id,aa.store_id,aa.district_id,aa.name,aa.phone,aa.performance from
$sql
=
"select aa.id,aa.store_name,aa.name,aa.phone,aa.performance from
(select id,store_id,district_id,name,phone,0 as performance from a_agents
(select a.id,c.store_name,a.name,a.phone,0 as performance from a_agents a
left join a_store c on a.store_id=c.id
where position=
$position
and site_id=
$siteId
and status in (0,3)
$str_ids
)
where position=
$position
and site_id=
$siteId
and status in (0,3)
$str_ids
)
as aa left join
as aa left join
(select a.id,
a.store_id,a.district_id
,a.name,a.phone,0 as performance from a_agents a
(select a.id,
c.store_name
,a.name,a.phone,0 as performance from a_agents a
left join t_agent_total b on a.id=b.agent_id
left join t_agent_total b on a.id=b.agent_id
left join a_store c on a.store_id=c.id
where b.total_time BETWEEN '
$startTime
' and '
$endTime
'and a.status in (0,3)
$str_ids1
GROUP BY b.agent_id )
where b.total_time BETWEEN '
$startTime
' and '
$endTime
'and a.status in (0,3)
$str_ids1
GROUP BY b.agent_id )
as bb on aa.id = bb.id where bb.id is null"
;
as bb on aa.id = bb.id where bb.id is null"
;
$data
=
Db
::
table
(
$this
->
table
)
->
query
(
$sql
);
$data
=
Db
::
table
(
$this
->
table
)
->
query
(
$sql
);
...
...
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