|
@@ -394,36 +394,6 @@ namespace DataSharing.Application.Receivers
|
|
|
await FileDataAsync(dto.FileJson, dto.ProvinceNo, data.CliengGuid, EMaterialType.Acceptance, data.AreaCode, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- //再次推送通话记录
|
|
|
- if (pushdto.TrCallRecordDto is not null)
|
|
|
- {
|
|
|
- var dataCall = _mapper.Map<SubmitCaseRecordInfo>(pushdto.TrCallRecordDto);
|
|
|
- dataCall.AreaCode = dto.AreaCode.Length > 6 ? dto.AreaCode.Substring(0, 6) : dto.AreaCode;
|
|
|
- dataCall.CaseSerial = dto.ProvinceNo;
|
|
|
- if (string.IsNullOrEmpty(dataCall.AccordUrl))
|
|
|
- dataCall.AccordUrl = "";
|
|
|
-
|
|
|
- //处理通话记录时间
|
|
|
- SetCallTime(dataCall);
|
|
|
-
|
|
|
- var validator = new SubmitCaseRecordInfoValidator();
|
|
|
- var validResult = await validator.ValidateAsync(dataCall, cancellationToken);
|
|
|
- if (!validResult.IsValid)
|
|
|
- throw new UserFriendlyException(string.Join(',', validResult.Errors.Select(d => d.ErrorMessage)));
|
|
|
- #region 处理请求参数
|
|
|
- var requestCall = new ProvinceListRequest<SubmitCaseRecordInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
- requestCall.SetData(new List<SubmitCaseRecordInfo>() { dataCall });
|
|
|
- var jsonDataCall = requestCall.ToString();
|
|
|
- jsonDataCall = jsonDataCall.Replace("0001-01-01 00:00:00", "");
|
|
|
- var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
- //将待推送数据写入待推送表
|
|
|
- var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: pushdto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
-
|
|
|
- //本地保存通话记录数据
|
|
|
- await InitTelCallData(pushdto.TrCallRecordDto, dto.ProvinceNo, taskId, cancellationToken);
|
|
|
- #endregion
|
|
|
- }
|
|
|
-
|
|
|
//推送当前办理信息
|
|
|
await SubmitCaseProcessFlowAsync(new OrderFlowDto { Order = pushdto.Order, WorkflowTrace = pushdto.WorkflowTrace, ExpiredTimeChanged = false }, cancellationToken);
|
|
|
|
|
@@ -491,6 +461,41 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
await _dsOrderRepository.UpdateAsync(dataOrder, cancellationToken);
|
|
|
}
|
|
|
+
|
|
|
+ //再次推送通话记录
|
|
|
+ if (pushdto.TrCallRecordDto is not null)
|
|
|
+ {
|
|
|
+ var tellCall = await _dsTelCallRepository.AnyAsync(p => p.CallId == pushdto.TrCallRecordDto.CallAccept, cancellationToken);
|
|
|
+ if (pushdto.TrCallRecordDto.OnState == EOnState.NoOn && !tellCall)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var dataCall = _mapper.Map<SubmitCaseRecordInfo>(pushdto.TrCallRecordDto);
|
|
|
+ dataCall.AreaCode = dto.AreaCode.Length > 6 ? dto.AreaCode.Substring(0, 6) : dto.AreaCode;
|
|
|
+ dataCall.CaseSerial = dto.ProvinceNo;
|
|
|
+ if (string.IsNullOrEmpty(dataCall.AccordUrl))
|
|
|
+ dataCall.AccordUrl = "";
|
|
|
+
|
|
|
+ //处理通话记录时间
|
|
|
+ SetCallTime(dataCall);
|
|
|
+
|
|
|
+ var validator = new SubmitCaseRecordInfoValidator();
|
|
|
+ var validResult = await validator.ValidateAsync(dataCall, cancellationToken);
|
|
|
+ if (!validResult.IsValid)
|
|
|
+ throw new UserFriendlyException(string.Join(',', validResult.Errors.Select(d => d.ErrorMessage)));
|
|
|
+ #region 处理请求参数
|
|
|
+ var requestCall = new ProvinceListRequest<SubmitCaseRecordInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
+ requestCall.SetData(new List<SubmitCaseRecordInfo>() { dataCall });
|
|
|
+ var jsonDataCall = requestCall.ToString();
|
|
|
+ jsonDataCall = jsonDataCall.Replace("0001-01-01 00:00:00", "");
|
|
|
+ var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: pushdto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
+
|
|
|
+ //本地保存通话记录数据
|
|
|
+ await InitTelCallData(pushdto.TrCallRecordDto, dto.ProvinceNo, taskId, cancellationToken);
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -649,36 +654,6 @@ namespace DataSharing.Application.Receivers
|
|
|
await SubmitCaseResultAsync(dto, cancellationToken);
|
|
|
}
|
|
|
|
|
|
- //再次推送通话记录
|
|
|
- if (dto.TrCallRecordDto is not null)
|
|
|
- {
|
|
|
- var dataCall = _mapper.Map<SubmitCaseRecordInfo>(dto.TrCallRecordDto);
|
|
|
- dataCall.AreaCode = dto.Order.AreaCode.Length > 6 ? dto.Order.AreaCode.Substring(0, 6) : dto.Order.AreaCode;
|
|
|
- dataCall.CaseSerial = dto.Order.ProvinceNo;
|
|
|
- if (string.IsNullOrEmpty(dataCall.AccordUrl))
|
|
|
- dataCall.AccordUrl = "";
|
|
|
-
|
|
|
- //处理通话记录时间
|
|
|
- SetCallTime(dataCall);
|
|
|
-
|
|
|
- var validator = new SubmitCaseRecordInfoValidator();
|
|
|
- var validResult = await validator.ValidateAsync(dataCall, cancellationToken);
|
|
|
- if (!validResult.IsValid)
|
|
|
- throw new UserFriendlyException(string.Join(',', validResult.Errors.Select(d => d.ErrorMessage)));
|
|
|
- #region 处理请求参数
|
|
|
- var requestCall = new ProvinceListRequest<SubmitCaseRecordInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
- requestCall.SetData(new List<SubmitCaseRecordInfo>() { dataCall });
|
|
|
- var jsonDataCall = requestCall.ToString();
|
|
|
- jsonDataCall = jsonDataCall.Replace("0001-01-01 00:00:00", "");
|
|
|
- var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
- //将待推送数据写入待推送表
|
|
|
- var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
-
|
|
|
- //本地保存通话记录数据
|
|
|
- await InitTelCallData(dto.TrCallRecordDto, dto.Order.ProvinceNo, taskId, cancellationToken);
|
|
|
- #endregion
|
|
|
- }
|
|
|
-
|
|
|
//修改工单基础数据
|
|
|
var dataOrder = await _dsOrderRepository.GetAsync(p => p.OrderId == dto.Order.Id, cancellationToken);
|
|
|
if (dataOrder != null)
|
|
@@ -729,6 +704,42 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
await _dsOrderRepository.AddAsync(dataOrder, cancellationToken);
|
|
|
}
|
|
|
+
|
|
|
+ //再次推送通话记录
|
|
|
+ if (dto.TrCallRecordDto is not null)
|
|
|
+ {
|
|
|
+ var tellCall = await _dsTelCallRepository.AnyAsync(p => p.CallId == dto.TrCallRecordDto.CallAccept, cancellationToken);
|
|
|
+ if (dto.TrCallRecordDto.OnState == EOnState.NoOn && !tellCall)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var dataCall = _mapper.Map<SubmitCaseRecordInfo>(dto.TrCallRecordDto);
|
|
|
+ dataCall.AreaCode = dto.Order.AreaCode.Length > 6 ? dto.Order.AreaCode.Substring(0, 6) : dto.Order.AreaCode;
|
|
|
+ dataCall.CaseSerial = dto.Order.ProvinceNo;
|
|
|
+ if (string.IsNullOrEmpty(dataCall.AccordUrl))
|
|
|
+ dataCall.AccordUrl = "";
|
|
|
+
|
|
|
+ //处理通话记录时间
|
|
|
+ SetCallTime(dataCall);
|
|
|
+
|
|
|
+ var validator = new SubmitCaseRecordInfoValidator();
|
|
|
+ var validResult = await validator.ValidateAsync(dataCall, cancellationToken);
|
|
|
+ if (!validResult.IsValid)
|
|
|
+ throw new UserFriendlyException(string.Join(',', validResult.Errors.Select(d => d.ErrorMessage)));
|
|
|
+ #region 处理请求参数
|
|
|
+ var requestCall = new ProvinceListRequest<SubmitCaseRecordInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
+ requestCall.SetData(new List<SubmitCaseRecordInfo>() { dataCall });
|
|
|
+ var jsonDataCall = requestCall.ToString();
|
|
|
+ jsonDataCall = jsonDataCall.Replace("0001-01-01 00:00:00", "");
|
|
|
+ var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
+
|
|
|
+ //本地保存通话记录数据
|
|
|
+ await InitTelCallData(dto.TrCallRecordDto, dto.Order.ProvinceNo, taskId, cancellationToken);
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -803,6 +814,12 @@ namespace DataSharing.Application.Receivers
|
|
|
[CapSubscribe(Hotline.Share.Mq.EventNames.HotlineCallConnectWithOrder)]
|
|
|
public async Task SubmitCaseRecordOrderAsync(PublishCallRecrodDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
+ var tellCall = await _dsTelCallRepository.AnyAsync(p => p.CallId == dto.TrCallRecordDto.CallAccept, cancellationToken);
|
|
|
+ if (dto.TrCallRecordDto.OnState == EOnState.NoOn && !tellCall)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
var data = _mapper.Map<SubmitCaseRecordInfo>(dto.TrCallRecordDto);
|
|
|
if (dto.Order != null)
|
|
|
{
|