完善 DeptServiceImpl 单元测试

This commit is contained in:
YunaiV
2023-02-01 00:07:34 +08:00
parent ba78d9964a
commit 1011de3278
11 changed files with 186 additions and 126 deletions

View File

@ -216,7 +216,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
roleApi.validRoles(options);
} else if (ObjectUtils.equalsAny(type, BpmTaskAssignRuleTypeEnum.DEPT_MEMBER.getType(),
BpmTaskAssignRuleTypeEnum.DEPT_LEADER.getType())) {
deptApi.validDepts(options);
deptApi.validateDeptList(options);
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) {
postApi.validPosts(options);
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER.getType())) {
@ -293,7 +293,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
}
private Set<Long> calculateTaskCandidateUsersByDeptLeader(BpmTaskAssignRuleDO rule) {
List<DeptRespDTO> depts = deptApi.getDepts(rule.getOptions());
List<DeptRespDTO> depts = deptApi.getDeptList(rule.getOptions());
return convertSet(depts, DeptRespDTO::getLeaderUserId);
}