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
e6f722df
Commit
e6f722df
authored
Mar 25, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
17074204
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
17 deletions
+51
-17
OrderLog.php
application/api_broker/controller/OrderLog.php
+3
-3
Performance.php
application/api_broker/controller/Performance.php
+40
-10
PerformanceService.php
application/api_broker/service/PerformanceService.php
+4
-4
OBargainModel.php
application/model/OBargainModel.php
+1
-0
OMarchInModel.php
application/model/OMarchInModel.php
+1
-0
OPayLogModel.php
application/model/OPayLogModel.php
+1
-0
OReportModel.php
application/model/OReportModel.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
e6f722df
...
@@ -358,12 +358,12 @@ class OrderLog extends Basic
...
@@ -358,12 +358,12 @@ class OrderLog extends Basic
public
function
searchAgents
()
public
function
searchAgents
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
$params
=
array
(
"submit_agent_id"
=>
1
,
"submit_agent_id"
=>
1
,
"keyword" => "1
38
",
"keyword"
=>
"1
57
"
,
"page_no"
=>
1
,
"page_no"
=>
1
,
"page_size"
=>
15
"page_size"
=>
15
);
*/
);
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"keyword"
]))
{
if
(
!
isset
(
$params
[
"submit_agent_id"
])
||
!
isset
(
$params
[
"keyword"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
...
...
application/api_broker/controller/Performance.php
View file @
e6f722df
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\PerformanceService
;
use
app\api_broker\service\PerformanceService
;
use
Think\Exception
;
use
think\Request
;
use
think\Request
;
/**
/**
...
@@ -26,7 +27,7 @@ class Performance extends Basic
...
@@ -26,7 +27,7 @@ class Performance extends Basic
}
}
/**
/**
* 业绩
列表
* 业绩
汇总,
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
...
@@ -38,19 +39,22 @@ class Performance extends Basic
...
@@ -38,19 +39,22 @@ class Performance extends Basic
/* $params = array(
/* $params = array(
"agent_id" => 1,
"agent_id" => 1,
"type" => 1, //1表示个人业绩排行 2门店 3区域
"type" => 1, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" =>""
);*/
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$yesterday
=
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
//默认排序一周
$end_day
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$end_day
=
isset
(
$params
[
"end_day"
])
?
$params
[
"end_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
isset
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$
yesterday
,
$end
_day
);
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$
end_day
,
$start
_day
);
//dump($list);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
if
(
count
(
$list
)
>
0
)
{
$result
[
"list"
]
=
$list
;
$result
[
"list"
]
=
$list
;
$result
[
"start_time"
]
=
$
yester
day
;
$result
[
"start_time"
]
=
$
start_
day
;
$result
[
"end_time"
]
=
$end_day
;
$result
[
"end_time"
]
=
$end_day
;
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
}
...
@@ -78,13 +82,34 @@ class Performance extends Basic
...
@@ -78,13 +82,34 @@ class Performance extends Basic
if
(
isset
(
$params
[
"house_id"
]))
{
if
(
isset
(
$params
[
"house_id"
]))
{
$house_id
=
$params
[
"house_id"
];
$house_id
=
$params
[
"house_id"
];
}
}
try
{
$result
=
$this
->
service_
->
personagePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
],
$result
=
$this
->
service_
->
personagePerformance
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
],
$params
[
"is_case"
],
$house_id
);
$params
[
"is_case"
],
$house_id
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$exception
);
}
}
public
function
storePerformanceBySearch
()
{
$params
=
$this
->
params
;
$params
=
array
(
"agent_id"
=>
1
,
"start_time"
=>
"2018-03-23"
,
"end_time"
=>
"2018-03-23"
,
);
}
}
public
function
orderNoList
(){
/**
* 各个状态的订单列表暂不分页,
* @return \think\Response
*/
public
function
orderNoList
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
$params
=
array
(
"agent_id"
=>
1
,
"agent_id"
=>
1
,
...
@@ -94,7 +119,7 @@ class Performance extends Basic
...
@@ -94,7 +119,7 @@ class Performance extends Basic
"house_id"
=>
0
,
"house_id"
=>
0
,
"type"
=>
2
// 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"
])
)
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
])
||
!
isset
(
$params
[
"type"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
...
@@ -102,9 +127,14 @@ class Performance extends Basic
...
@@ -102,9 +127,14 @@ class Performance extends Basic
if
(
isset
(
$params
[
"house_id"
]))
{
if
(
isset
(
$params
[
"house_id"
]))
{
$house_id
=
$params
[
"house_id"
];
$house_id
=
$params
[
"house_id"
];
}
}
try
{
$result
=
$this
->
service_
->
orderList
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
],
$result
=
$this
->
service_
->
orderList
(
$params
[
"agent_id"
],
$params
[
"start_time"
],
$params
[
"end_time"
],
$params
[
"is_case"
],
$house_id
,
$params
[
"type"
]);
$params
[
"is_case"
],
$house_id
,
$params
[
"type"
]);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$exception
);
}
}
}
}
}
application/api_broker/service/PerformanceService.php
View file @
e6f722df
...
@@ -249,20 +249,20 @@ class PerformanceService
...
@@ -249,20 +249,20 @@ class PerformanceService
//1带看 2进场 3收款 4成交报告
//1带看 2进场 3收款 4成交报告
switch
(
$type
)
{
switch
(
$type
)
{
case
1
:
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
"
;
$field
=
"DATE(a.create_time) as create_time,a.user_phone,a.user_name,a.user_id,b.house_id,
d.internal_title,d.internal_address
"
;
$result
=
$this
->
reportModel
->
getAddReportOrderList
(
$field
,
$params
);
$result
=
$this
->
reportModel
->
getAddReportOrderList
(
$field
,
$params
);
break
;
break
;
case
2
:
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"
;
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id
,d.internal_title,d.internal_address
"
;
$result
=
$this
->
marchInModel
->
getAddMarchInOrderList
(
$field
,
$params
);
$result
=
$this
->
marchInModel
->
getAddMarchInOrderList
(
$field
,
$params
);
break
;
break
;
case
3
:
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"
;
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id
,d.internal_title,d.internal_address
"
;
$result
=
$this
->
payLogModel
->
getAddPayLogOrderList
(
$field
,
$params
);
$result
=
$this
->
payLogModel
->
getAddPayLogOrderList
(
$field
,
$params
);
break
;
break
;
case
4
:
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"
;
$field
=
"DATE(a.create_time) as create_time ,b.house_id,b.house_title,c.user_phone,c.user_name,c.user_id
,d.internal_title,d.internal_address
"
;
$result
=
$this
->
bargainModel
->
getAddBargainOrderList
(
$field
,
$params
);
$result
=
$this
->
bargainModel
->
getAddBargainOrderList
(
$field
,
$params
);
break
;
break
;
default
:
default
:
...
...
application/model/OBargainModel.php
View file @
e6f722df
...
@@ -366,6 +366,7 @@ class OBargainModel extends Model
...
@@ -366,6 +366,7 @@ class OBargainModel extends Model
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
...
...
application/model/OMarchInModel.php
View file @
e6f722df
...
@@ -132,6 +132,7 @@ class OMarchInModel extends Model
...
@@ -132,6 +132,7 @@ class OMarchInModel extends Model
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
...
...
application/model/OPayLogModel.php
View file @
e6f722df
...
@@ -130,6 +130,7 @@ class OPayLogModel extends Model
...
@@ -130,6 +130,7 @@ class OPayLogModel extends Model
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
"o_report c"
,
"b.f_id = c.id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
...
...
application/model/OReportModel.php
View file @
e6f722df
...
@@ -192,6 +192,7 @@ class OReportModel extends Model
...
@@ -192,6 +192,7 @@ class OReportModel extends Model
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
...
...
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