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
635a79ee
Commit
635a79ee
authored
May 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话记录统计和获取验证码修改
parent
31159c74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
SecretReport.php
application/model/SecretReport.php
+10
-10
No files found.
application/model/SecretReport.php
View file @
635a79ee
...
@@ -119,7 +119,7 @@ class SecretReport extends Model
...
@@ -119,7 +119,7 @@ class SecretReport extends Model
public
function
getCallCollect
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
public
function
getCallCollect
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
$data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'a
_a
gents b'
,
'a.agents_id=b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
@@ -131,16 +131,16 @@ class SecretReport extends Model
...
@@ -131,16 +131,16 @@ class SecretReport extends Model
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$result
[
$k
]
=
$v
;
$result
[
$k
]
=
$v
;
$result
[
$k
][
'price'
]
=
""
;
$result
[
$k
][
'price'
]
=
""
;
if
(
$v
->
agents_id
)
{
if
(
empty
(
$v
[
'agents_id'
])
)
{
$
agents_data
=
Db
::
table
(
'agents'
)
->
field
(
'realName,father_id'
)
->
where
(
'id'
,
$v
->
agents_id
)
->
find
();
$
result
[
$k
][
'agents_name'
]
=
""
;
$result
[
$k
][
'agents_name'
]
=
$agents_data
[
'realName'
];
}
else
{
$
shop_data
=
Db
::
table
(
'agents'
)
->
field
(
'agentshopname,sub_shopname'
)
->
where
(
'id'
,
$agents_data
[
'father_id'
])
->
find
();
$
agent
=
new
AAgents
();
$
result
[
$k
][
'shop_name'
]
=
$shop_data
[
'sub_shopname'
]
?
$shop_data
[
'agentshopname'
]
.
'-'
.
$shop_data
[
'sub_shopname'
]
:
$shop_data
[
'agentshopname'
]
;
$
agent_data
=
$agent
->
getAgentsInfoByAgentId
(
'a.name,b.store_name,c.district_name'
,[
'agent_id'
=>
$v
[
'agents_id'
]])
;
}
else
{
$result
[
$k
][
'agents_name'
]
=
$agent_data
[
0
][
'name'
];
$result
[
$k
][
'
agents_name'
]
=
""
;
$result
[
$k
][
'
shop_name'
]
=
$agent_data
[
0
][
'district_name'
]
.
'-'
.
$agent_data
[
0
][
'store_name'
]
.
'-'
.
$agent_data
[
0
][
'name'
]
;
}
}
$result
[
$k
][
'time'
]
=
$v
->
time
;
$result
[
$k
][
'time'
]
=
$v
[
'time'
]
;
//主叫收费
//主叫收费
if
(
$v
[
'call_type'
]
==
0
)
{
if
(
$v
[
'call_type'
]
==
0
)
{
...
@@ -161,7 +161,7 @@ class SecretReport extends Model
...
@@ -161,7 +161,7 @@ class SecretReport extends Model
*/
*/
public
function
getCallCollectTotal
(
$params
)
{
public
function
getCallCollectTotal
(
$params
)
{
return
$this
->
alias
(
'a'
)
return
$this
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'a
_a
gents b'
,
'a.agents_id=b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
group
(
'agents_id'
)
->
group
(
'agents_id'
)
->
count
();
->
count
();
...
...
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