| | |
| | | public List<EnforceOrderVo> queryCheckList(EnforceOrderQueryBo bo) |
| | | { |
| | | SysUser loginUser = SecurityUtils.getLoginUser().getUser(); |
| | | if (!"01".equals(loginUser.getUserType())) { |
| | | throw new BaseException("您没有审批权限,请重试!"); |
| | | if (bo.getIsCheckQuery()!=null && bo.getIsCheckQuery()==1){ |
| | | List<String> roleKeys = loginUser.getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toList()); |
| | | if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE) && roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)){ |
| | | bo.setCheckLevel(null); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE)){ |
| | | bo.setCheckLevel(0); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)) { |
| | | bo.setCheckLevel(1); |
| | | } else { |
| | | throw new BaseException("您没有审批权限,请重试!"); |
| | | } |
| | | } |
| | | List<String> roleKeys = loginUser.getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toList()); |
| | | if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE) && roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)){ |
| | | bo.setCheckLevel(null); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE)){ |
| | | bo.setCheckLevel(0); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)) { |
| | | bo.setCheckLevel(1); |
| | | } else { |
| | | throw new BaseException("您没有审批权限,请重试!"); |
| | | } |
| | | |
| | | bo.setCheckDeptId(deptService.getCheckDeptIdByLoginDeptId(loginUser.getDeptId())); |
| | | |
| | | bo.setApplyDeptIds(deptService.getApplyDeptIdsByLoginUserId(loginUser.getUserId())); |
| | | |
| | | return this.baseMapper.selectCheckList(bo); |
| | | } |
| | |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionCode()), "region_code", bo.getRegionCode()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getRegionName()), "region_name", bo.getRegionName()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getEnforceReason()), "enforce_reason", bo.getEnforceReason()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getEnforceType()), "enforce_type", bo.getEnforceType()); |
| | | qw.eq(bo.getApplyId() != null, "apply_id", bo.getApplyId()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getApplyUser()), "apply_user", bo.getApplyUser()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getApplyPhone()), "apply_phone", bo.getApplyPhone()); |