|
|
@@ -28,16 +28,17 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.CallCenter
|
|
28
|
28
|
private readonly ICall_CallRecordsRepository busCallRecordsRepository;
|
|
29
|
29
|
private readonly ICDRRepository busCdrRepository;
|
|
30
|
30
|
private readonly ISys_SystemConfigRepository busSystemConfigRepository;
|
|
31
|
|
-
|
|
32
|
|
- public CallFunctionController(ISys_SystemConfigRepository _busSystemConfigRepository,ICDRRepository _busCdrRepository,ICall_CallRecordsRepository _busCallRecordsRepository,IConfiguration _configuration, ISys_MobileDataRepository _busMobileDataRepository)
|
|
|
31
|
+ private readonly ICus_VipInfoRepository _cus_vip_infoRepository;//客户
|
|
|
32
|
+ public CallFunctionController(ISys_SystemConfigRepository _busSystemConfigRepository,ICDRRepository _busCdrRepository,ICall_CallRecordsRepository _busCallRecordsRepository,IConfiguration _configuration, ISys_MobileDataRepository _busMobileDataRepository, ICus_VipInfoRepository cus_vip_infoRepository)
|
|
33
|
33
|
{
|
|
34
|
34
|
busSystemConfigRepository = _busSystemConfigRepository;
|
|
35
|
35
|
busCdrRepository = _busCdrRepository;
|
|
36
|
36
|
busCallRecordsRepository = _busCallRecordsRepository;
|
|
37
|
37
|
config = _configuration;
|
|
38
|
38
|
busMobileDataRepository = _busMobileDataRepository;
|
|
|
39
|
+ _cus_vip_infoRepository = cus_vip_infoRepository;
|
|
39
|
40
|
|
|
40
|
|
- }
|
|
|
41
|
+ }
|
|
41
|
42
|
|
|
42
|
43
|
/// <summary>
|
|
43
|
44
|
/// 电话归属地查询
|
|
|
@@ -148,13 +149,38 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.CallCenter
|
|
148
|
149
|
modelRecord.ActionID = modelcdr.action_id;
|
|
149
|
150
|
modelRecord.TalkStartTime = modelcdr.answer_time;
|
|
150
|
151
|
modelRecord.Callee = modelcdr.callee;
|
|
151
|
|
- modelRecord.UserCode = modelcdr.callee_agent;
|
|
|
152
|
+ if (modelcdr.call_type==0)
|
|
|
153
|
+ {
|
|
|
154
|
+ string tel = modelcdr.caller.TrimStart('0');
|
|
|
155
|
+ modelRecord.UserCode = modelcdr.callee_agent;
|
|
|
156
|
+ var cus = await _cus_vip_infoRepository.GetListALL(x => x.F_State == 1 && x.F_Phone
|
|
|
157
|
+ == modelcdr.caller || x.F_Phone
|
|
|
158
|
+ == tel);
|
|
|
159
|
+ if (cus!=null )
|
|
|
160
|
+ {
|
|
|
161
|
+ modelRecord.CusCode = cus.FirstOrDefault ().F_Name ;
|
|
|
162
|
+ modelRecord.CusId = cus.FirstOrDefault().F_ID ;
|
|
|
163
|
+ }
|
|
|
164
|
+ }
|
|
|
165
|
+ else
|
|
|
166
|
+ {
|
|
|
167
|
+ modelRecord.UserCode = modelcdr.caller_agent;
|
|
|
168
|
+ string tel = modelcdr.callee.TrimStart('0');
|
|
|
169
|
+ modelRecord.UserCode = modelcdr.callee_agent;
|
|
|
170
|
+ var cus = await _cus_vip_infoRepository.GetListALL(x => x.F_State == 1 && x.F_Phone
|
|
|
171
|
+ == modelcdr.caller || x.F_Phone
|
|
|
172
|
+ == tel);
|
|
|
173
|
+ if (cus != null)
|
|
|
174
|
+ {
|
|
|
175
|
+ modelRecord.CusCode = cus.FirstOrDefault().F_Name;
|
|
|
176
|
+ modelRecord.CusId = cus.FirstOrDefault().F_ID;
|
|
|
177
|
+ }
|
|
|
178
|
+ }
|
|
152
|
179
|
modelRecord.Caller = modelcdr.caller;
|
|
153
|
|
- modelRecord.CusCode = modelcdr.caller_agent;
|
|
154
|
|
- modelRecord.CusId = modelcdr.caller_agent;
|
|
155
|
180
|
modelRecord.CallType = modelcdr.call_type;
|
|
156
|
181
|
modelRecord.BeginTime = modelcdr.create_time;
|
|
157
|
182
|
modelRecord.EndTime = modelcdr.end_time;
|
|
|
183
|
+ modelRecord.CallState = modelcdr.is_answer;
|
|
158
|
184
|
// modelcdr.hangup_cause;挂机原因不赋值 HangUpReason
|
|
159
|
185
|
// modelcdr.leave_path 留言 赋值给了FilePath
|
|
160
|
186
|
modelRecord.IvrEndTime = modelcdr.hangup_time;
|