فهرست منبع

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

xf 11 ماه پیش
والد
کامیت
0f85eeea41
1فایلهای تغییر یافته به همراه12 افزوده شده و 7 حذف شده
  1. 12 7
      src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

+ 12 - 7
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -1182,7 +1182,7 @@ namespace Hotline.FlowEngine.Workflows
             };
 
             //create endStep
-            var endStep = await CreateEndStepAsync(workflow, endStepDefine, currentStep, endStepHandles, cancellationToken);
+            var endStep = await CreateEndStepAsync(workflow, endStepDefine, currentStep, endStepHandles, cancellationToken,isProvince);
             workflow.Steps.Add(endStep);
 
             //update endTrace
@@ -1550,14 +1550,19 @@ namespace Hotline.FlowEngine.Workflows
         /// <summary>
         /// 办理节点(赋值节点的办理对象信息)
         /// </summary>
-        private void HandleStep(WorkflowStep step, string opinion, string nextStepCode)
+        private void HandleStep(WorkflowStep step, string opinion, string nextStepCode,bool isProvince = false)
         {
-            step.Handle(_sessionContext.RequiredUserId, _sessionContext.UserName,
-                _sessionContext.RequiredOrgId, _sessionContext.OrgName,
+            string userId = isProvince ? "08daa5f2-1878-4cfa-8764-1244f0229994" : _sessionContext.RequiredOrgId;
+            string userName = isProvince ? "省平台" : _sessionContext.UserName;
+            string orgId = isProvince ? "001" : _sessionContext.RequiredOrgId;
+            string OrgName = isProvince ? "市民热线服务系统" : _sessionContext.OrgName;
+
+            step.Handle(userId, userName,
+                orgId, OrgName,
                 _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName,
                 _sessionContext.OrgIsCenter, opinion, nextStepCode);
 
-            var handler = step.FindActualHandler(_sessionContext.Roles, _sessionContext.RequiredUserId, _sessionContext.RequiredOrgId);
+            var handler = step.FindActualHandler(_sessionContext.Roles, userId, orgId);
             if (handler is not null)
                 handler.IsActualHandler = true;
         }
@@ -1928,7 +1933,7 @@ namespace Hotline.FlowEngine.Workflows
             StepDefine endStepDefine,
             WorkflowStep prevStep,
             List<WorkflowStepHandler> stepHandlers,
-            CancellationToken cancellationToken)
+            CancellationToken cancellationToken, bool isProvince = false)
         {
             if (workflow.Steps.Any(d => d.StepType == EStepType.End))
                 throw UserFriendlyException.SameMessage("无法重复创建结束节点");
@@ -1943,7 +1948,7 @@ namespace Hotline.FlowEngine.Workflows
             //    _sessionContext.RequiredOrgId, _sessionContext.OrgName,
             //    _sessionContext.OrgAreaCode, _sessionContext.OrgAreaName);
 
-            HandleStep(step, "流程归档", string.Empty);
+            HandleStep(step, "流程归档", string.Empty,isProvince);
 
             await _workflowStepRepository.AddAsync(step, cancellationToken);