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
28512de7
Commit
28512de7
authored
Aug 26, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC后台---业绩点击数字查看----报备详情接口数据补充
parent
83c1e93a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
9 deletions
+105
-9
Performance.php
application/api_broker/controller/Performance.php
+58
-5
PerformanceService.php
application/api_broker/service/PerformanceService.php
+13
-2
OReportModel.php
application/model/OReportModel.php
+28
-0
route.php
application/route.php
+6
-2
No files found.
application/api_broker/controller/Performance.php
View file @
28512de7
...
@@ -548,20 +548,25 @@ class Performance extends Basic
...
@@ -548,20 +548,25 @@ class Performance extends Basic
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
}
}
}
}
//TODO 报备
//TODO 报备
public
function
followListPcInfo
()
public
function
followListPcInfo
()
{
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*$params = array(
// return 'ceshi';
//"id" => 80,
/* $params = array(
//"type" => 1, //1表示个人业绩排行 2门店 3区域
"id" => 80,
"type" => 1, //1表示个人业绩排行 2门店 3区域
//"id" => 79,
//"id" => 79,
//"type" => 2, //1表示个人业绩排行 2门店 3区域
//"type" => 2, //1表示个人业绩排行 2门店 3区域
"id" => 7,
//
"id" => 7,
"type" => 3, //1表示个人业绩排行 2门店 3区域
//
"type" => 3, //1表示个人业绩排行 2门店 3区域
"start_time" => "2018-06-12",
"start_time" => "2018-06-12",
"end_time" => "2018-06-19",
"end_time" => "2018-06-19",
...
@@ -587,6 +592,16 @@ class Performance extends Basic
...
@@ -587,6 +592,16 @@ class Performance extends Basic
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
}
}
}
}
// //TODO 新增商铺
// //TODO 新增商铺
public
function
housingResourcePcInfo
()
public
function
housingResourcePcInfo
()
{
{
...
@@ -666,5 +681,43 @@ class Performance extends Basic
...
@@ -666,5 +681,43 @@ class Performance extends Basic
}
}
}
}
//TODO 团队人数
//TODO 团队人数
public
function
teamNumPcInfo
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
//"id" => 80,
//"type" => 1, //1表示个人业绩排行 2门店 3区域
//"id" => 79,
//"type" => 2, //1表示个人业绩排行 2门店 3区域
"id" => 7,
"type" => 3, //1表示个人业绩排行 2门店 3区域
"start_time" => "2018-06-12",
"end_time" => "2018-06-19",
"page_no" => 1,
"page_size" => 15
);*/
// $checkResult = $this->validate($params, "PerformanceValidate.verify");
// 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_
->
getUserResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$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/service/PerformanceService.php
View file @
28512de7
...
@@ -734,14 +734,25 @@ class PerformanceService
...
@@ -734,14 +734,25 @@ class PerformanceService
return
[
"code"
=>
200
,
"date"
=>
$addHouseList
];
return
[
"code"
=>
200
,
"date"
=>
$addHouseList
];
}
}
/**
* 报备
* @param $id
* @param $type
* @param $start_time
* @param $end_time
* @param $page_no
* @param $page_size
* @return array
*/
public
function
getFollowListPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
public
function
getFollowListPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
,
$page_no
,
$page_size
)
{
{
$params
=
$this
->
getAgentIdPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
);
$params
=
$this
->
getAgentIdPcInfo
(
$id
,
$type
,
$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,c.internal_title as house_title,c.shop_typ
e"
;
$field
=
"a.id,a.user_name,a.
predict_see_time,a.create_time,a.report_agent_name,c.internal_title as house_title,c.shop_type,e.store_nam
e"
;
$reportList
=
$this
->
reportModel
->
getAddReportList
(
$params
,
$field
,
$page_no
,
$page_size
);
$reportList
=
$this
->
reportModel
->
getAddReportList
PcInfo
(
$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"
]);
}
}
...
...
application/model/OReportModel.php
View file @
28512de7
...
@@ -634,6 +634,34 @@ class OReportModel extends Model
...
@@ -634,6 +634,34 @@ class OReportModel extends Model
return
$result
;
return
$result
;
}
}
public
function
getAddReportListPcInfo
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$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
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
'a_store e'
,
'a.report_store_id = e.id'
,
'left'
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
/**
/**
* @param $field
* @param $field
* @param $params
* @param $params
...
...
application/route.php
View file @
28512de7
...
@@ -546,8 +546,12 @@ Route::group('broker', [
...
@@ -546,8 +546,12 @@ Route::group('broker', [
'superviseList'
=>
[
'api_broker/Performance/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行list
'superviseList'
=>
[
'api_broker/Performance/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行list
'officialReceiptsList'
=>
[
'api_broker/Performance/officialReceiptsList'
,
[
'method'
=>
'POST|GET'
]
],
//实收list
'officialReceiptsList'
=>
[
'api_broker/Performance/officialReceiptsList'
,
[
'method'
=>
'POST|GET'
]
],
//实收list
'paylogListPcInfo'
=>
[
'api_broker/Performance/paylogListPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//进场list
'paylogListPcInfo'
=>
[
'api_broker/Performance/paylogListPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//
'marchInListPcInfo'
=>
[
'api_broker/Performance/marchInListPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//进场list
'marchInListPcInfo'
=>
[
'api_broker/Performance/marchInListPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//
'followListPcInfo'
=>
[
'api_broker/Performance/followListPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//报备
'housingResourcePcInfo'
=>
[
'api_broker/Performance/housingResourcePcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//新增商铺
'userResourcePcInfo'
=>
[
'api_broker/Performance/userResourcePcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//新增客户
'teamNumPcInfo'
=>
[
'api_broker/Performance/teamNumPcInfo'
,
[
'method'
=>
'POST|GET'
]
],
//团队人数
//user
//user
...
...
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