| | |
| | | solutions.setDataType(Constants.ZERO); |
| | | solutions.setStatus(Constants.ZERO); |
| | | solutions.setCorrectWarnTime(solutionsBase.getCorrectWarnTime()); |
| | | solutions.setDelOnlyReplace(solutionsBase.getDelOnlyReplace()); |
| | | //2024年6月17日15:56:18 仅支持替换模式下,批增日期 等于 批减日期 |
| | | if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){ |
| | | solutions.setAddValidDays(solutions.getDelValidDays()); |
| | |
| | | file.setObjType(Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey()); |
| | | file.setType(Constants.formatIntegerNum(file.getType())); |
| | | multifileMapper.insert(file); |
| | | file.setId(null); |
| | | file.setObjId(newModel.getId()); |
| | | multifileMapper.insert(file); |
| | | return solutions.getId(); |
| | |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | solutionsMapper.deleteById(id); |
| | | //查询是否已存在使用中的保单 |
| | | if(insuranceApplyMapper.selectCount(new QueryWrapper<InsuranceApply>().lambda() |
| | | .apply(" solution_id in ( select id from solutions where BASE_ID = "+id+" or id = "+id+" )" ) |
| | | .notIn(InsuranceApply::getStatus |
| | | ,Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey() |
| | | ,Constants.InsuranceApplyStatus.CLOSE.getKey() |
| | | ,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() |
| | | ) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在已投保的保单数据,无法进行删除"); |
| | | }; |
| | | solutionsMapper.update(null,new UpdateWrapper<Solutions>() |
| | | .lambda() |
| | | .set(Solutions::getIsdeleted,Constants.ONE) |
| | | .and(i->i.eq(Solutions::getId,id).or().eq(Solutions::getBaseId,id)) |
| | | ); |
| | | } |
| | | |
| | | @Override |