heheng
2025-05-16 8485affcb0d4de05059d80cb1e844d6b18291654
src/main/java/com/gkhy/labRiskManage/application/riskReport/service/impl/RiskAccessAppServiceImpl.java
@@ -564,6 +564,8 @@
        if (currentUserId < 0){
            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户无效,请重新登录");
        }
        //todo   需要评价人员都评价完成才可以
        //提交评价结果
        AssessPlanUpdateDTO evaluateSubmitResult= assessPlanService.evaluateSubmit(currentUserId, id);
@@ -607,14 +609,15 @@
        }
        int roleTag = 0;
        UserInfoDomainDTO user = userDomainService.getUserById(currentUserId);
        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
                roleTag = 1;
            }
        }
        if (roleTag != 1){
            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限添加");
        }
//        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
//            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
//                roleTag = 1;
//            }
//        }
        //20241107修改注释权限
//        if (roleTag != 1){
//            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限添加");
//        }
        if (ObjectUtils.isEmpty(riskUnitInsertReqBO.getExperimentId())){
            throw new BusinessException(this.getClass(), ResultCode.PARAM_ERROR_NULL.getCode(), "所选实验不能为空");
        }
@@ -715,14 +718,15 @@
        }
        int roleTag = 0;
        UserInfoDomainDTO user = userDomainService.getUserById(currentUserId);
        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
                roleTag = 1;
            }
        }
        if (roleTag != 1){
            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限修改");
        }
//        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
//            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
//                roleTag = 1;
//            }
//        }
        //20241107修改注释权限
//        if (roleTag != 1){
//            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限修改");
//        }
        if (ObjectUtils.isEmpty(updateReqBO.getExperimentId())){
            throw new BusinessException(this.getClass(), ResultCode.PARAM_ERROR_NULL.getCode(), "所选实验不能为空,或实验已被删除");
        }
@@ -764,14 +768,15 @@
        }
        int roleTag = 0;
        UserInfoDomainDTO user = userDomainService.getUserById(currentUserId);
        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
                roleTag = 1;
            }
        }
        if (roleTag != 1){
            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限添加");
        }
        //20241107注释
//        for (SysUserRoleBindDomainDTO role : user.getRoles()) {
//            if (role.getRoleId() == UserRoleEnum.USER_ROLE_4.getCode().byteValue()){
//                roleTag = 1;
//            }
//        }
//        if (roleTag != 1){
//            throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户不是管理人员,无权限添加");
//        }
        RiskUnitDeleteDTO deleteResult = riskUnitService.deleteRiskUnit(currentUserId, id);
        if (ObjectUtils.isEmpty(deleteResult)){