|
@@ -23,7 +23,6 @@ using Hotline.Share.Enums.FlowEngine;
|
|
|
using Hotline.Share.Enums.Order;
|
|
|
using MapsterMapper;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
-using StackExchange.Redis;
|
|
|
using System.Security.Cryptography;
|
|
|
using System.Text;
|
|
|
using XF.Domain.Cache;
|
|
@@ -51,6 +50,7 @@ namespace DataSharing.Application.Receivers
|
|
|
private readonly IRepository<DsOrderVisit> _dsOrderVisitRepository;
|
|
|
private readonly IRepository<DsGetCaseBackApply> _getCaseBackApplyRepository;
|
|
|
private readonly ICapPublisher _capPublisher;
|
|
|
+ private readonly IRepository<DsTelCall> _dsTelCallRepository;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -69,6 +69,7 @@ namespace DataSharing.Application.Receivers
|
|
|
/// <param name="dsOrderVisitRepository"></param>
|
|
|
/// <param name="getCaseBackApplyRepository"></param>
|
|
|
/// <param name="capPublisher"></param>
|
|
|
+ /// <param name="dsTelCallRepository"></param>
|
|
|
public ProvinceReceiver(IMapper mapper, ILogger<ProvinceReceiver> logger,
|
|
|
IRepository<DsPoliceSendChainAlarmDs> policeSendChainAlarmDsRepository,
|
|
|
IRepository<DsPoliceSendChainDealDs> policeSendChainDealDsRepository,
|
|
@@ -81,7 +82,8 @@ namespace DataSharing.Application.Receivers
|
|
|
ITypedCache<MissedCallModelDto> missedCallModelCache,
|
|
|
IRepository<DsOrderVisit> dsOrderVisitRepository,
|
|
|
IRepository<DsGetCaseBackApply> getCaseBackApplyRepository,
|
|
|
- ICapPublisher capPublisher)
|
|
|
+ ICapPublisher capPublisher,
|
|
|
+ IRepository<DsTelCall> dsTelCallRepository)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_logger = logger;
|
|
@@ -97,6 +99,7 @@ namespace DataSharing.Application.Receivers
|
|
|
_dsOrderVisitRepository = dsOrderVisitRepository;
|
|
|
_getCaseBackApplyRepository = getCaseBackApplyRepository;
|
|
|
_capPublisher = capPublisher;
|
|
|
+ _dsTelCallRepository = dsTelCallRepository;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -178,7 +181,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetCaseBackApply", "get_case_back_apply", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetCaseBackApply", "get_case_back_apply", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.SendBack.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken: cancellationToken);
|
|
@@ -217,7 +220,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SendSuperviseProcessInfo", "send_supervise_process_info", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SendSuperviseProcessInfo", "send_supervise_process_info", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -249,7 +252,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SendSuperviseResultInfo", "send_supervise_result_info", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SendSuperviseResultInfo", "send_supervise_result_info", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.Supervise.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Supervise, dto.Order.AreaCode, cancellationToken);
|
|
|
|
|
@@ -290,7 +293,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("ScreenCaseInfoSend", "screen_case_info_send", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("ScreenCaseInfoSend", "screen_case_info_send", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.Screen.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken: cancellationToken);
|
|
|
}
|
|
@@ -322,7 +325,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("DelayCaseInfoSend", "delay_case_info_send", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("DelayCaseInfoSend", "delay_case_info_send", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.FileJson, data.CaseSerial, data.CliengGuid, EMaterialType.Process, data.AreaCode, cancellationToken);
|
|
@@ -343,11 +346,10 @@ namespace DataSharing.Application.Receivers
|
|
|
var dto = pushdto.Order;
|
|
|
|
|
|
var configProvince = _channelConfigurationManager.GetConfigurationProvince();
|
|
|
-
|
|
|
//如果不是省上派下来的工单,需要汇聚到省上
|
|
|
if (dto is not null && !dto.IsProvince)
|
|
|
{
|
|
|
- var data = await InitDataAsync(dto, cancellationToken);
|
|
|
+ var data = InitDataAsync(dto);
|
|
|
var validator = new SubmitCaseInfoValidator();
|
|
|
var validResult = await validator.ValidateAsync(data, cancellationToken);
|
|
|
if (!validResult.IsValid)
|
|
@@ -361,7 +363,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, GenerationTime: pushdto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.FileJson, dto.ProvinceNo, data.CliengGuid, EMaterialType.Acceptance, data.AreaCode, cancellationToken);
|
|
|
}
|
|
@@ -386,7 +388,10 @@ namespace DataSharing.Application.Receivers
|
|
|
var jsonDataCall = requestCall.ToString();
|
|
|
var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, cancellationToken: cancellationToken);
|
|
|
+ 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
|
|
|
}
|
|
|
|
|
@@ -420,6 +425,8 @@ namespace DataSharing.Application.Receivers
|
|
|
AllDuration = 0,
|
|
|
IsProvince = dto.IsProvince,
|
|
|
HandleState = "办理中",
|
|
|
+ StartTime = dto.StartTime,
|
|
|
+ CallId = dto.CallId,
|
|
|
FileJson = _mapper.Map<List<FileJson>>(dto.FileJson)
|
|
|
};
|
|
|
|
|
@@ -438,7 +445,7 @@ namespace DataSharing.Application.Receivers
|
|
|
//如果不是省上派下来的工单,需要汇聚到省上
|
|
|
if (!dto.IsProvince)
|
|
|
{
|
|
|
- var data = await InitDataAsync(dto, cancellationToken);
|
|
|
+ var data = InitDataAsync(dto);
|
|
|
var validator = new SubmitCaseInfoValidator();
|
|
|
var validResult = await validator.ValidateAsync(data, cancellationToken);
|
|
|
if (!validResult.IsValid)
|
|
@@ -452,7 +459,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, GenerationTime: dto.StartTime, cancellationToken: cancellationToken);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -468,7 +475,7 @@ namespace DataSharing.Application.Receivers
|
|
|
//期满时间变更或者办理节点为话务部,重新推送数据
|
|
|
if (dto.ExpiredTimeChanged || dto.Order.ActualHandleStepName == "话务部")
|
|
|
{
|
|
|
- var submitCaseInfo = await InitDataAsync(dto.Order, cancellationToken);
|
|
|
+ var submitCaseInfo = InitDataAsync(dto.Order);
|
|
|
var validator = new SubmitCaseInfoValidator();
|
|
|
var validResult = await validator.ValidateAsync(submitCaseInfo, cancellationToken);
|
|
|
if (!validResult.IsValid)
|
|
@@ -482,7 +489,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonDataSubmitCaseInfo, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonDataSubmitCaseInfo, pathType: EPathType.HuiJu, taskPriority: 10, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
//如果话务部派出去,再次上传附件
|
|
|
if (dto.Order.ActualHandleStepName == "话务部")
|
|
|
{
|
|
@@ -526,7 +533,7 @@ namespace DataSharing.Application.Receivers
|
|
|
SubmitCaseInfo data = new();
|
|
|
if (dto != null && dto.Order != null && !dto.Order.IsProvince)
|
|
|
{
|
|
|
- data = await InitDataAsync(dto.Order, cancellationToken);
|
|
|
+ data = InitDataAsync(dto.Order);
|
|
|
var validator = new SubmitCaseInfoValidator();
|
|
|
var validResult = await validator.ValidateAsync(data, cancellationToken);
|
|
|
if (!validResult.IsValid)
|
|
@@ -554,7 +561,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 10, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//推送服务工单结果信息-组装110数据
|
|
|
await SubmitCaseResultAsync(dto, cancellationToken);
|
|
@@ -580,7 +587,10 @@ namespace DataSharing.Application.Receivers
|
|
|
var jsonDataCall = requestCall.ToString();
|
|
|
var urlCall = configProvince.HuiJu + "submit_case_record";
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonDataCall, pathType: EPathType.HuiJu, taskPriority: 20, cancellationToken: cancellationToken);
|
|
|
+ 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
|
|
|
}
|
|
|
|
|
@@ -626,6 +636,8 @@ namespace DataSharing.Application.Receivers
|
|
|
ActualHandleOrgCode = dto.WorkflowTrace.HandlerOrgAreaCode,
|
|
|
ActualOpinion = string.IsNullOrEmpty(dto.WorkflowTrace.Opinion) == true ? order.ActualOpinion : dto.WorkflowTrace.Opinion,
|
|
|
ActualHandleTime = dto.WorkflowTrace.HandleTime,
|
|
|
+ StartTime = order.StartTime,
|
|
|
+ CallId = order.CallId,
|
|
|
FileJson = _mapper.Map<List<FileJson>>(order.FileJson)
|
|
|
};
|
|
|
|
|
@@ -642,7 +654,7 @@ namespace DataSharing.Application.Receivers
|
|
|
public async Task SubmitCaseRecordAsync(PublishCallRecrodDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
//验证是否需要推送未接数据
|
|
|
- if (dto != null && dto.TrCallRecordDto != null && dto.TrCallRecordDto.OnState == EOnState.NoOn)
|
|
|
+ if (dto != null && dto.TrCallRecordDto != null && dto.TrCallRecordDto.OnState == EOnState.NoOn && dto.Order == null)
|
|
|
{
|
|
|
if (!await IsPublishMissedCall(dto.TrCallRecordDto, cancellationToken))
|
|
|
return;
|
|
@@ -675,9 +687,12 @@ namespace DataSharing.Application.Receivers
|
|
|
var url = configProvince.HuiJu + "submit_case_record";
|
|
|
#endregion
|
|
|
|
|
|
+ var startTime = dto.Order == null ? dto.TrCallRecordDto.BeginIvrTime : dto.Order.StartTime;
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonData, pathType: EPathType.HuiJu, taskPriority: 20, cancellationToken: cancellationToken);
|
|
|
+ var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonData, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: startTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
+ //本地保存通话记录数据
|
|
|
+ await InitTelCallData(dto.TrCallRecordDto, data.CaseSerial, taskId, cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -715,8 +730,12 @@ namespace DataSharing.Application.Receivers
|
|
|
var url = configProvince.HuiJu + "submit_case_record";
|
|
|
#endregion
|
|
|
|
|
|
+ var startTime = dto.Order == null ? dto.TrCallRecordDto.BeginIvrTime : dto.Order.StartTime;
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonData, pathType: EPathType.HuiJu, taskPriority: 20, cancellationToken: cancellationToken);
|
|
|
+ var taskId = await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", jsonData, pathType: EPathType.HuiJu, taskPriority: 20, GenerationTime: startTime, cancellationToken: cancellationToken);
|
|
|
+
|
|
|
+ //本地保存通话记录数据
|
|
|
+ await InitTelCallData(dto.TrCallRecordDto, data.CaseSerial, taskId, cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -826,7 +845,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SendRevokeCaseInfo", "revoke_case_info", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SendRevokeCaseInfo", "revoke_case_info", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
await FileDataAsync(dto.Special.FileJson, dto.Order.ProvinceNo, dsRevoke.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
|
}
|
|
@@ -860,7 +879,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SendRemindCaseInfo", "remind_case_info", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SendRemindCaseInfo", "remind_case_info", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.Urge.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
@@ -940,7 +959,7 @@ namespace DataSharing.Application.Receivers
|
|
|
var url = configProvince.XieTong + "get_case_result_receive";
|
|
|
#endregion
|
|
|
|
|
|
- await InitPushDataAsync("GetCaseResultReceive", "get_case_result_receive", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetCaseResultReceive", "get_case_result_receive", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(null, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Result, dto.Order.AreaCode, cancellationToken);
|
|
@@ -961,7 +980,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("ZmhdCaseInfoPublic", "zmhd_case_info_public", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("ZmhdCaseInfoPublic", "zmhd_case_info_public", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1087,7 +1106,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetKnowledgeInfoSend", "get_knowledge_info_send", jsonData, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetKnowledgeInfoSend", "get_knowledge_info_send", jsonData, pathType: EPathType.HuiJu, GenerationTime: dto.CreatDate, cancellationToken: cancellationToken);
|
|
|
|
|
|
#region 处理知识库原始数据
|
|
|
//查询原有数据,如果有修改原始数据,没有直接新增
|
|
@@ -1137,7 +1156,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetKnowledgeInfoUpdate", "get_knowledge_info_update", jsonData, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetKnowledgeInfoUpdate", "get_knowledge_info_update", jsonData, pathType: EPathType.HuiJu, GenerationTime: dto.CreatDate, cancellationToken: cancellationToken);
|
|
|
|
|
|
#region 处理知识库原始数据
|
|
|
//查询原有数据,如果有修改原始数据,没有直接新增
|
|
@@ -1182,7 +1201,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetKnowledgeInfoAbandon", "get_knowledge_info_abandon", jsonData, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetKnowledgeInfoAbandon", "get_knowledge_info_abandon", jsonData, pathType: EPathType.HuiJu, GenerationTime: dto.CreatDate, cancellationToken: cancellationToken);
|
|
|
|
|
|
//知识下架删除原有原始数据
|
|
|
await _knowledgeRawDataRepository.RemoveAsync(p => p.UID == data.UID, cancellationToken: cancellationToken);
|
|
@@ -1258,7 +1277,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetCaseProcessReceive", "get_case_process_receive", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetCaseProcessReceive", "get_case_process_receive", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
@@ -1282,7 +1301,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", jsonDataSubmitCaseProcessInfo, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", jsonDataSubmitCaseProcessInfo, pathType: EPathType.HuiJu, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
@@ -1404,7 +1423,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("GetVisitInfoReceive", "get_visit_info_receive", jsonData, pathType: EPathType.XieTong, taskPriority: 5, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("GetVisitInfoReceive", "get_visit_info_receive", jsonData, pathType: EPathType.XieTong, taskPriority: 5, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
//处理附件
|
|
|
await FileDataAsync(null, data.CaseSerial, data.CliengGuid, EMaterialType.Visit, data.AreaCode, cancellationToken);
|
|
|
}
|
|
@@ -1426,7 +1445,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitVisitInfo", "submit_visit_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 5, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitVisitInfo", "submit_visit_info", jsonData, pathType: EPathType.HuiJu, taskPriority: 5, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(null, data.CaseSerial, data.CliengGuid, EMaterialType.Visit, data.AreaCode, cancellationToken);
|
|
@@ -1499,7 +1518,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseResult", "submit_case_result", jsonData, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseResult", "submit_case_result", jsonData, pathType: EPathType.HuiJu, GenerationTime: dto.Order.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
if (dto.WorkflowTrace != null && dto.WorkflowTrace.FileJson != null && dto.WorkflowTrace.FileJson.Count > 0)
|
|
@@ -1517,7 +1536,7 @@ namespace DataSharing.Application.Receivers
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- private async Task<SubmitCaseInfo> InitDataAsync(OrderDto dto, CancellationToken cancellationToken)
|
|
|
+ private SubmitCaseInfo InitDataAsync(OrderDto dto)
|
|
|
{
|
|
|
var submitCaseInfo = _mapper.Map<SubmitCaseInfo>(dto);
|
|
|
|
|
@@ -1685,7 +1704,7 @@ namespace DataSharing.Application.Receivers
|
|
|
#endregion
|
|
|
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseExtends", "submit_case_extends", jsonData, pathType: EPathType.HuiJu, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseExtends", "submit_case_extends", jsonData, pathType: EPathType.HuiJu, GenerationTime: dto.StartTime, cancellationToken: cancellationToken);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1788,7 +1807,7 @@ namespace DataSharing.Application.Receivers
|
|
|
var url = configProvince.HuiJu + "send_case_info";
|
|
|
#endregion
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SendCaseInfo", "send_case_info", jsonData, pathType: EPathType.XieTong, cancellationToken: cancellationToken);
|
|
|
+ await InitPushDataAsync("SendCaseInfo", "send_case_info", jsonData, pathType: EPathType.XieTong, GenerationTime: dto.StartTime, cancellationToken: cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.FileJson, dto.ProvinceNo, sendCaseInfoData.CliengGuid, EMaterialType.Acceptance, sendCaseInfoData.AreaCode, cancellationToken);
|
|
@@ -1835,6 +1854,7 @@ namespace DataSharing.Application.Receivers
|
|
|
foreach (var item in fileJson)
|
|
|
{
|
|
|
List<FileJson> fileJsons = new() { _mapper.Map<FileJson>(item) };
|
|
|
+
|
|
|
//待推送数据写入待推送表
|
|
|
await InitPushDataAsync("GetCaseMaterialInfo", "get_case_material_info", jsonData, pathType: EPathType.File, fileJson: fileJsons, cancellationToken: cancellationToken);
|
|
|
}
|
|
@@ -1950,6 +1970,37 @@ namespace DataSharing.Application.Receivers
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 初始化上传通话记录
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <param name="ProvinceNo"></param>
|
|
|
+ /// <param name="cancellationToken"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private async Task InitTelCallData(TrCallDto dto, string ProvinceNo, string taskId, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ var tellCall = await _dsTelCallRepository.GetAsync(p => p.CallId == dto.CallAccept, cancellationToken);
|
|
|
+ if (tellCall != null)
|
|
|
+ {
|
|
|
+ //修改
|
|
|
+ _mapper.Map(dto, tellCall);
|
|
|
+ tellCall.ProvinceNo = ProvinceNo;
|
|
|
+ tellCall.CallId = dto.CallAccept;
|
|
|
+ tellCall.TaskId = taskId;
|
|
|
+ await _dsTelCallRepository.UpdateAsync(tellCall, cancellationToken);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //新增
|
|
|
+ tellCall = new DsTelCall();
|
|
|
+ tellCall = _mapper.Map<DsTelCall>(dto);
|
|
|
+ tellCall.ProvinceNo = ProvinceNo;
|
|
|
+ tellCall.CallId = dto.CallAccept;
|
|
|
+ tellCall.TaskId = taskId;
|
|
|
+ await _dsTelCallRepository.AddAsync(tellCall, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 组装110数据
|
|
@@ -2119,11 +2170,12 @@ namespace DataSharing.Application.Receivers
|
|
|
/// <param name="taskPriority">任务优先级(0:最低级别)</param>
|
|
|
/// <param name="fileJson">附件</param>
|
|
|
/// <returns></returns>
|
|
|
- private async Task InitPushDataAsync(string taskType, string path, string request,
|
|
|
+ private async Task<string> InitPushDataAsync(string taskType, string path, string request,
|
|
|
string httpMethod = "Post",
|
|
|
EPlatformSource platformSource = EPlatformSource.Province,
|
|
|
EPathType pathType = EPathType.Other,
|
|
|
int taskPriority = 0,
|
|
|
+ DateTime? GenerationTime = null,
|
|
|
List<FileJson>? fileJson = null,
|
|
|
CancellationToken cancellationToken = default)
|
|
|
{
|
|
@@ -2137,9 +2189,10 @@ namespace DataSharing.Application.Receivers
|
|
|
PlatformSource = platformSource,
|
|
|
FileJson = fileJson,
|
|
|
Request = request,
|
|
|
+ GenerationTime = GenerationTime,
|
|
|
PathType = pathType
|
|
|
};
|
|
|
- await _dsSendTaskRepository.AddAsync(dsSendTask, cancellationToken);
|
|
|
+ return await _dsSendTaskRepository.AddAsync(dsSendTask, cancellationToken);
|
|
|
}
|
|
|
#endregion
|
|
|
|