Commit 2af73365 authored by cq990612's avatar cq990612

优化代码结构

parent f5239621
...@@ -348,7 +348,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -348,7 +348,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
public PageInfo<WorkTimeOrderDto> getExamine(Integer userId, Integer projectId, Integer type, Integer page, Integer pageSize, List<Integer> status) { public PageInfo<WorkTimeOrderDto> getExamine(Integer userId, Integer projectId, Integer type, Integer page, Integer pageSize, List<Integer> status) {
log.info("WorkOrderServiceImpl[]getExamine[]input.param.userId:{},projectId:{},type:{},page:{},size:{},status:{}" + userId, projectId, type, page, pageSize, status); log.info("WorkOrderServiceImpl[]getExamine[]input.param.userId:{},projectId:{},type:{},page:{},size:{},status:{}" + userId, projectId, type, page, pageSize, status);
// 判断当前用户是否是管理员 // 判断当前用户是否是管理员
if (UserRoleLevelUtils.isManagerLevel(userId, LevelEnum.EXAMINE.getLevelName())) { if (!UserRoleLevelUtils.isManagerLevel(userId, LevelEnum.EXAMINE.getLevelName())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL);
} }
WorkUser user = workUserService.getById(userId); WorkUser user = workUserService.getById(userId);
...@@ -367,7 +367,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -367,7 +367,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
@Override @Override
public List<AppletsPendApprovalDto> getExamineApplets(Integer userId, Integer projectId, Integer type) { public List<AppletsPendApprovalDto> getExamineApplets(Integer userId, Integer projectId, Integer type) {
log.info("WorkOrderServiceImpl[]getExamineApplets[]input.param.userId:{},projectId:{},type:{}" + userId, projectId, type); log.info("WorkOrderServiceImpl[]getExamineApplets[]input.param.userId:{},projectId:{},type:{}" + userId, projectId, type);
if (UserRoleLevelUtils.isManagerLevel(userId, LevelEnum.EXAMINE.getLevelName())) { if (!UserRoleLevelUtils.isManagerLevel(userId, LevelEnum.EXAMINE.getLevelName())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL);
} }
WorkUser user = workUserService.getById(userId); WorkUser user = workUserService.getById(userId);
...@@ -448,7 +448,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -448,7 +448,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
if (CollectionUtils.isEmpty(ids)) { if (CollectionUtils.isEmpty(ids)) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
} }
if (UserRoleLevelUtils.isManagerLevel(reviewerId, LevelEnum.EXAMINE.getLevelName())) { if (!UserRoleLevelUtils.isManagerLevel(reviewerId, LevelEnum.EXAMINE.getLevelName())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL);
} }
int i = workTimeOrderMapper.updateByIds(reviewerId, ids); int i = workTimeOrderMapper.updateByIds(reviewerId, ids);
...@@ -482,7 +482,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -482,7 +482,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
} }
// 判断当前用户是否有权限 // 判断当前用户是否有权限
if (UserRoleLevelUtils.isManagerLevel(reviewerId, LevelEnum.EXAMINE.getLevelName())) { if (!UserRoleLevelUtils.isManagerLevel(reviewerId, LevelEnum.EXAMINE.getLevelName())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL); throw new BaseCustomException(BASE_RESP_CODE_ENUM.USER_NOT_LEVEL);
} }
// 修改工单状态 // 修改工单状态
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment