xf 2 年之前
父節點
當前提交
678fec28a5

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

@@ -331,10 +331,11 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
     }
 
     /// <summary>
-    /// 是否为呼叫中心部门
+    /// 是否为呼叫中心
     /// </summary>
     /// <returns></returns>
-    private bool IsOrgFromCallCenter(string orgCode) => orgCode.StartsWith(OrgSeedData.CallCenterCode);
+    private bool IsOrgFromCallCenter(string orgCode) =>
+        string.CompareOrdinal(orgCode, OrgSeedData.CallCenterCode) == 0;
 
 
 

+ 0 - 4
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -120,10 +120,8 @@ namespace Hotline.FlowEngine.Workflows
             //更新当前节点名称、时间、会签节点code 等字段
             workflow.SetWorkflowCurrentStepInfo(isStartCountersign, nextStepBox);
 
-            _logger.LogInformation($"{nameof(StartAsync)}, before update, handlerUsers: {string.Join(',', workflow.HandlerUsers)}, handlerOrgs: {string.Join(',', workflow.HandlerOrgs)}");
             workflow.UpdateHandlers(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgCode,
             flowAssignMode.FlowAssignType, flowAssignMode.Handlers);
-            _logger.LogInformation($"{nameof(StartAsync)}, after update, handlerUsers: {string.Join(',', workflow.HandlerUsers)}, handlerOrgs: {string.Join(',', workflow.HandlerOrgs)}");
 
             await _workflowRepository.UpdateAsync(workflow, cancellationToken);
 
@@ -387,10 +385,8 @@ namespace Hotline.FlowEngine.Workflows
             //更新workflow当前节点名称、时间、会签节点code 等字段
             workflow.SetWorkflowCurrentStepInfo(isStartCountersign, nextStepBox);
 
-            _logger.LogInformation($"{nameof(NextAsync)}, before update, handlerUsers: {string.Join(',', workflow.HandlerUsers)}, handlerOrgs: {string.Join(',', workflow.HandlerOrgs)}");
             workflow.UpdateHandlers(_sessionContext.RequiredUserId, _sessionContext.RequiredOrgCode,
                 flowAssignMode.FlowAssignType, flowAssignMode.Handlers);
-            _logger.LogInformation($"{nameof(NextAsync)}, after update, handlerUsers: {string.Join(',', workflow.HandlerUsers)}, handlerOrgs: {string.Join(',', workflow.HandlerOrgs)}");
 
             await _workflowRepository.UpdateAsync(workflow, cancellationToken);
 

+ 4 - 1
src/Hotline/Orders/Order.cs

@@ -273,6 +273,7 @@ namespace Hotline.Orders
         /// </summary>
         public void Accept()
         {
+            if (Status is EOrderStatus.Countersigning) return;
             Status = EOrderStatus.Handling;
         }
 
@@ -286,12 +287,14 @@ namespace Hotline.Orders
             string? currentStepName,
             DateTime expiredTime)
         {
+            if (Status is EOrderStatus.Countersigning && !isCountersignEnd) return;
+
             //1.如果order未处于会签中,则判断是否发起会签(isstartCountersign) 2.如果处于会签中,则判断会签是否结束(isCountersignEnd)
             if (Status is EOrderStatus.Countersigning && isCountersignEnd)
             {
                 Status = EOrderStatus.WaitForSign;
             }
-            else if (Status is not EOrderStatus.Countersigning && isCountersignStart)
+            else if (Status is EOrderStatus.Handling && isCountersignStart)
             {
                 Status = EOrderStatus.Countersigning;
             }

+ 1 - 4
src/Hotline/Orders/OrderDomainService.cs

@@ -98,16 +98,13 @@ public class OrderDomainService : IOrderDomainService, IScopeDependency
         var order = await GetOrderAsync(orderId, cancellationToken);
         CheckOrderIfFiled(order);
 
-        _logger.LogInformation($"{nameof(ManageFlowNextAsync)}, before: order.AssignUserIds: {string.Join(',', order.AssignUserIds)}, order.AssignOrgs: {string.Join(',', order.AssignOrgCodes)}");
         //更新指派信息
         order.Assign(assignMode.FlowAssignType, assignMode.Handlers);
-        _logger.LogInformation($"{nameof(ManageFlowNextAsync)}, after: order.AssignUserIds: {string.Join(',', order.AssignUserIds)}, order.AssignOrgs: {string.Join(',', order.AssignOrgCodes)}");
 
         //更新流转信息
         order.ManageFlow(isCountersignStart, isCountersignEnd, currentStepTime, currentStepName, expiredTime);
-        _logger.LogInformation($"更新流转信息 over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
+
         await _orderRepository.UpdateAsync(order, cancellationToken);
-        _logger.LogInformation($"update db over, order.AssignUserIds: {string.Join(',', order.AssignUserIds)}");
 
         //todo push msg to next step handler
     }