|
@@ -312,6 +312,9 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
}
|
|
|
|
|
|
+ //推送当前办理信息
|
|
|
+ await SubmitCaseProcessFlowAsync(new OrderFlowDto { Order = pushdto.Order, WorkflowTrace = pushdto.WorkflowTrace, ExpiredTimeChanged = false }, cancellationToken);
|
|
|
+
|
|
|
//本地保存工单基础数据
|
|
|
if (!await _dsOrderRepository.AnyAsync(p => p.OrderId == dto.Id, cancellationToken))
|
|
|
{
|
|
@@ -380,84 +383,23 @@ namespace DataSharing.Application.Receivers
|
|
|
[CapSubscribe(Hotline.Share.Mq.EventNames.HotlineOrderFlowHandled)]
|
|
|
public async Task SubmitCaseProcessAsync(OrderFlowDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
- //判断是否是热线中心
|
|
|
- if (!string.IsNullOrEmpty(dto.Order.ActualHandleOrgCode))
|
|
|
- {
|
|
|
- if (dto.Order.ActualHandleOrgCode.Substring(0, 3) == "001")
|
|
|
- {
|
|
|
- dto.Order.ActualHandleOrgName = "热线中心";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- #region 写本地办理数据-用于查询办理流程
|
|
|
- //写本地办理数据-用于查询办理流程
|
|
|
- var orderWorkFlow = _mapper.Map<DsOrderWorkFlow>(dto.WorkflowTrace);
|
|
|
- orderWorkFlow.OrderId = dto.Order.Id;
|
|
|
- _logger.LogInformation("流程转换前数据", System.Text.Json.JsonSerializer.Serialize(dto));
|
|
|
- _logger.LogInformation("流程转换后数据", System.Text.Json.JsonSerializer.Serialize(orderWorkFlow));
|
|
|
-
|
|
|
- await _dataOrderWorkFlowRepository.AddAsync(orderWorkFlow, cancellationToken);
|
|
|
- #endregion
|
|
|
-
|
|
|
- var configProvince = _channelConfigurationManager.GetConfigurationProvince();
|
|
|
-
|
|
|
- //省上下来的工单走协同的接口
|
|
|
- if (dto.Order.Source == ESource.ProvinceStraight && dto.Order.IsProvince)
|
|
|
- {
|
|
|
-
|
|
|
- var data = _mapper.Map<GetCaseProcessReceiveInfo>(dto);
|
|
|
- data.TacheName = "70:" + data.DeptName;
|
|
|
-
|
|
|
- #region 处理请求参数
|
|
|
- var request = new ProvinceRequest<GetCaseProcessReceiveInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
- request.SetData(data);
|
|
|
- var jsonData = request.ToString();
|
|
|
- var url = configProvince.XieTong + "get_case_process_receive";
|
|
|
- #endregion
|
|
|
-
|
|
|
- //将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetCaseProcessReceive", "get_case_process_receive", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
-
|
|
|
- //处理附件
|
|
|
- await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
|
- }
|
|
|
- else //如果不是省上派下来的工单
|
|
|
+ await SubmitCaseProcessFlowAsync(dto, cancellationToken);
|
|
|
+ //期满时间变更,重新推送数据
|
|
|
+ if (dto.ExpiredTimeChanged || dto.Order.ActualHandleStepName == "话务部")
|
|
|
{
|
|
|
- //期满时间变更,重新推送数据
|
|
|
- if (dto.ExpiredTimeChanged)
|
|
|
- {
|
|
|
- var submitCaseInfo = await InitDataAsync(dto.Order, cancellationToken);
|
|
|
-
|
|
|
- #region 处理请求参数
|
|
|
- var requestSubmitCaseInfo = new ProvinceListRequest<SubmitCaseInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
- requestSubmitCaseInfo.SetData(new List<SubmitCaseInfo>() { submitCaseInfo });
|
|
|
- var jsonDataSubmitCaseInfo = requestSubmitCaseInfo.ToString();
|
|
|
- var urlSubmitCaseInfo = configProvince.HuiJu + "submit_case_info";
|
|
|
- #endregion
|
|
|
-
|
|
|
- //将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonDataSubmitCaseInfo, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
- }
|
|
|
- //本地工单走市州接口
|
|
|
- var data = _mapper.Map<SubmitCaseProcessInfo>(dto);
|
|
|
- data.TacheName = "70:" + data.DeptName;
|
|
|
+ var submitCaseInfo = await InitDataAsync(dto.Order, cancellationToken);
|
|
|
|
|
|
#region 处理请求参数
|
|
|
- var requestSubmitCaseProcessInfo = new ProvinceListRequest<SubmitCaseProcessInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
- requestSubmitCaseProcessInfo.SetData(new List<SubmitCaseProcessInfo>() { data });
|
|
|
- var jsonDataSubmitCaseProcessInfo = requestSubmitCaseProcessInfo.ToString();
|
|
|
- var urlSubmitCaseProcessInfo = configProvince.HuiJu + "submit_case_process";
|
|
|
+ var configProvince = _channelConfigurationManager.GetConfigurationProvince();
|
|
|
+ var requestSubmitCaseInfo = new ProvinceListRequest<SubmitCaseInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
+ requestSubmitCaseInfo.SetData(new List<SubmitCaseInfo>() { submitCaseInfo });
|
|
|
+ var jsonDataSubmitCaseInfo = requestSubmitCaseInfo.ToString();
|
|
|
+ var urlSubmitCaseInfo = configProvince.HuiJu + "submit_case_info";
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", jsonDataSubmitCaseProcessInfo, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
-
|
|
|
- //处理附件
|
|
|
- await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonDataSubmitCaseInfo, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
}
|
|
|
-
|
|
|
- //这里判断是否需要往其他平台推送数据
|
|
|
- await OrderDispatchAsync(dto, cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -490,6 +432,10 @@ namespace DataSharing.Application.Receivers
|
|
|
[CapSubscribe(Hotline.Share.Mq.EventNames.HotlineOrderFiled)]
|
|
|
public async Task OrderFiledAsync(OrderFlowDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
+ //推送办理记录
|
|
|
+ dto.ExpiredTimeChanged = false;
|
|
|
+ await SubmitCaseProcessFlowAsync(dto, cancellationToken);
|
|
|
+
|
|
|
//判断是否是热线中心
|
|
|
if (!string.IsNullOrEmpty(dto.Order.ActualHandleOrgCode))
|
|
|
{
|
|
@@ -1049,6 +995,78 @@ namespace DataSharing.Application.Receivers
|
|
|
#region 私有方法
|
|
|
|
|
|
#region 省数据处理
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 热线工单办理---服务工单处理/服务工单交办处理过程-
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private async Task SubmitCaseProcessFlowAsync(OrderFlowDto dto, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ //判断是否是热线中心
|
|
|
+ if (!string.IsNullOrEmpty(dto.Order.ActualHandleOrgCode))
|
|
|
+ {
|
|
|
+ if (dto.Order.ActualHandleOrgCode.Substring(0, 3) == "001")
|
|
|
+ {
|
|
|
+ dto.Order.ActualHandleOrgName = "热线中心";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #region 写本地办理数据-用于查询办理流程
|
|
|
+ //写本地办理数据-用于查询办理流程
|
|
|
+ var orderWorkFlow = _mapper.Map<DsOrderWorkFlow>(dto.WorkflowTrace);
|
|
|
+ orderWorkFlow.OrderId = dto.Order.Id;
|
|
|
+
|
|
|
+ await _dataOrderWorkFlowRepository.AddAsync(orderWorkFlow, cancellationToken);
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ var configProvince = _channelConfigurationManager.GetConfigurationProvince();
|
|
|
+
|
|
|
+ //省上下来的工单走协同的接口
|
|
|
+ if (dto.Order.Source == ESource.ProvinceStraight && dto.Order.IsProvince)
|
|
|
+ {
|
|
|
+
|
|
|
+ var data = _mapper.Map<GetCaseProcessReceiveInfo>(dto);
|
|
|
+ data.TacheName = "70:" + data.DeptName;
|
|
|
+
|
|
|
+ #region 处理请求参数
|
|
|
+ var request = new ProvinceRequest<GetCaseProcessReceiveInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
+ request.SetData(data);
|
|
|
+ var jsonData = request.ToString();
|
|
|
+ var url = configProvince.XieTong + "get_case_process_receive";
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ await InitPushDataAsync("GetCaseProcessReceive", "get_case_process_receive", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+
|
|
|
+ //处理附件
|
|
|
+ await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
|
+ }
|
|
|
+ else //如果不是省上派下来的工单
|
|
|
+ {
|
|
|
+ //本地工单走市州接口
|
|
|
+ var data = _mapper.Map<SubmitCaseProcessInfo>(dto);
|
|
|
+ data.TacheName = "70:" + data.DeptName;
|
|
|
+
|
|
|
+ #region 处理请求参数
|
|
|
+ var requestSubmitCaseProcessInfo = new ProvinceListRequest<SubmitCaseProcessInfo>(configProvince.ClientId, configProvince.ClientSecret);
|
|
|
+ requestSubmitCaseProcessInfo.SetData(new List<SubmitCaseProcessInfo>() { data });
|
|
|
+ var jsonDataSubmitCaseProcessInfo = requestSubmitCaseProcessInfo.ToString();
|
|
|
+ var urlSubmitCaseProcessInfo = configProvince.HuiJu + "submit_case_process";
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", jsonDataSubmitCaseProcessInfo, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+
|
|
|
+ //处理附件
|
|
|
+ await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
+ //这里判断是否需要往其他平台推送数据
|
|
|
+ await OrderDispatchAsync(dto, cancellationToken);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 派单是判断需要往第三方推送数据
|
|
|
/// </summary>
|