From a1a8c8e0637b77669cfa04154c7282850b50856d Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 26 六月 2023 19:33:34 +0800
Subject: [PATCH] secDoList值为空修改
---
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 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 a84b86b..46130f0 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
@@ -25,6 +25,7 @@
import com.vci.ubcs.flow.engine.entity.FlowProcess;
import com.vci.ubcs.flow.engine.utils.FlowCache;
import lombok.AllArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
@@ -117,7 +118,7 @@
HistoricProcessInstanceQuery historyQuery = historyService.createHistoricProcessInstanceQuery().startedBy(taskUser).orderByProcessInstanceStartTime().desc();
- if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
historyQuery.processDefinitionCategory(bladeFlow.getCategory());
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -142,7 +143,7 @@
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
if (businessKey.length > 1) {
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
}
flow.setHistoryActivityName(historicProcessInstance.getName());
flow.setProcessInstanceId(historicProcessInstance.getId());
@@ -190,7 +191,7 @@
HistoricTaskInstanceQuery doneQuery = historyService.createHistoricTaskInstanceQuery().taskAssignee(taskUser).finished()
.includeProcessVariables().orderByHistoricTaskInstanceEndTime().desc();
- if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
doneQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -230,7 +231,7 @@
if (Func.isNotEmpty(historicProcessInstance)) {
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
if (historicProcessInstance.getEndActivityId() != null) {
flow.setProcessIsFinished(FlowEngineConstant.STATUS_FINISHED);
} else {
@@ -263,7 +264,6 @@
variables = Kv.create();
}
variables.put(ProcessConstant.PASS_KEY, flow.isPass());
- variables.put("yn","y");
// 瀹屾垚浠诲姟
taskService.complete(taskId, variables);
return true;
@@ -278,7 +278,8 @@
* @param status 鐘舵��
*/
private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status) {
- if (bladeFlow.getCategory() != null) {
+// if (bladeFlow.getCategory() != null) {
+ if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
taskQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
}
if (bladeFlow.getProcessDefinitionName() != null) {
@@ -305,7 +306,7 @@
if (Func.isNotEmpty(historicProcessInstance)) {
String[] businessKey = Func.toStrArray(StringPool.COLON, historicProcessInstance.getBusinessKey());
flow.setBusinessTable(businessKey[0]);
- flow.setBusinessId(businessKey[1]);
+ flow.setBusinessId(businessKey.length>1?businessKey[1]:"1");
}
FlowProcess processDefinition = FlowCache.getProcessDefinition(task.getProcessDefinitionId());
--
Gitblit v1.9.3