!38 feat(inspectimprove): 新增获取党群领导流程表达式方法

* feat(inspectimprove): 新增获取党群领导流程表达式方法
* feat(inspectimprove): 新增领导审批判断及审批用户流程表达式方法
This commit is contained in:
new_new_new
2026-06-09 09:22:34 +00:00
parent b573472d22
commit 15191eef4b
2 changed files with 30 additions and 0 deletions
@@ -11,5 +11,7 @@ public class InspectConstant {
public static final String SUB_APPROVE_USER_KEY = "sub_approve_user"; public static final String SUB_APPROVE_USER_KEY = "sub_approve_user";
public static final String SLD_DEPT_ID = "2044677562460508161"; public static final String SLD_DEPT_ID = "2044677562460508161";
public static final String SDWSJ_ROLE_ID = "2062796937607499777"; 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; public static final int ZERO_INDEX = 0;
} }
@@ -168,12 +168,26 @@ public class InspectImproveFlow {
return this.getImplDeptLeaderList(execution).size(); return this.getImplDeptLeaderList(execution).size();
} }
// 流程表达式内用法:${inspectImproveFlow.getIsEnd(execution)} // 流程表达式内用法:${inspectImproveFlow.getIsEnd(execution)}
public String getIsEnd(DelegateExecution execution) { public String getIsEnd(DelegateExecution execution) {
Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.IS_END_KEY); Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.IS_END_KEY);
return value != null ? value.toString() : null; 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)} // 流程表达式内用法:${inspectImproveFlow.getSubApproveUser(execution)}
public String getSubApproveUser(DelegateExecution execution) { public String getSubApproveUser(DelegateExecution execution) {
Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.SUB_APPROVE_USER_KEY); Object value = runtimeService.getVariable(execution.getProcessInstanceId(), InspectConstant.SUB_APPROVE_USER_KEY);
@@ -207,6 +221,20 @@ public class InspectImproveFlow {
return sldUserStr; 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) { private DqInspectTask getDqInspectTask(DelegateExecution execution) {