|
@@ -231,8 +231,16 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken, taskPriority: 10);
|
|
|
+ await InitPushDataAsync("SubmitCaseInfo", "submit_case_info", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken, taskPriority: 10);
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.FileJson, dto.ProvinceNo, data.CliengGuid, EMaterialType.Acceptance, data.AreaCode, cancellationToken);
|
|
|
}
|
|
@@ -354,8 +362,15 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseProcess", "submit_case_process", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.WorkflowTrace.FileJson, dto.Order.ProvinceNo, data.CliengGuid, EMaterialType.Process, dto.Order.AreaCode, cancellationToken);
|
|
@@ -447,8 +462,15 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken, taskPriority: 20);
|
|
|
+ await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken, taskPriority: 20);
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -467,8 +489,15 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken, taskPriority: 20);
|
|
|
+ await InitPushDataAsync("SubmitCaseRecord", "submit_case_record", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken, taskPriority: 20);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -481,8 +510,15 @@ namespace DataSharing.Application.Receivers
|
|
|
{
|
|
|
//处理时间格式
|
|
|
ForeachClass(dto);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(dto)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseTotal", "submit_case_total", System.Text.Json.JsonSerializer.Serialize(dto), cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseTotal", "submit_case_total", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -896,8 +932,15 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitVisitInfo", "submit_visit_info", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken, taskPriority: 5);
|
|
|
+ await InitPushDataAsync("SubmitVisitInfo", "submit_visit_info", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken, taskPriority: 5);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(null, data.CaseSerial, data.CliengGuid, EMaterialType.Visit, data.AreaCode, cancellationToken);
|
|
@@ -947,8 +990,15 @@ namespace DataSharing.Application.Receivers
|
|
|
|
|
|
//处理时间格式
|
|
|
ForeachClass(data);
|
|
|
+ SendRequestListModel model = new()
|
|
|
+ {
|
|
|
+ JsonList = new List<string>
|
|
|
+ {
|
|
|
+ System.Text.Json.JsonSerializer.Serialize(data)
|
|
|
+ }
|
|
|
+ };
|
|
|
//将待推送数据写入待推送表
|
|
|
- await InitPushDataAsync("SubmitCaseResult", "submit_case_result", System.Text.Json.JsonSerializer.Serialize(data), cancellationToken);
|
|
|
+ await InitPushDataAsync("SubmitCaseResult", "submit_case_result", System.Text.Json.JsonSerializer.Serialize(model), cancellationToken);
|
|
|
|
|
|
//处理附件
|
|
|
await FileDataAsync(dto.WorkflowTrace.FileJson, data.CaseSerial, data.CliengGuid, EMaterialType.Result, dto.Order.AreaCode, cancellationToken);
|
|
@@ -1318,29 +1368,21 @@ namespace DataSharing.Application.Receivers
|
|
|
/// <returns></returns>
|
|
|
private async Task InitCityDataYBAsync(OrderDto dto, CancellationToken cancellationToken)
|
|
|
{
|
|
|
- var cityHandOver = "";// _channelConfigurationManager.GetConfigurationCityHandOver();
|
|
|
- string source = "";// string.IsNullOrEmpty(dto.Source) ? cityHandOver.SendCityName : cityDataSend.Source;
|
|
|
- string secretKey = "";// GetMD5(cityDataSend.Source + cityHandOver.SecretKey);
|
|
|
- string ServerName = dto.IdentityType == EIdentityType.Enterprise ? "1" : "0";
|
|
|
+ var cityHandOver = _channelConfigurationManager.GetConfigurationCityHandOver();
|
|
|
+ string source = cityHandOver.SendCityName;
|
|
|
+ string secretKey = GetMD5(source + cityHandOver.SecretKey);
|
|
|
|
|
|
- string fromGender = "0";
|
|
|
- switch (dto.FromGender)
|
|
|
+ string fromGender = dto.FromGender switch
|
|
|
{
|
|
|
- case EGender.Female:
|
|
|
- fromGender = "2";
|
|
|
- break;
|
|
|
- case EGender.Male:
|
|
|
- fromGender = "1";
|
|
|
- break;
|
|
|
- default:
|
|
|
- fromGender = "0";
|
|
|
- break;
|
|
|
- }
|
|
|
+ EGender.Female => "2",
|
|
|
+ EGender.Male => "1",
|
|
|
+ _ => "0",
|
|
|
+ };
|
|
|
Dictionary<string, string> dicParam = new()
|
|
|
{
|
|
|
{ "Code", secretKey },
|
|
|
{ "FSHCode", dto.No },
|
|
|
- { "ServerName", ServerName},
|
|
|
+ { "ServerName", dto.IdentityType == EIdentityType.Enterprise ? "1" : "0"},
|
|
|
{ "PurTypeName",dto.AcceptType },
|
|
|
{ "ConTypeName", dto.HotspotSpliceName},
|
|
|
{ "Title", dto.Title},
|
|
@@ -1387,20 +1429,37 @@ 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, CancellationToken cancellationToken, string httpMethod = "Post",
|
|
|
- EPlatformSource platformSource = EPlatformSource.Province, int taskPriority = 0, List<FileJson>? fileJson = null)
|
|
|
+ private async Task InitPushDataAsync(string taskType, string path, string request, CancellationToken cancellationToken, string httpMethod = "Post", EPlatformSource platformSource = EPlatformSource.Province, int taskPriority = 0, List<FileJson>? fileJson = null)
|
|
|
{
|
|
|
- //将待推送数据写入待推送表
|
|
|
+ //组装参数
|
|
|
DsSendTask dsSendTask = new()
|
|
|
{
|
|
|
TaskPriority = taskPriority,
|
|
|
TaskType = taskType,
|
|
|
HttpMethod = httpMethod,
|
|
|
Path = path,
|
|
|
- Request = request,
|
|
|
PlatformSource = platformSource,
|
|
|
FileJson = fileJson
|
|
|
};
|
|
|
+
|
|
|
+ //根据不同平台组装不同的请求参数
|
|
|
+ if (platformSource == EPlatformSource.Province)
|
|
|
+ {
|
|
|
+ //获取配置
|
|
|
+ var configProvince = _channelConfigurationManager.GetConfigurationProvince();
|
|
|
+ //组装成需要提交的参数
|
|
|
+ var model = new SendRequestModel
|
|
|
+ {
|
|
|
+ Data = request,
|
|
|
+ ClientInfo = new DataSharing.Share.Dtos.Province.ClientInfo(configProvince.ClientId, configProvince.ClientSecret)
|
|
|
+ };
|
|
|
+
|
|
|
+ //将待推送数据写入待推送表
|
|
|
+ dsSendTask.Request = System.Text.Json.JsonSerializer.Serialize(model);
|
|
|
+ }
|
|
|
+ else//其他平台
|
|
|
+ dsSendTask.Request = request;
|
|
|
+
|
|
|
await _dsSendTaskRepository.AddAsync(dsSendTask, cancellationToken);
|
|
|
}
|
|
|
#endregion
|
|
@@ -1459,7 +1518,7 @@ namespace DataSharing.Application.Receivers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#endregion
|