| | |
| | | MPJLambdaWrapper<UnionApply> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.selectAll(UnionApply.class); |
| | | queryWrapper.selectAs(Solutions::getName,UnionApply::getSolutionName); |
| | | queryWrapper.selectAs(Solutions::getName,UnionApply::getSolutionName) |
| | | .selectAs(Solutions::getMaxAge,UnionApply::getMaxAge) |
| | | .selectAs(Solutions::getMinAge,UnionApply::getMinAge) |
| | | .selectAs(Solutions::getPrice,UnionApply::getPrice) |
| | | .selectAs(Solutions::getTimeUnit,UnionApply::getTimeUnit) |
| | | .selectAs(Solutions::getOrtherInfo,UnionApply::getOrtherInfo) |
| | | .selectAs(Solutions::getSpecialAgreement,UnionApply::getSpecialAgreement) |
| | | .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo); |
| | | queryWrapper.select("(select count(b.id) from apply_detail b where b.isdeleted=0 and b.union_apply_id=t.id) as insureNum "); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | if(insuranceApplyList.size()!=saveUnionApplyDTO.getApplyIds().size()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在数据已处理,请刷新重试"); |
| | | } |
| | | |
| | | saveUnionApplyDTO.setEndDate(DateUtil.getMontageDate(saveUnionApplyDTO.getEndDate(),2)); |
| | | UnionApply unionApply = new UnionApply(); |
| | | unionApply.setCreateDate(new Date()); |
| | | unionApply.setCreator(user.getId()); |
| | |
| | | .filter(m->Constants.equalsInteger(m.getApplyId(),(insuranceApply.getId()))).collect(Collectors.toList()); |
| | | //更新投保申请单 |
| | | insuranceApplyJoinMapper.update(null,new UpdateWrapper<InsuranceApply>().lambda() |
| | | .set(InsuranceApply::getUnionApplyTbdStatus,Constants.THREE) |
| | | .set(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | .set(InsuranceApply::getFee,price.multiply(new BigDecimal(applyDetails.size())).multiply(new BigDecimal(maxDays))) |
| | | .set(InsuranceApply::getCurrentFee,currentFee.multiply(new BigDecimal(applyDetails.size()))) |
| | |
| | | .set(InsuranceApply::getEndTime,unionApplyBXDDTO.getEndTime()) |
| | | .set(InsuranceApply::getEditDate,new Date()) |
| | | .set(InsuranceApply::getEditor,user.getId()) |
| | | .set(InsuranceApply::getCode,unionApplyBXDDTO.getCode()) |
| | | .eq(InsuranceApply::getId,insuranceApply.getId())); |
| | | //更新投保单明细金额 |
| | | applyDetailJoinMapper.update(null,new UpdateWrapper<ApplyDetail>().lambda() |
| | |
| | | .set(UnionApply::getEditor,user.getId()) |
| | | .set(UnionApply::getStartTime,unionApplyBXDDTO.getStartTime()) |
| | | .set(UnionApply::getEndTime,unionApplyBXDDTO.getEndTime()) |
| | | .set(UnionApply::getCode,unionApplyBXDDTO.getCode()) |
| | | .set(UnionApply::getFee,sumFee) |
| | | .set(UnionApply::getCurrentFee,sumCurrFee) |
| | | .eq(UnionApply::getId,unionApply.getId()) |