|
@@ -3890,6 +3890,53 @@ public class OrderController : BaseController
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //处理回访录音
|
|
|
+ if (dto.OrderVisits != null && dto.OrderVisits.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var item in dto.OrderVisits)
|
|
|
+ {
|
|
|
+ //var recordingFileUrl = "";
|
|
|
+ //var recordingBaseAddress = "";
|
|
|
+ //var recordingAbsolutePath = "";
|
|
|
+ //var aiVisitVoiceBaseUrl = "";
|
|
|
+ if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.TianRun)
|
|
|
+ {
|
|
|
+ var callRecord = await _callApplication.GetTianrunCallAsync(item.CallId, HttpContext.RequestAborted);
|
|
|
+ if (callRecord != null)
|
|
|
+ {
|
|
|
+ item.RecordingFileUrl = callRecord.RecordingFileUrl;
|
|
|
+ item.RecordingBaseAddress = callRecord.RecordingBaseAddress;
|
|
|
+ item.RecordingAbsolutePath = callRecord.RecordingAbsolutePath;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.XingTang)
|
|
|
+ {
|
|
|
+ CallNative? call = null;
|
|
|
+ if (item.CallId == null && item.VisitTime.HasValue)
|
|
|
+ {
|
|
|
+ call = await _callApplication.GetCallByTimeAndToNoAsync(dto.Contact, item.VisitTime.Value,
|
|
|
+ HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
+ call = await _callApplication.GetCallAsync(item.CallId, HttpContext.RequestAborted);
|
|
|
+ if (call is not null)
|
|
|
+ {
|
|
|
+ if (call.AudioFile.IsNullOrEmpty())
|
|
|
+ {
|
|
|
+ call = await _callApplication.GetCallByCallNoAsync(call.CallNo, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (call is not null)
|
|
|
+ {
|
|
|
+ item.RecordingFileUrl = call.AudioFile;
|
|
|
+ item.RecordingBaseAddress = call.AudioFile;
|
|
|
+ item.RecordingAbsolutePath = call.AudioFile;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return _sessionContext.OrgIsCenter ? dto : dto.DataMask();
|
|
|
}
|
|
|
|