This commit is contained in:
lijiaqi 2023-07-17 14:23:59 +08:00
parent 7fa7ef5fe1
commit 1bc34bee11
4 changed files with 11 additions and 11 deletions

View File

@ -83,7 +83,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
// 2.通知部门或库点负责人账号
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "部门负责人")
.eq(Role::getName, "部门负责人")
.last("limit 1"));
String type = JSONUtil.parseObj(workFlow.getData()).getStr("type");
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
@ -108,7 +108,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
}
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "库点负责人")
.eq(Role::getName, "库点负责人")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.eq(User::getDept, user.getDept())
@ -117,7 +117,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
}
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "总经理")
.eq(Role::getName, "总经理")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.like(User::getRoles, role.getId())

View File

@ -70,8 +70,8 @@ public class FumigationWorkFlowService implements IWorkFlowType {
User user = userService.getById(workFlow.getUserId());
List<Role> roles = roleService.listByIds(Arrays.asList(user.getRoles().split(",")));
List<String> roleNames = roles.stream().map(Role::getName).collect(Collectors.toList());
if (!roleNames.contains("管员")) {
throw new ResultException("您不是管员,无法发起流程");
if (!roleNames.contains("管员")) {
throw new ResultException("您不是管员,无法发起流程");
}
// 1.流程step+1

View File

@ -75,7 +75,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
// 2.找到部门或库点负责人审批
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "部门负责人")
.eq(Role::getName, "部门负责人")
.last("limit 1"));
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
.eq(User::getDept, user.getDept())
@ -83,7 +83,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
);
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "库点负责人")
.eq(Role::getName, "库点负责人")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.eq(User::getDept, user.getDept())
@ -92,7 +92,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
}
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "总经理")
.eq(Role::getName, "总经理")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.like(User::getRoles, role.getId())

View File

@ -84,7 +84,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
// 2.找到部门或库点负责人审批
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "部门负责人")
.eq(Role::getName, "部门负责人")
.last("limit 1"));
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
.eq(User::getDept, user.getDept())
@ -92,7 +92,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
);
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "库点负责人")
.eq(Role::getName, "库点负责人")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.eq(User::getDept, user.getDept())
@ -101,7 +101,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
}
if (CollUtil.isEmpty(nextUserList)) {
role = roleService.getOne(new QueryWrapper<Role>().lambda()
.eq(Role::getCode, "总经理")
.eq(Role::getName, "总经理")
.last("limit 1"));
nextUserList = userService.list(new QueryWrapper<User>().lambda()
.like(User::getRoles, role.getId())