ZQN
2024-06-19 72468556f3709380ab3a70e07d8a916fbd47c988
project-enforce/src/main/java/com/project/enforce/service/impl/EnforceOrderServiceImpl.java
@@ -53,20 +53,22 @@
    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);
    }
@@ -133,6 +135,7 @@
        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());