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
f7c2578d
Commit
f7c2578d
authored
Nov 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话汇总
parent
9d033cfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
13 deletions
+61
-13
CellPhone.php
application/index/controller/CellPhone.php
+58
-10
TAgentTotalCallModel.php
application/model/TAgentTotalCallModel.php
+1
-1
agentIndex_template_tpl.html
public/resource/template/agentIndex_template_tpl.html
+2
-2
No files found.
application/index/controller/CellPhone.php
View file @
f7c2578d
...
@@ -15,6 +15,7 @@ use app\model\AAgents;
...
@@ -15,6 +15,7 @@ use app\model\AAgents;
use
app\model\SecretReport
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowPp
;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
app\model\Users
;
use
app\model\TAgentTotalCallModel
;
class
CellPhone
extends
Basic
class
CellPhone
extends
Basic
...
@@ -153,6 +154,55 @@ class CellPhone extends Basic
...
@@ -153,6 +154,55 @@ class CellPhone extends Basic
}
}
}
}
// /**
// * 经纪人通话汇总
// *
// * @return \think\Response
// * @throws \think\db\exception\DataNotFoundException
// * @throws \think\db\exception\ModelNotFoundException
// * @throws \think\exception\DbException
// */
// public function callCollectList()
// {
// if ($this->request->isAjax()) {
// $result['code'] = 200;
// $result['msg'] = '';
// $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
// $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
// $report = new SecretReport();
// $field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
// $where['time'] = ['>', 0];
// if (!empty($this->params['start_date']) && empty($this->params['end_date'])) {
// $where['a.create_time'] = [ '> time', $this->params['start_date'] ];
// }
// if (!empty($this->params['end_date']) && empty($this->params['start_date'])) {
// $where['a.create_time'] = [ '< time', $this->params['end_date'] ];
// }
// if (!empty($this->params['end_date']) && !empty($this->params['start_date'])) {
// $where['a.create_time'] = [ 'between', [$this->params['start_date'], $this->params['end_date']]];
// }
// if (!empty($this->params['agents_name'])) {
// $where['realName'] = [ 'LIKE', $this->params['agents_name'] . '%' ];
// }
// if (!empty($this->params['phone'])) {
// $where['phone'] = [ 'LIKE', $this->params['phone'] . '%' ];
// }
// $data['list'] = $report->getCallCollect($pageNo, $pageSize, 'id desc', $field, $where);
// $data['total'] = $report->getCallCollectTotal($where);
// return $this->response($result['code'], $result['msg'], $data);
// } else {
// return view('cell_phone/agentIndex');
// }
// }
/**
/**
* 经纪人通话汇总
* 经纪人通话汇总
*
*
...
@@ -165,39 +215,37 @@ class CellPhone extends Basic
...
@@ -165,39 +215,37 @@ class CellPhone extends Basic
{
{
if
(
$this
->
request
->
isAjax
())
{
if
(
$this
->
request
->
isAjax
())
{
return
$this
->
response
(
101
,
'维护中'
);
$result
[
'code'
]
=
200
;
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
''
;
$result
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$report
=
new
SecretReport
();
$field
=
'id,time,name,money,phone'
;
$field
=
'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time'
;
$where
[
'time'
]
=
[
'>'
,
0
];
$where
[
'time'
]
=
[
'>'
,
0
];
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
$where
[
'
a.create
_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
];
$where
[
'
total
_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
];
}
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'
a.create
_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
];
$where
[
'
total
_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
];
}
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'
a.create
_time'
]
=
[
'between'
,
[
$this
->
params
[
'start_date'
],
$this
->
params
[
'end_date'
]]];
$where
[
'
total
_time'
]
=
[
'between'
,
[
$this
->
params
[
'start_date'
],
$this
->
params
[
'end_date'
]]];
}
}
if
(
!
empty
(
$this
->
params
[
'agents_name'
]))
{
if
(
!
empty
(
$this
->
params
[
'agents_name'
]))
{
$where
[
'
realN
ame'
]
=
[
'LIKE'
,
$this
->
params
[
'agents_name'
]
.
'%'
];
$where
[
'
n
ame'
]
=
[
'LIKE'
,
$this
->
params
[
'agents_name'
]
.
'%'
];
}
}
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
if
(
!
empty
(
$this
->
params
[
'phone'
]))
{
$where
[
'phone'
]
=
[
'LIKE'
,
$this
->
params
[
'phone'
]
.
'%'
];
$where
[
'phone'
]
=
[
'LIKE'
,
$this
->
params
[
'phone'
]
.
'%'
];
}
}
$data
[
'list'
]
=
$report
->
getCallCollect
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$report
=
new
TAgentTotalCallModel
();
$data
[
'total'
]
=
$report
->
getCallCollectTotal
(
$where
);
$data
[
'list'
]
=
$report
->
getList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$report
->
getTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
}
else
{
}
else
{
return
view
(
'cell_phone/agentIndex'
);
return
view
(
'cell_phone/agentIndex'
);
...
...
application/model/TAgentTotalCallModel.php
View file @
f7c2578d
...
@@ -12,7 +12,7 @@ use think\Model;
...
@@ -12,7 +12,7 @@ use think\Model;
* Time : 下午2:00
* Time : 下午2:00
* Intro:
* Intro:
*/
*/
class
TAgentTotalCallModel
extends
Model
class
TAgentTotalCallModel
extends
Base
Model
{
{
protected
$table
=
"t_agent_call"
;
protected
$table
=
"t_agent_call"
;
private
$db_
;
private
$db_
;
...
...
public/resource/template/agentIndex_template_tpl.html
View file @
f7c2578d
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
[
%
if
(
it
[
0
])
{
%
]
[
%
if
(
it
[
0
])
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'
agents_
name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
price
'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
money
'
]
%
]
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
[
%
}
else
{
%
]
[
%
}
else
{
%
]
...
...
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