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
21807c3b
Commit
21807c3b
authored
Oct 25, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩排行修改
parent
f6a0dc31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
3 deletions
+59
-3
PerformanceInfo.php
application/index/controller/PerformanceInfo.php
+2
-2
PerformanceService.php
application/index/service/PerformanceService.php
+0
-0
AAgents.php
application/model/AAgents.php
+39
-0
AStore.php
application/model/AStore.php
+17
-0
OBargainModel.php
application/model/OBargainModel.php
+1
-1
No files found.
application/index/controller/PerformanceInfo.php
View file @
21807c3b
...
...
@@ -35,7 +35,7 @@ class PerformanceInfo extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$where
[
'Obargain.status'
]
=
[
'in'
,
'10,11,13'
]
;
$where
[
'Obargain.status'
]
=
array
(
'neq'
,
30
)
;
/*开始结束时间*/
if
((
$this
->
params
[
'create_time_start'
]
!=
NULL
)
&&
(
$this
->
params
[
'create_time_end'
]
!=
NULL
))
{
$where
[
'Obargain.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time_start'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time_end'
]
.
' 23:59:59'
]];
...
...
@@ -133,7 +133,7 @@ class PerformanceInfo extends Basic
public
function
getPerformanceInfoExcel
()
{
$where
[
'Obargain.status'
]
=
[
'in'
,
'10,11,13'
]
;
$where
[
'Obargain.status'
]
=
array
(
'neq'
,
30
)
;
/*开始结束时间*/
if
((
$this
->
params
[
'create_time_start'
]
!=
NULL
)
&&
(
$this
->
params
[
'create_time_end'
]
!=
NULL
))
{
$where
[
'Obargain.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time_start'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time_end'
]
.
' 23:59:59'
]];
...
...
application/index/service/PerformanceService.php
View file @
21807c3b
This diff is collapsed.
Click to expand it.
application/model/AAgents.php
View file @
21807c3b
...
...
@@ -527,6 +527,45 @@ class AAgents extends BaseModel
->
join
(
"a_district c"
,
"a.district_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
//echo $this->getLastSql();
return
$result
;
}
/**
* 查询经纪人信息-业绩排行用
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getAgentsInfoByAgentIdForPerformanceService
(
$field
,
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"phone"
]))
{
$where_
[
"a.phone"
]
=
$params
[
"phone"
];
}
if
(
isset
(
$params
[
"store_id"
]))
{
$where_
[
"b.id"
]
=
$params
[
"store_id"
];
$where_
[
"a.level"
]
=
array
(
"in"
,
"20,40"
);
}
if
(
isset
(
$params
[
"district_id"
]))
{
$where_
[
"c.id"
]
=
$params
[
"district_id"
];
$where_
[
"a.level"
]
=
array
(
"in"
,
"30,40"
);
}
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_store b"
,
"a.store_id = b.id"
,
"left"
)
->
join
(
"a_district c"
,
"a.district_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
//echo $this->getLastSql();
return
$result
;
}
...
...
application/model/AStore.php
View file @
21807c3b
...
...
@@ -259,4 +259,20 @@ class AStore extends BaseModel
->
where
(
$where
)
->
find
();
}
/**
* 获取门店
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getStore
(
$params
,
$field
)
{
$result
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
select
();
//echo Db::table($this->table)->getLastSql();
//dump($this->getLastSql());
return
$result
;
}
}
\ No newline at end of file
application/model/OBargainModel.php
View file @
21807c3b
...
...
@@ -1411,7 +1411,7 @@ class OBargainModel extends Model
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
//
echo $this->db_->getLastSql();
echo
$this
->
db_
->
getLastSql
();
return
$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