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
5bc1b2a2
Commit
5bc1b2a2
authored
Oct 26, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话记录跟进
parent
3c670611
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
67 deletions
+65
-67
CellPhone.php
application/index/controller/CellPhone.php
+63
-1
SecretReport.php
application/model/SecretReport.php
+1
-65
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+1
-1
No files found.
application/index/controller/CellPhone.php
View file @
5bc1b2a2
...
@@ -11,7 +11,9 @@ namespace app\index\controller;
...
@@ -11,7 +11,9 @@ namespace app\index\controller;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\PushMessageService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\SecretReport
;
use
app\model\SecretReport
;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
app\model\Users
;
...
@@ -83,7 +85,67 @@ class CellPhone extends Basic
...
@@ -83,7 +85,67 @@ class CellPhone extends Basic
$where
[
'a.secret_no'
]
=
trim
(
$this
->
params
[
'ali_yun_phone'
]);
$where
[
'a.secret_no'
]
=
trim
(
$this
->
params
[
'ali_yun_phone'
]);
}
}
$data
[
'list'
]
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$list
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$m_user
=
new
Users
();
$m_phone_follow
=
new
UPhoneFollowPp
(
$this
->
siteId
);
$m_agent
=
new
AAgents
();
foreach
(
$list
as
$k
=>
$v
)
{
if
(
empty
(
$v
[
'agents_id'
]))
{
$list
[
$k
][
'agents_name'
]
=
$v
[
'phone_no'
];
}
else
{
$agents_data
=
$m_agent
->
getAgentInfo
(
'name,store_id,phone'
,
$v
[
'agents_id'
]);
$list
[
$k
][
'agents_name'
]
=
'(经纪人)'
.
$agents_data
[
'name'
]
.
'-'
.
$agents_data
[
'phone'
];
}
if
(
$v
->
voice_file
)
{
$list
[
$k
][
'voice_file'
]
=
'http://file.tonglianjituan.com/static/voice/'
.
$v
->
voice_file
;
}
else
{
$list
[
$k
][
'voice_file'
]
=
""
;
}
$list
[
$k
][
'time'
]
=
$v
->
time
;
//主叫收费
// if ($v->call_type == 0) {
// if ($v->time > 0) {
// if ($v->time <= 60) {
// $time = 1; //不足一分钟按一分钟
// } else {
// $remainder = $v->time % 60;
// $time = 0;
// if ($remainder != 0) {
// $time += 1;
// }
// $time += floor($v->time/60);
// }
// $list[$k]['price'] = $time*0.06 + $time*0.05;//通话 0.06元/分,录音 0.05元/分
// } else {
// $list[$k]['price'] = 0;
// }
// } else {
// $list[$k]['price'] = 0;
// }
if
(
empty
(
$v
[
'call_time'
]))
{
$list
[
$k
][
'call_time'
]
=
$v
[
'create_time'
];
}
if
(
$v
[
'users_id'
])
{
$user_data
=
$m_user
->
selectUser
(
$v
[
'users_id'
],
'user_name,user_phone'
);
$user_data
[
'user_name'
]
=
empty
(
$user_data
[
'user_name'
])
?
'?.?'
:
$user_data
[
'user_name'
];
$list
[
$k
][
'user_name'
]
=
$user_data
[
'user_name'
]
.
'-'
.
substr_replace
(
$user_data
[
'user_phone'
],
'****'
,
3
,
4
);
$where_follow
[
'user_id'
]
=
$v
[
'users_id'
];
$where_follow
[
'type'
]
=
0
;
$where_follow
[
'agent_id'
]
=
$v
[
'agents_id'
];
$result
[
$k
][
'content'
]
=
$m_phone_follow
->
getUserFollowKey
(
'content'
,
$where_follow
,
'id DESC'
);
}
else
{
$result
[
$k
][
'user_nick'
]
=
""
;
$result
[
$k
][
'content'
]
=
""
;
$result
[
$k
][
'user_name'
]
=
substr_replace
(
$v
[
'peer_no'
],
'****'
,
3
,
4
);
unset
(
$list
[
$k
][
'peer_no'
]);
}
}
$data
[
'list'
]
=
$list
;
$data
[
'total'
]
=
$report
->
getCallListTotal
(
$where
);
$data
[
'total'
]
=
$report
->
getCallListTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
}
else
{
}
else
{
...
...
application/model/SecretReport.php
View file @
5bc1b2a2
...
@@ -33,71 +33,7 @@ class SecretReport extends BaseModel
...
@@ -33,71 +33,7 @@ class SecretReport extends BaseModel
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
select
();
return
$data
;
$result
=
[];
foreach
(
$data
as
$k
=>
$v
)
{
$result
[
$k
]
=
$v
;
if
(
empty
(
$v
[
'agents_id'
]))
{
$result
[
$k
][
'agents_name'
]
=
$v
[
'phone_no'
];
}
else
{
$agents_data
=
Db
::
table
(
'a_agents'
)
->
field
(
'name,store_id,phone'
)
->
where
(
'id'
,
$v
[
'agents_id'
])
->
find
();
// $store = new AStore();
// $shop_name = $store->getStoreById($agents_data['store_id']);
// $result[$k]['agents_name'] = $shop_name['district_name'].'-'. $agents_data['name'].'-'.$agents_data['phone'];
$result
[
$k
][
'agents_name'
]
=
'(经纪人)'
.
$agents_data
[
'name'
]
.
'-'
.
$agents_data
[
'phone'
];
}
if
(
$v
->
users_id
)
{
$user_data
=
Db
::
table
(
'u_users'
)
->
field
(
'user_name,user_phone'
)
->
where
(
'id'
,
$v
->
users_id
)
->
find
();
$user_data
[
'user_name'
]
=
empty
(
$user_data
[
'user_name'
])
?
'?.?'
:
$user_data
[
'user_name'
];
$result
[
$k
][
'user_name'
]
=
$user_data
[
'user_name'
]
.
'-'
.
substr_replace
(
$user_data
[
'user_phone'
],
'****'
,
3
,
4
);
$where_follow
[
'user_id'
]
=
$v
->
users_id
;
$where_follow
[
'type'
]
=
0
;
$where_follow
[
'agent_id'
]
=
$v
[
'agents_id'
];
$result
[
$k
][
'content'
]
=
Db
::
table
(
'u_phone_follow_up'
)
->
where
(
$where_follow
)
->
order
(
'id DESC'
)
->
value
(
'content'
);
}
else
{
$result
[
$k
][
'user_nick'
]
=
""
;
$result
[
$k
][
'content'
]
=
""
;
$result
[
$k
][
'user_name'
]
=
substr_replace
(
$v
[
'peer_no'
],
'****'
,
3
,
4
);
unset
(
$data
[
$k
][
'peer_no'
]);
}
if
(
$v
->
voice_file
)
{
$result
[
$k
][
'voice_file'
]
=
'http://file.tonglianjituan.com/static/voice/'
.
$v
->
voice_file
;
}
else
{
$result
[
$k
][
'voice_file'
]
=
""
;
}
$result
[
$k
][
'time'
]
=
$v
->
time
;
//主叫收费
if
(
$v
->
call_type
==
0
)
{
if
(
$v
->
time
>
0
)
{
if
(
$v
->
time
<=
60
)
{
$time
=
1
;
//不足一分钟按一分钟
}
else
{
$remainder
=
$v
->
time
%
60
;
$time
=
0
;
if
(
$remainder
!=
0
)
{
$time
+=
1
;
}
$time
+=
floor
(
$v
->
time
/
60
);
}
$result
[
$k
][
'price'
]
=
$time
*
0.06
+
$time
*
0.05
;
//通话 0.06元/分,录音 0.05元/分
}
else
{
$result
[
$k
][
'price'
]
=
0
;
}
}
else
{
$result
[
$k
][
'price'
]
=
0
;
}
if
(
empty
(
$v
[
'call_time'
]))
{
$result
[
$k
][
'call_time'
]
=
$v
[
'create_time'
];
}
}
return
$result
;
}
}
/**
/**
...
...
application/model/UPhoneFollowPp.php
View file @
5bc1b2a2
...
@@ -254,7 +254,7 @@ class UPhoneFollowPp extends BaseModel
...
@@ -254,7 +254,7 @@ class UPhoneFollowPp extends BaseModel
->
count
();
->
count
();
}
}
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'asc'
)
{
public
function
getUserFollowKey
(
$field
,
$where
,
$order
=
'
id
asc'
)
{
return
$this
->
UPhoneFollowPp
->
where
(
$where
)
return
$this
->
UPhoneFollowPp
->
where
(
$where
)
->
order
(
$order
)
->
order
(
$order
)
->
value
(
$field
);
->
value
(
$field
);
...
...
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