| | |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | initCreateParam(solutions);//工种数据有效性检验,去除空白行数据 |
| | | |
| | | |
| | | if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda() |
| | | .eq(Solutions::getName,solutions.getName()) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getDataType,Constants.ZERO) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险方案名称已存在"); |
| | | } |
| | | |
| | | solutions.setIsdeleted(Constants.ZERO); |
| | | solutions.setCreator(user.getId()); |
| | | solutions.setCreateDate(new Date()); |
| | |
| | | } |
| | | //数据有效性校验 |
| | | initCreateParam(solutions); |
| | | |
| | | if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda() |
| | | .eq(Solutions::getName,solutions.getName()) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getDataType,Constants.ZERO) |
| | | .ne(Solutions::getId,solutions.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险方案名称已存在"); |
| | | } |
| | | solutions.setEditor(user.getId()); |
| | | solutions.setVersion(UUID.randomUUID().toString()); |
| | | solutions.setEditDate(new Date()); |