Browse Source

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

田爽 4 tháng trước cách đây
mục cha
commit
fb5104994f

+ 1 - 1
src/Hotline.Application/FlowEngine/IWorkflowApplication.cs

@@ -62,7 +62,7 @@ namespace Hotline.Application.FlowEngine
         /// <summary>
         /// 办理至结束节点(无视流程模板配置,操作人需是当前节点办理对象)
         /// </summary>
-        Task HandleToEndAsync(string workflowId, string opinion, List<FileDto> files,
+        Task HandleToEndAsync(string workflowId, string opinion, List<FileDto> files, DateTime? expiredTime = null,
             EReviewResult reviewResult = EReviewResult.Unknown, CancellationToken cancellationToken = default);
 
         ////////

+ 2 - 2
src/Hotline.Application/FlowEngine/WorkflowApplication.cs

@@ -410,7 +410,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
     /// <summary>
     /// 无视流程模板配置直接将当前节点办理至结束节点
     /// </summary>
-    public async Task HandleToEndAsync(string workflowId, string opinion, List<FileDto> files,
+    public async Task HandleToEndAsync(string workflowId, string opinion, List<FileDto> files, DateTime? expiredTime = null,
         EReviewResult reviewResult = EReviewResult.Unknown, CancellationToken cancellationToken = default)
     {
         var workflow = await _workflowDomainService.GetWorkflowAsync(workflowId, withDefine: true, withSteps: true,
@@ -434,7 +434,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
             StepId = unHandleStep.Id
         };
         //await NextAsync(dto, cancellationToken: cancellationToken);
-        await _workflowDomainService.NextAsync(_sessionContextProvider.SessionContext, dto, cancellationToken: cancellationToken);
+        await _workflowDomainService.NextAsync(_sessionContextProvider.SessionContext, dto, expiredTime: expiredTime, cancellationToken: cancellationToken);
     }
 
     /// <summary>

+ 5 - 5
src/Hotline.Application/Subscribers/DatasharingSubscriber.cs

@@ -327,7 +327,7 @@ namespace Hotline.Application.Subscribers
                 }
 
                 order.CurrentStepName = workflow.CurrentStepName;
-                order.CurrentStepCode=workflow.CurrentStepCode;
+                order.CurrentStepCode = workflow.CurrentStepCode;
                 order.CurrentStepId = workflow.CurrentStepId;
                 order.CurrentStepCreateTime = workflow.CurrentStepCreateTime;
                 order.CurrentHandleTime = workflow.CurrentHandleTime;
@@ -506,9 +506,9 @@ namespace Hotline.Application.Subscribers
             //CityBaseConfiguration cityBase = JsonConvert.DeserializeObject<CityBaseConfiguration>(setting);
             SessionContextCreator.CreateSessionContext(_sessionContextProvider, dto.Source);
             await _workflowApplication.HandleToEndAsync(orderScreen.WorkflowId, "省上推送甄别结果", null,
-                dto.ProvinceScreenResult.AuditResult
+                 reviewResult: dto.ProvinceScreenResult.AuditResult
                     ? Share.Enums.FlowEngine.EReviewResult.Approval
-                    : Share.Enums.FlowEngine.EReviewResult.Failed, cancellationToken);
+                    : Share.Enums.FlowEngine.EReviewResult.Failed, cancellationToken: cancellationToken);
             orderScreen.Status = dto.ProvinceScreenResult.AuditResult ? Share.Enums.Order.EScreenStatus.End : Share.Enums.Order.EScreenStatus.Refuse;
             //if (orderScreen.Status == Share.Enums.Order.EScreenStatus.End)
             //{
@@ -783,7 +783,7 @@ namespace Hotline.Application.Subscribers
 
                     SessionContextCreator.CreateSessionContext(_sessionContextProvider, dto.Source);
                     await _workflowApplication.HandleToEndAsync(orderDelay.WorkflowId, dto.Opinion, dto.Files,
-                        dto.IsPass ? EReviewResult.Approval : EReviewResult.Failed, cancellationToken);
+                      reviewResult: dto.IsPass ? EReviewResult.Approval : EReviewResult.Failed, cancellationToken: cancellationToken);
                 }
             }
         }
@@ -844,7 +844,7 @@ namespace Hotline.Application.Subscribers
                     }
                     else
                     {
-                        await _workflowApplication.HandleToEndAsync(order.WorkflowId, dto.Opinion, dto.Files, cancellationToken: cancellationToken);
+                        await _workflowApplication.HandleToEndAsync(order.WorkflowId, dto.Opinion, dto.Files, expiredTime: order.ExpiredTime, cancellationToken: cancellationToken);
                     }
 
                     break;

+ 5 - 1
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1272,7 +1272,11 @@ namespace Hotline.FlowEngine.Workflows
             CancellationToken cancellation)
         {
             return await _workflowStepRepository.Queryable()
-                .Where(d => d.WorkflowId == workflowId && d.HandlerOrgId == orgId && d.StepType != EStepType.End && d.StepType != EStepType.Summary)
+                .Where(d => d.WorkflowId == workflowId 
+                            && d.HandlerOrgId == orgId 
+                            && d.StepType != EStepType.End 
+                            && d.StepType != EStepType.Summary
+                            && !d.IsCountersignEndStep)
                 //.Where(d => d.StepHandlers.Any(sh => sh.OrgId == orgId) && d.WorkflowId == workflowId)
                 .OrderByDescending(d => d.HandleTime)
                 .FirstAsync(cancellation);