Pārlūkot izejas kodu

自定义流程-新增流程类型(发起人指定)BUG修改

wangliang 3 gadi atpakaļ
vecāks
revīzija
f40403be26

+ 16 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java

@@ -511,7 +511,8 @@ public class ActivitiServiceImpl implements ActivitiService {
                         flowProcessVarMap,
                         tfCustomFlowEntity,
                         currFlow,
-                        setupMap);
+                        setupMap,
+                        tfFlowApprove);
             }
             this.setApproveInfo(tfFlowApprove,
                     tfFlowLog,
@@ -646,7 +647,8 @@ public class ActivitiServiceImpl implements ActivitiService {
                                Map<String, Object> flowProcessVarMap,
                                TFCustomFlowEntity tfCustomFlowEntity,
                                FlowNode currFlow,
-                               Map<String, FlowTaskResult> setupMap) {
+                               Map<String, FlowTaskResult> setupMap,
+                               TFFlowApprove tfFlowApprove) {
         if (Objects.nonNull(agginessMap.get(nextFlowTaskResult.getTaskKey()))) {
             CustomFlowVarDto customFlowVarDto = gson.fromJson(gson.toJson(agginessMap.get(nextFlowTaskResult.getTaskKey())), CustomFlowVarDto.class);
             if (Objects.nonNull(nextFlowTaskResult.getModelType()) && nextFlowTaskResult.getModelType() == TFCustomModelTypeEnum.APPROVE_SET) {
@@ -666,6 +668,18 @@ public class ActivitiServiceImpl implements ActivitiService {
                     customFlowVarDto.setApproveUserNames(approveUserResult.getPendApproveUsers());
                     agginessMap.put(nextFlowTaskResult.getTaskKey(), customFlowVarDto);
 
+                    if (Objects.nonNull(tfFlowApprove.getTransferAssignee())) {
+                        Map<String, CustomFlowVarDto> agginessTransferMap = JacksonUtil.readJson(tfFlowApprove.getTransferAssignee(), Map.class);
+                        agginessTransferMap.put(nextFlowTaskResult.getTaskKey(), customFlowVarDto);
+                        tfFlowApprove.setTransferAssignee(JacksonUtil.parseJson(agginessTransferMap));
+                    }
+
+                    if (Objects.nonNull(tfFlowApprove.getAllAssignee())) {
+                        Map<String, CustomFlowVarDto> agginessAllMap = JacksonUtil.readJson(tfFlowApprove.getAllAssignee(), Map.class);
+                        agginessAllMap.put(nextFlowTaskResult.getTaskKey(), customFlowVarDto);
+                        tfFlowApprove.setAllAssignee(JacksonUtil.parseJson(agginessAllMap));
+                    }
+
                     flowProcessVarMap.put(SystemConstant.AGGINESS_MAP, agginessMap);
                     Map<String, Object> varMap = JacksonUtil.readJson(tfCustomFlowEntity.getFlowProcessVar(), Map.class);
                     varMap.put(SystemConstant.FLOW_PROCESS_VAR_MAP, flowProcessVarMap);