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
a935f411
Commit
a935f411
authored
Mar 24, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩订单列表
parent
6c4f82c6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
20 deletions
+133
-20
Performance.php
application/api_broker/controller/Performance.php
+2
-2
PerformanceService.php
application/api_broker/service/PerformanceService.php
+44
-18
OBargainModel.php
application/model/OBargainModel.php
+24
-0
OMarchInModel.php
application/model/OMarchInModel.php
+21
-0
OPayLogModel.php
application/model/OPayLogModel.php
+21
-0
OReportModel.php
application/model/OReportModel.php
+20
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Performance.php
View file @
a935f411
...
...
@@ -84,7 +84,7 @@ class Performance extends Basic
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
public
function
orderNoL
I
st
(){
public
function
orderNoL
i
st
(){
$params
=
$this
->
params
;
$params
=
array
(
"agent_id"
=>
1
,
...
...
@@ -92,7 +92,7 @@ class Performance extends Basic
"end_time"
=>
"2018-03-23"
,
"is_case"
=>
2
,
//1经纪人 2案场
"house_id"
=>
0
,
"type"
=>
1
// 1带看 2进场 3收款 4成交报告
"type"
=>
2
// 1带看 2进场 3收款 4成交报告
);
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
])
||
!
isset
(
$params
[
"type"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
...
application/api_broker/service/PerformanceService.php
View file @
a935f411
...
...
@@ -200,25 +200,26 @@ class PerformanceService
}
/**
* @param $agent_id
* @param $start_time
* @param $end_time
* @param $is_case
* @param $house_id
* @param $type
* @return null
*/
public
function
orderList
(
$agent_id
,
$start_time
,
$end_time
,
$is_case
,
$house_id
,
$type
)
{
$result
=
[];
$params
=
[];
switch
(
$is_case
)
{
case
1
:
$params
[
"agent_id"
]
=
$agent_id
;
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$result
=
$this
->
nowTimeSum
(
$params
);
break
;
case
2
:
//案场
$house_id_arr
=
[];
case
2
:
//案场
if
(
$house_id
>
0
)
{
// 如果有传楼盘id证明是筛选
$
condition
[
"house_ids"
]
=
$house_id
;
$
params
[
"house_ids"
]
=
$house_id
;
}
else
{
$vService
=
new
VerifyService
();
$house_id_arr
=
$vService
->
getCaseHouseIdByAgentId
(
$agent_id
);
...
...
@@ -226,18 +227,14 @@ class PerformanceService
foreach
(
$house_id_arr
as
$item
)
{
$ids
.=
$item
[
"houses_id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
$
condition
[
"house_ids"
]
=
$ids
;
$ids
=
rtrim
(
$ids
,
","
);
$
params
[
"house_ids"
]
=
$ids
;
}
$condition
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$result
=
$this
->
nowTimeSum
(
$condition
);
if
(
count
(
$result
)
>
0
&&
$house_id
==
0
)
{
$result
[
"house_arr"
]
=
$house_id_arr
;
}
break
;
}
$result
=
$this
->
getOrderList
(
$params
,
$type
);
if
(
count
(
$result
)
>
0
)
{
return
$result
;
}
else
{
...
...
@@ -246,6 +243,35 @@ class PerformanceService
}
private
function
getOrderList
(
$params
,
$type
)
{
$result
=
[];
//1带看 2进场 3收款 4成交报告
switch
(
$type
)
{
case
1
:
$field
=
"DATE(a.create_time) as create_time,a.user_phone,a.user_name,a.user_id,b.house_id,b.house_title"
;
$result
=
$this
->
reportModel
->
getAddReportOrderList
(
$field
,
$params
);
break
;
case
2
:
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id"
;
$result
=
$this
->
marchInModel
->
getAddMarchInOrderList
(
$field
,
$params
);
break
;
case
3
:
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id"
;
$result
=
$this
->
payLogModel
->
getAddPayLogOrderList
(
$field
,
$params
);
break
;
case
4
:
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id"
;
$result
=
$this
->
bargainModel
->
getAddBargainOrderList
(
$field
,
$params
);
break
;
default
:
}
return
$result
;
}
/**
* @param $params
* @return array
...
...
application/model/OBargainModel.php
View file @
a935f411
...
...
@@ -346,4 +346,27 @@ class OBargainModel extends Model
->
where
(
$where_
)
->
select
();
}
public
function
getAddBargainOrderList
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
])){
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
}
\ No newline at end of file
application/model/OMarchInModel.php
View file @
a935f411
...
...
@@ -116,4 +116,24 @@ class OMarchInModel extends Model
->
select
();
}
public
function
getAddMarchInOrderList
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"a.reception_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
])){
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
}
\ No newline at end of file
application/model/OPayLogModel.php
View file @
a935f411
...
...
@@ -113,4 +113,24 @@ class OPayLogModel extends Model
->
where
(
$where_
)
->
select
();
}
public
function
getAddPayLogOrderList
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
])){
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
}
\ No newline at end of file
application/model/OReportModel.php
View file @
a935f411
...
...
@@ -176,5 +176,24 @@ class OReportModel extends Model
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
public
function
getAddReportOrderList
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
])){
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]);
}
$where_
[
"a.status"
]
=
0
;
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
}
\ No newline at end of file
application/route.php
View file @
a935f411
...
...
@@ -362,6 +362,7 @@ Route::group('broker', [
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]],
'agentPerformanceBySearch'
=>
[
'api_broker/Performance/agentPerformanceBySearch'
,
[
'method'
=>
'get'
]],
'orderNoList'
=>
[
'api_broker/Performance/orderNoList'
,
[
'method'
=>
'get'
]],
'weekWorkImg'
=>
[
'api_broker/Statement/weekWorkImg'
,
[
'method'
=>
'post'
]],
//生成周报和日报图片
'setReportContent'
=>
[
'api_broker/Statement/setReportContent'
,
[
'method'
=>
'get|post'
]],
//保存日报周报四个字段
...
...
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