From c73d1e4b05ad210d87b696536a4afde36f10f725 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 11 十二月 2023 18:14:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
index e39c37e..aab06b5 100644
--- a/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
+++ b/Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
@@ -24,6 +24,7 @@
import com.vci.ubcs.flow.engine.constant.FlowEngineConstant;
import com.vci.ubcs.flow.engine.entity.FlowProcess;
import com.vci.ubcs.flow.engine.utils.FlowCache;
+import com.vci.ubcs.flow.engine.utils.FlowableUtils;
import com.vci.ubcs.starter.web.util.VciDateUtil;
import com.vci.ubcs.system.user.cache.UserCache;
import com.vci.ubcs.system.user.entity.User;
@@ -40,6 +41,7 @@
import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.api.history.HistoricTaskInstanceQuery;
+import org.flowable.variable.api.history.HistoricVariableInstance;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
@@ -181,6 +183,21 @@
flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED);
}
flow.setStatus(FlowEngineConstant.STATUS_FINISH);
+
+ //娴佺▼鍙戣捣鏃堕棿
+ flow.setProcessDefinitionStartTime(VciDateUtil.date2Str(historicProcessInstance.getStartTime(),VciDateUtil.DateTimeFormat));
+
+ //娴佺▼鍙橀噺
+
+ List<HistoricVariableInstance> variableInstances = historyService.createHistoricVariableInstanceQuery().processInstanceId(historicProcessInstance.getId()).list();
+ Map<String,Object> variables = FlowableUtils.switchVariable(variableInstances);
+ flow.setVariables(variables);
+
+ //businessKey
+ if (Func.isNotEmpty(historicProcessInstance)) {
+ flow.setBusinessId(businessKey.length>1 && StringUtils.isNotEmpty(businessKey[1])?businessKey[1]:"1");
+ }
+
flowList.add(flow);
});
@@ -277,18 +294,6 @@
// 瀹屾垚浠诲姟
taskService.complete(taskId, variables);
-// //璁剧疆涓嬩竴姝ュ鏍镐汉
-// Task task = taskService.createTaskQuery().processInstanceId(processInstanceId).active().singleResult();//涓嬩竴姝ヨ妭鐐�
-// String taskKey = task.getTaskDefinitionKey();//灏辨槸娴佺▼閰嶇疆鐨勮妭鐐筰d
-// Object to = getVar(processInstanceId,taskKey);
-// if(to==null){
-// throw new ServiceException(taskKey+"娌℃湁璁剧疆瀹℃牳浜�");
-// }
-// String assignee = to.toString();
-//
-// if(StringUtils.isNotEmpty(assignee)) {
-// task.setAssignee(assignee);
-// }
return true;
}
--
Gitblit v1.9.3