diff --git a/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectConstant.java b/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectConstant.java index 1e1ea12..86afbd7 100644 --- a/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectConstant.java +++ b/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectConstant.java @@ -11,5 +11,7 @@ public class InspectConstant { public static final String SUB_APPROVE_USER_KEY = "sub_approve_user"; public static final String SLD_DEPT_ID = "2044677562460508161"; public static final String SDWSJ_ROLE_ID = "2062796937607499777"; + public static final String IS_NEED_LEADER_APPROVE_KEY = "is_need_leader_approve"; + public static final String LEADER_APPROVE_USER_KEY = "leader_approve_user"; public static final int ZERO_INDEX = 0; } diff --git a/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectImproveFlow.java b/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectImproveFlow.java index 97cd0a4..e188630 100644 --- a/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectImproveFlow.java +++ b/jeecg-boot-module/jeecg-module-flow/src/main/java/org/jeecg/inspectimprove/InspectImproveFlow.java @@ -168,12 +168,26 @@ public class InspectImproveFlow { return this.getImplDeptLeaderList(execution).size(); } + // 流程表达式内用法:${inspectImproveFlow.getIsEnd(execution)} public String getIsEnd(DelegateExecution execution) { Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.IS_END_KEY); return value != null ? value.toString() : null; } + // 流程表达式内用法:${inspectImproveFlow.getIsNeedLeaderApprove(execution)} + public String getIsNeedLeaderApprove(DelegateExecution execution) { + Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.IS_NEED_LEADER_APPROVE_KEY); + return value != null ? value.toString() : null; + } + + // 流程表达式内用法:${inspectImproveFlow.getLeaderApproveUser(execution)} + public String getLeaderApproveUser(DelegateExecution execution) { + Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.LEADER_APPROVE_USER_KEY); + return value != null ? value.toString() : null; + } + + // 流程表达式内用法:${inspectImproveFlow.getSubApproveUser(execution)} public String getSubApproveUser(DelegateExecution execution) { Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.SUB_APPROVE_USER_KEY); @@ -207,6 +221,20 @@ public class InspectImproveFlow { return sldUserStr; } + // 流程表达式内用法:${inspectImproveFlow.getDqLeader(execution)} + public String getDqLeader(DelegateExecution execution) { + DqInspectTask tempDqInspectTask = this.getDqInspectTask(execution); + if (tempDqInspectTask == null) { + log.error("【巡视整改-流程表达式】未获取到巡视整改任务, businessKey: {}", execution.getProcessInstanceBusinessKey()); + return null; + } + String supDeptLeader = tempDqInspectTask.getSupDeptleaderid(); + if (StringUtils.isBlank(supDeptLeader)) { + log.error("【巡视整改-流程表达式】未获取到党群领导, businessKey: {}", execution.getProcessInstanceBusinessKey()); + return null; + } + return supDeptLeader; + } private DqInspectTask getDqInspectTask(DelegateExecution execution) {