| | |
| | | @Override |
| | | public CommonPage selectWarningList(HzWarning warning) { |
| | | SysUser currentUser= SecurityUtils.getLoginUser().getUser(); |
| | | if(!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())){ |
| | | if(!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode()) && !currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){ |
| | | warning.setCompanyId(currentUser.getCompanyId()); |
| | | } |
| | | PageUtils.startPage(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectWarningCount() { |
| | | public Integer selectWarningCount(Long companyId) { |
| | | SysUser currentUser=SecurityUtils.getLoginUser().getUser(); |
| | | if(currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())){ |
| | | throw new ApiException("管理员不能操作"); |
| | | } |
| | | if (currentUser.getUserType().equals(UserTypeEnum.CHECK_USER.getCode())){ |
| | | return baseMapper.selectWarningCount(companyId); |
| | | } |
| | | return baseMapper.selectWarningCount(currentUser.getCompanyId()); |
| | | } |
| | | } |