| | |
| | | } |
| | | 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(), "所选实验不能为空"); |
| | | } |
| | |
| | | } |
| | | 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(), "所选实验不能为空,或实验已被删除"); |
| | | } |
| | |
| | | } |
| | | 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)){ |