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
5873a063
Commit
5873a063
authored
Jun 20, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业绩监督执行列表
parent
5057c0e6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
9 deletions
+77
-9
Performance.php
application/api_broker/controller/Performance.php
+35
-0
Supervise.php
application/api_broker/controller/Supervise.php
+0
-0
PerformanceService.php
application/api_broker/service/PerformanceService.php
+40
-8
UWxInfo.php
application/model/UWxInfo.php
+1
-1
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Performance.php
View file @
5873a063
...
@@ -388,4 +388,39 @@ class Performance extends Basic
...
@@ -388,4 +388,39 @@ class Performance extends Basic
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
}
}
}
}
/**
* 获取时间段进场数据
* @return \think\Response
*/
public
function
superviseList
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
array
(
"agent_id"
=>
78
,
"start_time"
=>
"2018-06-12"
,
"end_time"
=>
"2018-06-20"
,
"page_no"
=>
1
,
"page_size"
=>
15
);
$checkResult
=
$this
->
validate
(
$params
,
"PerformanceValidate.verifyOther"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
//默认排序一周
$end_day
=
!
empty
(
$params
[
"end_time"
])
?
$params
[
"end_time"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-1 day"
));
$start_day
=
!
empty
(
$params
[
"start_time"
])
?
$params
[
"start_time"
]
:
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
superviseList
(
$params
[
"agent_id"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
);
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
}
}
}
}
application/api_broker/controller/Supervise.php
View file @
5873a063
This diff is collapsed.
Click to expand it.
application/api_broker/service/PerformanceService.php
View file @
5873a063
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\api_broker\service
;
namespace
app\api_broker\service
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ASuperviseModel
;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\GHousesImgs
;
use
app\model\OBargainModel
;
use
app\model\OBargainModel
;
...
@@ -32,6 +33,7 @@ class PerformanceService
...
@@ -32,6 +33,7 @@ class PerformanceService
private
$marchInModel
;
private
$marchInModel
;
private
$payLogModel
;
private
$payLogModel
;
private
$gHousesImgModel
;
private
$gHousesImgModel
;
private
$superviseModel
;
public
function
__construct
()
public
function
__construct
()
{
{
...
@@ -46,6 +48,7 @@ class PerformanceService
...
@@ -46,6 +48,7 @@ class PerformanceService
$this
->
marchInModel
=
new
OMarchInModel
();
$this
->
marchInModel
=
new
OMarchInModel
();
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
payLogModel
=
new
OPayLogModel
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
superviseModel
=
new
ASuperviseModel
();
}
}
...
@@ -613,13 +616,14 @@ class PerformanceService
...
@@ -613,13 +616,14 @@ class PerformanceService
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.predict_see_time,b.house_title"
;
$field
=
"a.id,a.user_name,a.user_phone,a.predict_see_time,b.house_title"
;
$reportList
=
$this
->
reportModel
->
getAddReportList
(
$params
,
$field
,
$page_no
,
$page_size
);
$reportList
=
$this
->
reportModel
->
getAddReportList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$reportList
as
$key
=>
$val
)
{
foreach
(
$reportList
as
$key
=>
$val
)
{
$reportList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
$reportList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
}
}
return
[
"code"
=>
200
,
"date"
=>
$reportList
];
return
[
"code"
=>
200
,
"date"
=>
$reportList
];
}
}
/**
/**
* 获取进场数据
* 获取进场数据
* @param $agent_id
* @param $agent_id
...
@@ -635,14 +639,15 @@ class PerformanceService
...
@@ -635,14 +639,15 @@ class PerformanceService
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"
;
$field
=
"a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"
;
$addMarchInList
=
$this
->
marchInModel
->
getAddMarchInList
(
$params
,
$field
,
$page_no
,
$page_size
);
$addMarchInList
=
$this
->
marchInModel
->
getAddMarchInList
(
$params
,
$field
,
$page_no
,
$page_size
);
//获取图片信息
//获取图片信息
foreach
(
$addMarchInList
as
$key
=>
$val
)
{
foreach
(
$addMarchInList
as
$key
=>
$val
)
{
$addMarchInList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
$addMarchInList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
}
}
return
[
"code"
=>
200
,
"date"
=>
$addMarchInList
];
return
[
"code"
=>
200
,
"date"
=>
$addMarchInList
];
}
}
/**
/**
* 获取收款数据
* 获取收款数据
* @param $agent_id
* @param $agent_id
...
@@ -658,14 +663,15 @@ class PerformanceService
...
@@ -658,14 +663,15 @@ class PerformanceService
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"
;
$field
=
"a.id,c.user_name,c.user_phone,c.predict_see_time,b.house_title"
;
$payLogList
=
$this
->
payLogModel
->
getAddPayLogList
(
$params
,
$field
,
$page_no
,
$page_size
);
$payLogList
=
$this
->
payLogModel
->
getAddPayLogList
(
$params
,
$field
,
$page_no
,
$page_size
);
//获取图片信息
//获取图片信息
foreach
(
$payLogList
as
$key
=>
$val
)
{
foreach
(
$payLogList
as
$key
=>
$val
)
{
$payLogList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
$payLogList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
}
}
return
[
"code"
=>
200
,
"date"
=>
$payLogList
];
return
[
"code"
=>
200
,
"date"
=>
$payLogList
];
}
}
/**
/**
* 获取业绩数据
* 获取业绩数据
* @param $type
* @param $type
...
@@ -676,15 +682,40 @@ class PerformanceService
...
@@ -676,15 +682,40 @@ class PerformanceService
* @param $page_size
* @param $page_size
* @return array|false|\PDOStatement|string|\think\Collection
* @return array|false|\PDOStatement|string|\think\Collection
*/
*/
public
function
performanceList
(
$type
,
$agent_id
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
public
function
performanceList
(
$type
,
$agent_id
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
{
{
$params
=
$this
->
getAgentId
(
$agent_id
,
$type
,
$start_time
,
$end_time
);
$params
=
$this
->
getAgentId
(
$agent_id
,
$type
,
$start_time
,
$end_time
);
if
(
!
$params
)
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,b.name,c.store_name,d.district_name,a.scale_fee,a.create_time"
;
$field
=
"a.id,b.name,c.store_name,d.district_name,a.scale_fee,a.create_time"
;
$performanceList
=
$this
->
bargainModel
->
getAddBargainList
(
$params
,
$field
,
$page_no
,
$page_size
);
$performanceList
=
$this
->
bargainModel
->
getAddBargainList
(
$params
,
$field
,
$page_no
,
$page_size
);
return
[
"code"
=>
200
,
"date"
=>
$performanceList
];
return
[
"code"
=>
200
,
"date"
=>
$performanceList
];
}
}
/**
* 获取监督执行记录
* @param $agent_id
* @param $start_time
* @param $end_time
* @param $page_no
* @param $page_size
* @return array
*/
public
function
superviseList
(
$agent_id
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
{
$params
=
$this
->
getAgentId
(
$agent_id
,
2
,
$start_time
,
$end_time
);
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.agent_id,a.agent_name,a.remark,a.img,a.address,a.create_time"
;
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
$superviseList
=
$this
->
superviseModel
->
findSuperviseList
(
$page_no
,
$page_size
,
'id desc'
,
$field
,
$where_
);
foreach
(
$superviseList
as
$k
=>
$v
)
{
$superviseList
[
$k
][
'img'
]
=
CK_IMG_URL
.
'images/supervise/'
.
$v
[
'img'
];
}
return
[
"code"
=>
200
,
"date"
=>
$superviseList
];
}
}
}
\ No newline at end of file
application/model/UWxInfo.php
View file @
5873a063
...
@@ -22,7 +22,7 @@ class UWxInfo extends Model
...
@@ -22,7 +22,7 @@ class UWxInfo extends Model
* 新增微信拉取用户信息
* 新增微信拉取用户信息
* @param $params
* @param $params
* @return int|string
* @return int|string
* @throws Exception
* @throws Exception
xx
*/
*/
public
function
addWxInfo
(
array
$params
)
:
int
public
function
addWxInfo
(
array
$params
)
:
int
{
{
...
...
application/route.php
View file @
5873a063
...
@@ -468,6 +468,7 @@ Route::group('broker', [
...
@@ -468,6 +468,7 @@ Route::group('broker', [
'marchInList'
=>
[
'api_broker/Performance/marchInList'
,
[
'method'
=>
'POST|GET'
]
],
//进场list
'marchInList'
=>
[
'api_broker/Performance/marchInList'
,
[
'method'
=>
'POST|GET'
]
],
//进场list
'paylogList'
=>
[
'api_broker/Performance/paylogList'
,
[
'method'
=>
'POST|GET'
]
],
//收款list
'paylogList'
=>
[
'api_broker/Performance/paylogList'
,
[
'method'
=>
'POST|GET'
]
],
//收款list
'performanceList'
=>
[
'api_broker/Performance/performanceList'
,
[
'method'
=>
'POST|GET'
]
],
//业绩list
'performanceList'
=>
[
'api_broker/Performance/performanceList'
,
[
'method'
=>
'POST|GET'
]
],
//业绩list
'superviseList'
=>
[
'api_broker/Performance/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行list
//user
//user
'returnSearchCondition'
=>
[
'api_broker/User/returnSearchCondition'
,
[
'method'
=>
'get'
]
],
//客户搜索条件
'returnSearchCondition'
=>
[
'api_broker/User/returnSearchCondition'
,
[
'method'
=>
'get'
]
],
//客户搜索条件
...
...
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