| | |
| | | |
| | | @Override |
| | | public CommonPage selectQualityDecomposeList(QualityReq qualityReq) { |
| | | if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | if (!SecurityUtils.adminUser()){ |
| | | if (qualityReq.getCompanyId()==null){ |
| | | throw new ApiException("非管理员,查询条件不可为空"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public CommonResult updateQualityDecompose(DecomposeTargetReq decomposeTargetReq) { |
| | | List<QualityDecompose> qualityDecomposes = qualityDecomposeMapper.selectByCompanyId(decomposeTargetReq.getQualityId()); |
| | | if (qualityDecomposes.size()>0){ |
| | | throw new ApiException("当前企业已有数据,请删除后重试"); |
| | | } |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | decomposeTargetReq.setUpdateBy(loginUser.getUsername()); |
| | | decomposeTargetReq.setCreateTime(LocalDateTime.now()); |