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
a039e320
Commit
a039e320
authored
Oct 19, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户来电数-临时修改
parent
7d89811f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
OperationData.php
application/index/controller/OperationData.php
+31
-6
No files found.
application/index/controller/OperationData.php
View file @
a039e320
...
@@ -102,10 +102,33 @@ class OperationData extends Basic
...
@@ -102,10 +102,33 @@ class OperationData extends Basic
* 客户来电数
* 客户来电数
* @return \think\Response
* @return \think\Response
*/
*/
// public function userPhoneNum()
// {
// $params = $this->params;1
// $params_['a.create_time'] = [ 'between', [ $params['create_time_start'] . ' 00:00:00', $params['create_time_end'] . ' 23:59:59' ] ];
// // 先查新所有部门
// $district_list = $this->getDistrict();
//
// foreach ($district_list as $key => $v) {
// $result_["id"] = $v['id'];
// $result_["district_name"] = $v['district_name'];
//
// // 客户来电数
// $params_["b.district_id"] = $v['id'];
// $params_["a.status"] = 0; //只查询正常状态的经纪人
// $model = new AUserCallAgent();
// $res = $model->getUserCallAgentCount($params_);
//
// $result_["user_phone_num"] = isset($res) ? $res : 0;
// $result[] = $result_;
// }
// return $this->response(200, 'success', $result);
// }
public
function
userPhoneNum
()
public
function
userPhoneNum
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$
params_
[
'a.
create_time'
]
=
[
'between'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]
];
$
where
[
'
create_time'
]
=
[
'between'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]
];
// 先查新所有部门
// 先查新所有部门
$district_list
=
$this
->
getDistrict
();
$district_list
=
$this
->
getDistrict
();
...
@@ -114,12 +137,14 @@ class OperationData extends Basic
...
@@ -114,12 +137,14 @@ class OperationData extends Basic
$result_
[
"district_name"
]
=
$v
[
'district_name'
];
$result_
[
"district_name"
]
=
$v
[
'district_name'
];
// 客户来电数
// 客户来电数
$params_
[
"b.district_id"
]
=
$v
[
'id'
];
$params
=
[];
$params_
[
"a.status"
]
=
0
;
//只查询正常状态的经纪人
$params
[
"district_id"
]
=
$v
[
'id'
];
$model
=
new
AUserCallAgent
();
$params
[
"status"
]
=
0
;
//只查询正常状态的经纪人
$res
=
$model
->
getUserCallAgentCount
(
$params_
);
$field
=
"sum(call_number) as call_number_total"
;
$agentModel
=
new
AAgents
();
$res
=
$agentModel
->
getUserPhoneNum
(
$field
,
$params
);
$result_
[
"user_phone_num"
]
=
isset
(
$res
)
?
$res
:
0
;
$result_
[
"user_phone_num"
]
=
isset
(
$res
[
0
][
"call_number_total"
])
?
$res
[
0
][
"call_number_total"
]
:
0
;
;
$result
[]
=
$result_
;
$result
[]
=
$result_
;
}
}
return
$this
->
response
(
200
,
'success'
,
$result
);
return
$this
->
response
(
200
,
'success'
,
$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