update
This commit is contained in:
parent
7fa7ef5fe1
commit
1bc34bee11
|
@ -83,7 +83,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
|
||||||
|
|
||||||
// 2.通知部门或库点负责人账号
|
// 2.通知部门或库点负责人账号
|
||||||
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "部门负责人")
|
.eq(Role::getName, "部门负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
String type = JSONUtil.parseObj(workFlow.getData()).getStr("type");
|
String type = JSONUtil.parseObj(workFlow.getData()).getStr("type");
|
||||||
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
|
@ -108,7 +108,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
|
||||||
}
|
}
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "库点负责人")
|
.eq(Role::getName, "库点负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.eq(User::getDept, user.getDept())
|
.eq(User::getDept, user.getDept())
|
||||||
|
@ -117,7 +117,7 @@ public class BudgetWorkFlowService implements IWorkFlowType {
|
||||||
}
|
}
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "总经理")
|
.eq(Role::getName, "总经理")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.like(User::getRoles, role.getId())
|
.like(User::getRoles, role.getId())
|
||||||
|
|
|
@ -70,8 +70,8 @@ public class FumigationWorkFlowService implements IWorkFlowType {
|
||||||
User user = userService.getById(workFlow.getUserId());
|
User user = userService.getById(workFlow.getUserId());
|
||||||
List<Role> roles = roleService.listByIds(Arrays.asList(user.getRoles().split(",")));
|
List<Role> roles = roleService.listByIds(Arrays.asList(user.getRoles().split(",")));
|
||||||
List<String> roleNames = roles.stream().map(Role::getName).collect(Collectors.toList());
|
List<String> roleNames = roles.stream().map(Role::getName).collect(Collectors.toList());
|
||||||
if (!roleNames.contains("库管员")) {
|
if (!roleNames.contains("保管员")) {
|
||||||
throw new ResultException("您不是库管员,无法发起流程");
|
throw new ResultException("您不是保管员,无法发起流程");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.流程step+1
|
// 1.流程step+1
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
// 2.找到部门或库点负责人审批
|
// 2.找到部门或库点负责人审批
|
||||||
|
|
||||||
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "部门负责人")
|
.eq(Role::getName, "部门负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.eq(User::getDept, user.getDept())
|
.eq(User::getDept, user.getDept())
|
||||||
|
@ -83,7 +83,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
);
|
);
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "库点负责人")
|
.eq(Role::getName, "库点负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.eq(User::getDept, user.getDept())
|
.eq(User::getDept, user.getDept())
|
||||||
|
@ -92,7 +92,7 @@ public class LeaveWorkFlowService implements IWorkFlowType {
|
||||||
}
|
}
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "总经理")
|
.eq(Role::getName, "总经理")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.like(User::getRoles, role.getId())
|
.like(User::getRoles, role.getId())
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
|
||||||
// 2.找到部门或库点负责人审批
|
// 2.找到部门或库点负责人审批
|
||||||
|
|
||||||
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
Role role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "部门负责人")
|
.eq(Role::getName, "部门负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
List<User> nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.eq(User::getDept, user.getDept())
|
.eq(User::getDept, user.getDept())
|
||||||
|
@ -92,7 +92,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
|
||||||
);
|
);
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "库点负责人")
|
.eq(Role::getName, "库点负责人")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.eq(User::getDept, user.getDept())
|
.eq(User::getDept, user.getDept())
|
||||||
|
@ -101,7 +101,7 @@ public class RepairWorkFlowService implements IWorkFlowType {
|
||||||
}
|
}
|
||||||
if (CollUtil.isEmpty(nextUserList)) {
|
if (CollUtil.isEmpty(nextUserList)) {
|
||||||
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
role = roleService.getOne(new QueryWrapper<Role>().lambda()
|
||||||
.eq(Role::getCode, "总经理")
|
.eq(Role::getName, "总经理")
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
nextUserList = userService.list(new QueryWrapper<User>().lambda()
|
||||||
.like(User::getRoles, role.getId())
|
.like(User::getRoles, role.getId())
|
||||||
|
|
Loading…
Reference in New Issue