| | |
| | | List<MemberInsurance> memberInsuranceList = new ArrayList<>(); |
| | | for (ApplyDetail applyDetail:applyDetailList) { |
| | | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,user.getId()); |
| | | memberInsurance.setRelationType(Constants.ZERO); |
| | | memberInsuranceList.add(memberInsurance); |
| | | } |
| | | memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList); |
| | |
| | | update.setId(model.getId()); |
| | | update.setCode(param.getCode()); |
| | | insuranceApplyMapper.updateById(update); |
| | | //修改员工保单记录 |
| | | memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>() |
| | | .lambda() |
| | | .set(MemberInsurance::getBdCode,param.getCode()) |
| | | .eq(MemberInsurance::getApplyId,model.getId()) |
| | | ); |
| | | |
| | | //删除原有的保单信息 |
| | | multifileMapper.delete(new UpdateWrapper<Multifile>().lambda() |
| | | .set(Multifile::getIsdeleted,Constants.ZERO) |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer check(InsuranceApply insuranceApply) { |
| | | if(insuranceApply.getId() == null || StringUtils.isBlank(insuranceApply.getCheckInfo())){ |
| | | if(insuranceApply.getId() == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId()); |
| | |
| | | queryWrapper.selectAll(InsuranceApply.class); |
| | | queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName); |
| | | queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName); |
| | | queryWrapper.selectAs(Solutions::getMaxAge,InsuranceApply::getMaxAge); |
| | | queryWrapper.selectAs(Solutions::getMinAge,InsuranceApply::getMinAge); |
| | | queryWrapper.selectAs(Solutions::getPrice,InsuranceApply::getPrice); |
| | | queryWrapper.selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit); |
| | | queryWrapper.select(" DATEDIFF( t.END_TIME ,now() ) AS loseEfficacyDays "); |
| | | queryWrapper.select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum"); |
| | | if(!Objects.isNull(pageWrap.getModel())&&!Objects.isNull(pageWrap.getModel().getType())){ |
| | |
| | | |
| | | MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>() |
| | | .selectAll(InsuranceApply.class) |
| | | .selectAs(Solutions::getMaxAge,InsuranceApply::getMaxAge) |
| | | .selectAs(Solutions::getMinAge,InsuranceApply::getMinAge) |
| | | .selectAs(Solutions::getPrice,InsuranceApply::getPrice) |
| | | .selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit) |
| | | .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) |
| | | .selectAs(Company::getName,InsuranceApply::getCompanyName) |
| | | .select(" ( select max(ac.APPLY_START_TIME) from apply_change ac where ac.apply_id = t.id and ac.status = 2 ) as lastChangeDate") |