| | |
| | | .selectAs(Solutions::getTimeUnit,UnionApply::getTimeUnit) |
| | | .selectAs(Solutions::getOrtherInfo,UnionApply::getOrtherInfo) |
| | | .selectAs(Solutions::getSpecialAgreement,UnionApply::getSpecialAgreement) |
| | | .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo); |
| | | .selectAs(Solutions::getSpecialInfo,UnionApply::getSpecialInfo) |
| | | .select(" (select c.NAME from insurance_apply i left join company c on i.COMPANY_ID = c.id where i.UNION_APPLY_ID = t.id limit 1 ) ",UnionApply::getCompanyName); |
| | | queryWrapper.select("(select count(distinct(b.MEMBER_ID)) from apply_detail b where b.isdeleted=0 and b.union_apply_id=t.id) as insureNum "); |
| | | queryWrapper.select(" ( select count(DISTINCT(b.MEMBER_ID)) from apply_detail b inner join insurance_apply a on b.apply_id = a.id and a.status in ( 5 , 27 ) where b.union_apply_id=t.id and b.END_TIME > now() ) as guaranteeNum"); |
| | | |
| | |
| | | queryWrapper.select("(select count(1) from apply_change a inner join insurance_apply b on a.apply_id = b.id where b.union_apply_id=t.id " + |
| | | "and b.status = "+Constants.InsuranceApplyStatus.WTB_TOUBAOING.getKey()+" and a.type = 1 ) as changeApplyNum "); |
| | | } |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId); |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | queryWrapper.eq(UnionApply::getCompanyId, user.getCompanyId()); |
| | |
| | | for (ApplyDetail applyDetail:applyDetailList) { |
| | | //查询人员信息是否存在相同的方案下是否存在 冲突数据 |
| | | InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getBaseId(), |
| | | applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), |
| | | applyDetail.getMemberId(),applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), |
| | | applyDetailJoinMapper); |
| | | fee =fee.add( |
| | | Constants.reduceFee(solutions,solutions.getPrice(),applyDetail.getStartTime(),applyDetail.getEndTime(),saveUnionApplyDTO.getStartDate(),saveUnionApplyDTO.getEndDate()) |
| | |
| | | |
| | | //查询人员信息是否存在相同的方案下是否存在 冲突数据 |
| | | InsuranceApplyServiceImpl.checkStaticMemberSolution(solutions.getBaseId(), |
| | | applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), |
| | | applyDetail.getMemberId(),applyDetail.getIdcardNo(),applyDetail.getMemberName(),unionApply.getStartTime(),unionApply.getEndTime(), |
| | | applyDetailJoinMapper); |
| | | |
| | | applyDetail.setPrice(price); |
| | | applyDetail.setFee(price.multiply(new BigDecimal(maxDays)).add(serverCost)); |
| | | applyDetail.setStartTime(unionApplyBXDDTO.getStartTime()); |
| | | applyDetail.setEndTime(unionApplyBXDDTO.getEndTime()); |
| | | |
| | | |
| | | |
| | | |
| | | MemberInsurance memberInsurance = new MemberInsurance(applyDetail,user.getId()); |
| | |
| | | ); |
| | | |
| | | } |
| | | memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList); |
| | | memberInsuranceJoinMapper.insert(memberInsuranceList); |
| | | } |
| | | BigDecimal detailFee = Constants.reduceFee(solutions,solutions.getPrice().add(serverCost),insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(), |
| | | unionApplyBXDDTO.getStartTime(),unionApplyBXDDTO.getEndTime()); |
| | |
| | | ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | |
| | | } |
| | | |
| | | |