| | |
| | | } |
| | | applyDetail.setIdcardNo(member.getIdcardNo()); |
| | | applyDetail.setSex(member.getSex()); |
| | | applyDetail.setFee(this.countDetailFee(solutions,insuranceApply.getApplyEndTime(),insuranceApply.getApplyStartTime())); |
| | | applyDetail.setFee(Constants.countDetailFee(solutions,insuranceApply.getApplyEndTime(),insuranceApply.getApplyStartTime())); |
| | | //验证派遣单位信息是否存在 |
| | | if(duSolutionList.stream().filter(d->d.getDispatchUnitId().equals(applyDetail.getDuId())).collect(Collectors.toList()).size()<=Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"【"+applyDetail.getMemberName()+"】员工派遣单位未查询到!"); |
| | |
| | | |
| | | |
| | | |
| | | public BigDecimal countDetailFee(Solutions solutions ,Date startDate,Date endDate){ |
| | | //查询保险实际周期 |
| | | Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getDataType()); |
| | | if(cycle==-1){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"日期信息错误!"); |
| | | } |
| | | return solutions.getPrice().multiply(new BigDecimal(cycle)); |
| | | } |
| | | // public BigDecimal countDetailFee(Solutions solutions ,Date startDate,Date endDate){ |
| | | // //查询保险实际周期 |
| | | // Integer cycle = DateUtil.calculateBetween(endDate,startDate,solutions.getDataType()); |
| | | // if(cycle==-1){ |
| | | // throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"日期信息错误!"); |
| | | // } |
| | | // return solutions.getPrice().multiply(new BigDecimal(cycle)); |
| | | // } |
| | | |
| | | // public static void main(String[] args) { |
| | | // Date date1 = DateUtil.StringToDate("2023-03-01 00:00:00"); |
| | |
| | | insuranceApply.setInsureNum(applyDetailMapper.selectCount(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId()) |
| | | .eq(ApplyDetail::getIsdeleted,Constants.ZERO))); |
| | | |
| | | //设置在保时长(天数) |
| | | if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){ |
| | | //如果当前时间大于结束日期 则使用结束日期对比开始日期 |
| | | if(DateUtil.compareDate(new Date(),insuranceApply.getEndTime())>=Constants.ZERO){ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),insuranceApply.getStartTime())); |
| | | }else if(DateUtil.compareDate(insuranceApply.getStartTime(),new Date())>=Constants.ZERO){ |
| | | //未开始 |
| | | insuranceApply.setServiceDays(Constants.ZERO); |
| | | }else{ |
| | | insuranceApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),insuranceApply.getStartTime())); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //查询操作记录 |
| | | List<ApplyLog> applyLogList = applyLogJoinMapper.selectJoinList(ApplyLog.class, |
| | | new MPJLambdaWrapper<ApplyLog>() |