feat(bpm): 优化获取部门领导逻辑
- 增加对4级部门的处理,如果当前部门级别超过4级,则获取第4级部门信息 -通过部门标识分割获取第4级部门ID,并重新获取部门信息- 优化了部门领导的获取逻辑,提高了系统适应性和扩展性
This commit is contained in:
parent
0f035799fd
commit
3b95132420
@ -58,6 +58,12 @@ public class BpmTaskEntryLeaderScript implements BpmTaskAssignScript {
|
|||||||
//根据部门ID 获取部门信息
|
//根据部门ID 获取部门信息
|
||||||
DeptRespDTO dept = deptApi.getDept(deptId).getCheckedData();
|
DeptRespDTO dept = deptApi.getDept(deptId).getCheckedData();
|
||||||
|
|
||||||
|
// 获取4级部门信息
|
||||||
|
if (dept.getLevel() > 4) {
|
||||||
|
String[] level = dept.getFlag().split("-");
|
||||||
|
dept = deptApi.getDept(Long.valueOf(level[4])).getCheckedData();
|
||||||
|
}
|
||||||
|
|
||||||
return dept != null && dept.getLeaderUserId() != null ? asSet(dept.getLeaderUserId()) : emptySet();
|
return dept != null && dept.getLeaderUserId() != null ? asSet(dept.getLeaderUserId()) : emptySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user