| | |
| | | //历史版本的工种信息 |
| | | SolutionWorktype newType = new SolutionWorktype(); |
| | | BeanUtils.copyProperties(w, newType); |
| | | newType.setId(null); |
| | | newType.setSolutionId(newModel.getId()); |
| | | solutionWorktypeJoinMapper.insert(newType); |
| | | } |
| | |
| | | if(StringUtils.isBlank(solutionsBase.getName())|| |
| | | StringUtils.isBlank(solutionsBase.getCompanyName()) |
| | | || Objects.isNull(solutionsBase.getValidType()) |
| | | || Objects.isNull(solutionsBase.getCanAdd()) |
| | | || Objects.isNull(solutionsBase.getCanReduce()) |
| | | || Objects.isNull(solutionsBase.getCanChangeUnit()) |
| | | || Objects.isNull(solutionsBase.getDelOnlyReplace()) |
| | | // || Objects.isNull(solutionsBase.getCanAdd()) |
| | | // || Objects.isNull(solutionsBase.getCanReduce()) |
| | | // || Objects.isNull(solutionsBase.getCanChangeUnit()) |
| | | // || Objects.isNull(solutionsBase.getDelOnlyReplace()) |
| | | || Objects.isNull(solutionsBase.getAddValidDays()) |
| | | || Objects.isNull(solutionsBase.getDelValidDays()) |
| | | || Objects.isNull(solutionsBase.getInsuranceId()) |
| | | || Objects.isNull(solutionsBase.getRiskDelayStatus()) |
| | | || Objects.isNull(solutionsBase.getRiskDelayTime()) |
| | | || Objects.isNull(solutionsBase.getRiskDelayUnit()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserStatus()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserTime()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserUnit()) |
| | | // || Objects.isNull(solutionsBase.getRiskDelayStatus()) |
| | | // || Objects.isNull(solutionsBase.getRiskDelayTime()) |
| | | // || Objects.isNull(solutionsBase.getRiskDelayUnit()) |
| | | // || Objects.isNull(solutionsBase.getRiskNewUserStatus()) |
| | | // || Objects.isNull(solutionsBase.getRiskNewUserTime()) |
| | | // || Objects.isNull(solutionsBase.getRiskNewUserUnit()) |
| | | |
| | | ||solutionsBase.getInsuranceId()==null |
| | | || Constants.formatIntegerNum(solutionsBase.getMaxAge()) < 0 |
| | |
| | | if(Constants.equalsInteger(solutionsBase.getValidType(),Constants.ZERO) && Objects.isNull(solutionsBase.getValidTypeNum())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void saveSolutionsRisk(SolutionsBase solutionsBase){ |
| | | if( Objects.isNull(solutionsBase) |
| | | || Objects.isNull(solutionsBase.getId()) |
| | | ||Objects.isNull(solutionsBase.getRiskDelayStatus()) |
| | | || Objects.isNull(solutionsBase.getRiskDelayTime()) |
| | | || Objects.isNull(solutionsBase.getRiskDelayUnit()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserStatus()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserTime()) |
| | | || Objects.isNull(solutionsBase.getRiskNewUserUnit())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | SolutionsBase model = solutionsBaseMapper.selectById(solutionsBase.getId()); |
| | | if(Objects.isNull(model)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | solutionsBaseMapper.update(new UpdateWrapper<SolutionsBase>().lambda() |
| | | .set(SolutionsBase::getEditDate,new Date()) |
| | | .set(SolutionsBase::getRiskDelayStatus,solutionsBase.getRiskDelayStatus()) |
| | | .set(SolutionsBase::getRiskDelayTime,solutionsBase.getRiskDelayTime()) |
| | | .set(SolutionsBase::getRiskDelayUnit,solutionsBase.getRiskDelayUnit()) |
| | | .set(SolutionsBase::getRiskNewUserStatus,solutionsBase.getRiskNewUserStatus()) |
| | | .set(SolutionsBase::getRiskNewUserTime,solutionsBase.getRiskNewUserTime()) |
| | | .set(SolutionsBase::getRiskNewUserUnit,solutionsBase.getRiskNewUserUnit()) |
| | | .eq(SolutionsBase::getId,solutionsBase.getId()) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | solutionsBaseMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | @Override |
| | | public List<SolutionsBase> findList(SolutionsBase solutionsBase) { |
| | | QueryWrapper<SolutionsBase> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().select(SolutionsBase::getId,SolutionsBase::getName); |
| | | wrapper.lambda().eq(SolutionsBase::getDataType,Constants.ZERO); |
| | | wrapper.lambda().eq(SolutionsBase::getIsdeleted,Constants.ZERO); |
| | | return solutionsBaseMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PageData<SolutionsBase> findPage(PageWrap<SolutionsBase> pageWrap) { |
| | | IPage<SolutionsBase> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |