소스 검색

添加归档类型判断逻辑至 WorkflowEndHandler

在 `WorkflowEndHandler.cs` 文件中,导入了新的命名空间 `Hotline.Share.Enums.FlowEngine`。
在 `WorkflowEndHandler` 类中,添加了一段注释,描述了需求:
1. 判断工单属于哪种归档类型,需由谁归档来判断,热线中心归档的就叫中心归档件,部门归档就叫做部门归档件。
2. 若工单发起过部门会签,最后由热线中心归档,应属于中心归档件和非会签件。
3. 若工单发起过中心会签,最后由部门归档,应属于部门归档件和非会签件。
根据上述需求,添加了一个条件判断:
* 如果 `_appOptions.Value.IsYiBin` 为真:
  * 如果 `order.FileOrgIsCenter.Value` 为真,并且 `order.CounterSignType` 是 `ECounterSignType.Department`,则将 `order.CounterSignType` 设为 `null`。
  * 否则,如果 `order.CounterSignType` 是 `ECounterSignType.Center`,则将 `order.CounterSignType` 设为 `null`。
xf 1 개월 전
부모
커밋
b25943c8dc
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 21 0
      src/Hotline.Application/Handlers/FlowEngine/WorkflowEndHandler.cs

+ 21 - 0
src/Hotline.Application/Handlers/FlowEngine/WorkflowEndHandler.cs

@@ -19,6 +19,7 @@ using Hotline.Share.Dtos.FlowEngine.Workflow;
 using Hotline.Share.Dtos.Order;
 using Hotline.Share.Dtos.TrCallCenter;
 using Hotline.Share.Enums.CallCenter;
+using Hotline.Share.Enums.FlowEngine;
 using Hotline.Share.Enums.Order;
 using Hotline.Share.Tools;
 using Hotline.Snapshot.Notifications;
@@ -171,6 +172,26 @@ public class WorkflowEndHandler : INotificationHandler<EndWorkflowNotify>
                     order.FileOrgIsCenter = notification.Trace.HandlerOrgIsCenter;
                     order.FileOpinion = notification.Dto.Opinion;
 
+                    /*
+                     *需求:
+                     *1、判断工单属于哪种归档类型,需由谁归档来判断,热线中心归档的就叫中心归档件,部门归档就叫做部门归档件
+                       2、若工单发起过部门会签,最后由热线中心归档,应属于叫中心归档件和非会签件
+                       3、若工单发起过中心会签,最后由部门归档,应属于部门归档件和非会签件
+                     */
+                    if (_appOptions.Value.IsYiBin)
+                    {
+                        if (order.FileOrgIsCenter.Value)
+                        {
+                            if (order.CounterSignType is ECounterSignType.Department)
+                                order.CounterSignType = null;
+                        }
+                        else
+                        {
+                            if (order.CounterSignType is ECounterSignType.Center)
+                                order.CounterSignType = null;
+                        }
+                    }
+
                     //记录冗余归档数据
                     if (notification.Workflow.Steps.Any(x => x.BusinessType == Share.Enums.FlowEngine.EBusinessType.Send))
                     {