From 590794315aa2dff6b91354c83c9e7a1e7c908ff0 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 30 六月 2023 19:59:42 +0800
Subject: [PATCH] 代码整合

---
 Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
index f1deaf9..e9ec1fd 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
@@ -16,12 +16,14 @@
  */
 package com.vci.ubcs.flow.engine.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.vci.ubcs.flow.core.constant.ProcessConstant;
 import com.vci.ubcs.flow.core.entity.BladeFlow;
 import com.vci.ubcs.flow.core.utils.TaskUtil;
 import com.vci.ubcs.flow.engine.entity.*;
 import com.vci.ubcs.flow.engine.service.FlowEngineService;
 import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
+import com.vci.ubcs.flow.engine.service.ProcessStageAttrService;
 import com.vci.ubcs.flow.engine.service.VICFlowService;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -33,6 +35,7 @@
 import org.flowable.engine.runtime.ProcessInstance;
 import org.flowable.task.api.Task;
 import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.support.Kv;
@@ -56,6 +59,7 @@
 	private final FlowTaskUserService flowTaskUserService;
 	private final FlowEngineService flowEngineService;
 	private final HistoryService historyService;
+	private final ProcessStageAttrService processStageAttrService;
 
 	private static String MODELKEY = "modelKey";//鍓嶇浼犺繃鏉ョ殑妯″瀷key
 	@Override
@@ -217,10 +221,23 @@
 				}
 			}
 		}
+
+		//娴佺▼甯搁噺
 		Map<String,Object> variables = runtimeService.getVariables(processInstanceId);
 		if(!variables.isEmpty()){
 			flowTaskDTO.setVariables(variables);
 		}
+
+		String templateId = variables.get("templateId").toString();
+		//娴佺▼闃舵
+		Map<String, Object> m = new HashMap<>();
+		m.put("template_id", templateId);
+		m.put("task_id", crruentActivityId);
+		m.put("model_key", modelKey);
+		QueryWrapper q = Condition.getQueryWrapper(m, ProcessStageAttr.class)
+			.select("attr_id attrId,attr_name attrName,attr_group attrGroup");
+		List<ProcessStageAttr> stageAttrs = processStageAttrService.list(q);
+		flowTaskDTO.setStageAttrs(stageAttrs);
 		return flowTaskDTO;
 	}
 }

--
Gitblit v1.9.3