From 91560799c8088421983a6168c95b84a5d617df05 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 17 十一月 2023 02:00:44 +0800 Subject: [PATCH] 历史数据导入、批量申请、申请编码接口代码逻辑中关键属性校验增加过滤条件 --- Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 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 abc996d..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; @@ -182,8 +184,13 @@ } flow.setStatus(FlowEngineConstant.STATUS_FINISH); + //娴佺▼鍙戣捣鏃堕棿 + flow.setProcessDefinitionStartTime(VciDateUtil.date2Str(historicProcessInstance.getStartTime(),VciDateUtil.DateTimeFormat)); + //娴佺▼鍙橀噺 - Map<String,Object> variables = historicProcessInstance.getProcessVariables(); + + List<HistoricVariableInstance> variableInstances = historyService.createHistoricVariableInstanceQuery().processInstanceId(historicProcessInstance.getId()).list(); + Map<String,Object> variables = FlowableUtils.switchVariable(variableInstances); flow.setVariables(variables); //businessKey @@ -287,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