|
@@ -279,13 +279,13 @@ namespace Hotline.Application.Subscribers
|
|
|
ExpiredTimeWithConfig expiredTimeConfig;
|
|
|
if (_appOptions.Value.IsZiGong)
|
|
|
{
|
|
|
- expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now,order.StartTime.Value, EFlowDirection.CenterToCenter, order.Adapt<OrderTimeClacInfo>());
|
|
|
+ expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now, order.StartTime.Value, EFlowDirection.CenterToCenter, order.Adapt<OrderTimeClacInfo>());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//期满时间
|
|
|
//expiredTimeConfig = _timeLimitDomainService.CalcExpiredTime(DateTime.Now, EFlowDirection.CenterToOrg, order.AcceptTypeCode);
|
|
|
- expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now,order.CenterToOrgTime.Value, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
|
|
|
+ expiredTimeConfig = await _expireTime.CalcExpiredTime(DateTime.Now, order.CenterToOrgTime.Value, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
|
|
|
}
|
|
|
|
|
|
_mapper.Map(expiredTimeConfig, order);
|
|
@@ -507,65 +507,65 @@ namespace Hotline.Application.Subscribers
|
|
|
SessionContextCreator.CreateSessionContext(_sessionContextProvider, dto.Source);
|
|
|
if (int.Parse(dto.ProvinceScreenResult.AuditResult) == 0)
|
|
|
{
|
|
|
- PreviousWorkflowDto previous = new PreviousWorkflowDto();
|
|
|
- previous.Opinion = dto.ProvinceScreenResult.AuditOpinion;
|
|
|
- previous.WorkflowId = orderScreen.WorkflowId;
|
|
|
- await _workflowApplication.PreviousAsync(previous, cancellationToken);
|
|
|
- }
|
|
|
+ PreviousWorkflowDto previous = new PreviousWorkflowDto();
|
|
|
+ previous.Opinion = dto.ProvinceScreenResult.AuditOpinion;
|
|
|
+ previous.WorkflowId = orderScreen.WorkflowId;
|
|
|
+ await _workflowApplication.PreviousAsync(previous, cancellationToken);
|
|
|
+ }
|
|
|
|
|
|
if (int.Parse(dto.ProvinceScreenResult.AuditResult) > 0)
|
|
|
{
|
|
|
- await _workflowApplication.HandleToEndAsync(orderScreen.WorkflowId, dto.ProvinceScreenResult.AuditOpinion, null,
|
|
|
- reviewResult: int.Parse(dto.ProvinceScreenResult.AuditResult) == 1
|
|
|
- ? Share.Enums.FlowEngine.EReviewResult.Approval
|
|
|
- : Share.Enums.FlowEngine.EReviewResult.Failed, cancellationToken: cancellationToken);
|
|
|
- orderScreen.Status = int.Parse(dto.ProvinceScreenResult.AuditResult) == 1 ? Share.Enums.Order.EScreenStatus.End : Share.Enums.Order.EScreenStatus.Refuse;
|
|
|
- //if (orderScreen.Status == Share.Enums.Order.EScreenStatus.End)
|
|
|
- //{
|
|
|
- // var visitDetail = await _orderVisitedDetailRepository.GetAsync(orderScreen.VisitDetailId, cancellationToken);
|
|
|
- // if (visitDetail != null)
|
|
|
- // {
|
|
|
- // var screenSatisfy = new Kv() { Key = "-1", Value = "视为满意" };
|
|
|
- // visitDetail.OrgProcessingResults = screenSatisfy;
|
|
|
- // visitDetail.OrgHandledAttitude = screenSatisfy;
|
|
|
- // await _orderVisitedDetailRepository.UpdateAsync(visitDetail, cancellationToken);
|
|
|
- // }
|
|
|
- //}
|
|
|
- orderScreen.ReplyContent = dto.ProvinceScreenResult.AuditOpinion;
|
|
|
- orderScreen.AuditName = dto.ProvinceScreenResult.AuditPerson;
|
|
|
- orderScreen.AuditOrgName = dto.ProvinceScreenResult.AuditOuname;
|
|
|
- orderScreen.AuditTime = dto.ProvinceScreenResult.AuditTime;
|
|
|
-
|
|
|
- if (dto.Files.Any())
|
|
|
- orderScreen.FileJson =
|
|
|
- await _fileRepository.AddFileAsync(dto.Files, orderScreen.Id, "", cancellationToken);
|
|
|
- await _orderScreenRepository.UpdateAsync(orderScreen, cancellationToken);
|
|
|
- //多部门甄别回访 省上结果处理
|
|
|
- if (orderScreen.Status == Share.Enums.Order.EScreenStatus.End)
|
|
|
- {
|
|
|
- var visitDetails = await _orderVisitedDetailRepository.Queryable().Where(x => x.OrderVisit.OrderId == orderScreen.OrderId &&
|
|
|
- x.VisitTarget == EVisitTarget.Org && (
|
|
|
- SqlFunc.JsonField(x.OrgProcessingResults, "Key") ==
|
|
|
- "1" ||
|
|
|
- SqlFunc.JsonField(x.OrgProcessingResults, "Key") ==
|
|
|
- "2" ||
|
|
|
- SqlFunc.JsonField(x.OrgHandledAttitude, "Key") ==
|
|
|
- "1" ||
|
|
|
- SqlFunc.JsonField(x.OrgHandledAttitude, "Key") ==
|
|
|
- "2"
|
|
|
- ) && x.Id != orderScreen.VisitDetailId).ToListAsync();
|
|
|
- foreach (var visitDetail in visitDetails)
|
|
|
- {
|
|
|
- if (visitDetail != null)
|
|
|
- {
|
|
|
- var screenSatisfy = new Kv() { Key = "-1", Value = "视为满意" };
|
|
|
- visitDetail.OrgProcessingResults = screenSatisfy;
|
|
|
- visitDetail.OrgHandledAttitude = screenSatisfy;
|
|
|
- await _orderVisitedDetailRepository.UpdateAsync(visitDetail, cancellationToken);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ await _workflowApplication.HandleToEndAsync(orderScreen.WorkflowId, dto.ProvinceScreenResult.AuditOpinion, null,
|
|
|
+ reviewResult: int.Parse(dto.ProvinceScreenResult.AuditResult) == 1
|
|
|
+ ? Share.Enums.FlowEngine.EReviewResult.Approval
|
|
|
+ : Share.Enums.FlowEngine.EReviewResult.Failed, cancellationToken: cancellationToken);
|
|
|
+ orderScreen.Status = int.Parse(dto.ProvinceScreenResult.AuditResult) == 1 ? Share.Enums.Order.EScreenStatus.End : Share.Enums.Order.EScreenStatus.Refuse;
|
|
|
+ //if (orderScreen.Status == Share.Enums.Order.EScreenStatus.End)
|
|
|
+ //{
|
|
|
+ // var visitDetail = await _orderVisitedDetailRepository.GetAsync(orderScreen.VisitDetailId, cancellationToken);
|
|
|
+ // if (visitDetail != null)
|
|
|
+ // {
|
|
|
+ // var screenSatisfy = new Kv() { Key = "-1", Value = "视为满意" };
|
|
|
+ // visitDetail.OrgProcessingResults = screenSatisfy;
|
|
|
+ // visitDetail.OrgHandledAttitude = screenSatisfy;
|
|
|
+ // await _orderVisitedDetailRepository.UpdateAsync(visitDetail, cancellationToken);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ orderScreen.ReplyContent = dto.ProvinceScreenResult.AuditOpinion;
|
|
|
+ orderScreen.AuditName = dto.ProvinceScreenResult.AuditPerson;
|
|
|
+ orderScreen.AuditOrgName = dto.ProvinceScreenResult.AuditOuname;
|
|
|
+ orderScreen.AuditTime = dto.ProvinceScreenResult.AuditTime;
|
|
|
+
|
|
|
+ if (dto.Files.Any())
|
|
|
+ orderScreen.FileJson =
|
|
|
+ await _fileRepository.AddFileAsync(dto.Files, orderScreen.Id, "", cancellationToken);
|
|
|
+ await _orderScreenRepository.UpdateAsync(orderScreen, cancellationToken);
|
|
|
+ //多部门甄别回访 省上结果处理
|
|
|
+ if (orderScreen.Status == Share.Enums.Order.EScreenStatus.End)
|
|
|
+ {
|
|
|
+ var visitDetails = await _orderVisitedDetailRepository.Queryable().Where(x => x.OrderVisit.OrderId == orderScreen.OrderId &&
|
|
|
+ x.VisitTarget == EVisitTarget.Org && (
|
|
|
+ SqlFunc.JsonField(x.OrgProcessingResults, "Key") ==
|
|
|
+ "1" ||
|
|
|
+ SqlFunc.JsonField(x.OrgProcessingResults, "Key") ==
|
|
|
+ "2" ||
|
|
|
+ SqlFunc.JsonField(x.OrgHandledAttitude, "Key") ==
|
|
|
+ "1" ||
|
|
|
+ SqlFunc.JsonField(x.OrgHandledAttitude, "Key") ==
|
|
|
+ "2"
|
|
|
+ ) && x.Id != orderScreen.VisitDetailId).ToListAsync();
|
|
|
+ foreach (var visitDetail in visitDetails)
|
|
|
+ {
|
|
|
+ if (visitDetail != null)
|
|
|
+ {
|
|
|
+ var screenSatisfy = new Kv() { Key = "-1", Value = "视为满意" };
|
|
|
+ visitDetail.OrgProcessingResults = screenSatisfy;
|
|
|
+ visitDetail.OrgHandledAttitude = screenSatisfy;
|
|
|
+ await _orderVisitedDetailRepository.UpdateAsync(visitDetail, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -829,14 +829,14 @@ namespace Hotline.Application.Subscribers
|
|
|
if (_appOptions.Value.IsZiGong)
|
|
|
{
|
|
|
expiredTimeConfig =
|
|
|
- await _expireTime.CalcExpiredTime(DateTime.Now,DateTime.Now, EFlowDirection.CenterToCenter, order.Adapt<OrderTimeClacInfo>());
|
|
|
+ await _expireTime.CalcExpiredTime(DateTime.Now, DateTime.Now, EFlowDirection.CenterToCenter, order.Adapt<OrderTimeClacInfo>());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
//期满时间
|
|
|
//expiredTimeConfig = _timeLimitDomainService.CalcExpiredTime(DateTime.Now, EFlowDirection.CenterToOrg, order.AcceptTypeCode);
|
|
|
expiredTimeConfig =
|
|
|
- await _expireTime.CalcExpiredTime(DateTime.Now,DateTime.Now, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
|
|
|
+ await _expireTime.CalcExpiredTime(DateTime.Now, DateTime.Now, EFlowDirection.CenterToOrg, order.Adapt<OrderTimeClacInfo>());
|
|
|
}
|
|
|
|
|
|
_mapper.Map(expiredTimeConfig, order);
|
|
@@ -847,9 +847,17 @@ namespace Hotline.Application.Subscribers
|
|
|
break;
|
|
|
case "1":
|
|
|
//办结:归档
|
|
|
+ //自贡需求:省12345平台向本地系统第一次推送办理意见时,工单即归档,承办意见取该办理意见;第二次推送办理意见时,工单承办意见需更新为第二次推送的办理意见
|
|
|
if (order.Status >= EOrderStatus.Filed)
|
|
|
{
|
|
|
- order.ActualOpinion += dto.Opinion;
|
|
|
+ if (_appOptions.Value.IsZiGong)
|
|
|
+ {
|
|
|
+ order.ActualOpinion = dto.Opinion;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ order.ActualOpinion += dto.Opinion;
|
|
|
+ }
|
|
|
await _orderRepository.Updateable(order).UpdateColumns(d => d.ActualOpinion).ExecuteCommandAsync(cancellationToken);
|
|
|
await _workflowDomainService.AppendFileOpinionAsync(order.WorkflowId, dto.Opinion, dto.Files, cancellationToken);
|
|
|
}
|