| | |
| | | || saveUnionChangeDTO.getAddValidDate().getTime()> unionApply.getEndTime().getTime()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"合并单的批单加保生效期错误"); |
| | | } |
| | | |
| | | //加入 查询是否存在减保的数据 如果存在减保数据 进行该日期的判断 2024年7月30日16:38:18 |
| | | if(applyChagneDetailJoinMapper.selectCount(new QueryWrapper<ApplyChagneDetail>().lambda() |
| | | .eq(ApplyChagneDetail::getType,Constants.ONE) |
| | | .in(ApplyChagneDetail::getApplyChangeId,saveUnionChangeDTO.getApplyIds()))>Constants.ZERO){ |
| | | if(saveUnionChangeDTO.getDelValidDate().getTime()<unionApply.getStartTime().getTime() |
| | | || saveUnionChangeDTO.getDelValidDate().getTime()> unionApply.getEndTime().getTime()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"合并单的批单减保生效期错误"); |
| | | } |
| | | }; |
| | | |
| | | }else{ |
| | | if(saveUnionChangeDTO.getApplyDate().getTime()<DateUtil.afterDateByType(unionApply.getStartTime(),0,1).getTime() |
| | | || saveUnionChangeDTO.getApplyDate().getTime()> unionApply.getEndTime().getTime()){ |
| | |
| | | .selectAs(DispatchUnit::getName, ApplyChagneDetail::getDuName) |
| | | .selectAs(Member::getName, ApplyChagneDetail::getMemberName) |
| | | .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName) |
| | | .selectAs(Solutions::getId,ApplyChagneDetail::getSolutionId) |
| | | .selectAs(InsuranceApply::getCode,ApplyChagneDetail::getApplyCode) |
| | | .selectAs(InsuranceApply::getServerCost,ApplyChagneDetail::getServerCost) |
| | | .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId) |
| | |
| | | List<ApplyChagneDetail> reduceList = applyChagneDetailList.stream().filter(f->Constants.equalsInteger(f.getType(),Constants.ONE)).collect(Collectors.toList()); |
| | | List<ApplyChagneDetail> changeList = applyChagneDetailList.stream().filter(f->Constants.equalsInteger(f.getType(),Constants.TWO)).collect(Collectors.toList()); |
| | | for (ApplyChagneDetail detail:reduceList) { |
| | | solutions = solutionsMapper.selectById(detail.getSolutionId()); |
| | | Member member = memberMapper.selectById(detail.getMemberId()); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到员工数据"); |
| | |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到员工数据"); |
| | | } |
| | | solutions = solutionsMapper.selectById(detail.getSolutionId()); |
| | | this.addChangeDetailData(applyChange,detail,insuranceApply,solutions,bigDecimalVO,reduceList,i); |
| | | } |
| | | |