From ca1e1982c1b6cf275b45ceb6d952465f84ed3830 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 10 六月 2025 14:59:25 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 100 ++++++++++++++++++++++---------------------------- 1 files changed, 44 insertions(+), 56 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java index 3e5853d..ebd5b49 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java @@ -330,7 +330,7 @@ ); } - memberInsuranceJoinMapper.insertBatchSomeColumn(memberInsuranceList); + memberInsuranceJoinMapper.insert(memberInsuranceList); } this.updateApplyCurrentFee(insuranceApply.getId(),null); @@ -2452,7 +2452,7 @@ this.checkMemberSolution(solutions.getParentId(),member.getIdcardNo(),member.getName(),insuranceApply.getStartTime(),insuranceApply.getEndTime(),insuranceApply.getId()); } if(CollectionUtils.isNotEmpty(addMemberList)){ - memberJoinMapper.insertBatchSomeColumn(addMemberList); + memberJoinMapper.insert(addMemberList); } memberList.addAll(addMemberList); for (int i = 0; i < applyDetailList.size(); i++) { @@ -2539,7 +2539,7 @@ } Long end = System.currentTimeMillis(); logger.error("澶勭悊鍗曟暟鎹粨鏉熸椂闂�:=========================>"+end +";鑰楁椂锛�====銆�"+(end-start)); - applyDetailJoinMapper.insertBatchSomeColumn(applyDetailList); + applyDetailJoinMapper.insert(applyDetailList); } } @@ -2589,6 +2589,47 @@ } }; + } + + + public static void checkStaticMemberSolutionNew(Integer solutionId,Integer memberId,String memberIdCard,String memberName,Date startTime, + Date endTime,ApplyDetailJoinMapper applyDetailJoinMapper){ + List<ApplyDetail> applyDetailList = new ArrayList<ApplyDetail>(); + try { + applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class, + new MPJLambdaWrapper<ApplyDetail>() + .selectAll(ApplyDetail.class) + .selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode) + .selectAs(Company::getName,ApplyDetail::getCompanyName) + .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) + .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) + .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) + .eq(ApplyDetail::getIdcardNo,memberIdCard) + .eq(Solutions::getBaseId,solutionId) + .eq(ApplyDetail::getIsdeleted,Constants.ZERO) + .notIn(InsuranceApply::getStatus + ,Constants.InsuranceApplyStatus.CLOSE.getKey() + ,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() ) + .apply(" ( " + + " '"+DateUtil.getPlusTime(startTime)+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(endTime)+"' " + + " or " + + " ( '"+DateUtil.getPlusTime(startTime)+"' < t.end_time AND t.end_time < '"+DateUtil.getPlusTime(endTime)+"' ) " + + " or " + + " ( '"+DateUtil.getPlusTime(startTime)+"' > t.start_time AND '"+DateUtil.getPlusTime(endTime)+"' < t.end_time )" + + " ) " )); + }catch (Exception e){ + + } + if(applyDetailList.size() >Constants.ZERO){ + String companyName = applyDetailList.get(Constants.ZERO).getCompanyName(); + String idCode = applyDetailList.get(Constants.ZERO).getIdcardNo(); + if(StringUtils.isNotBlank(companyName)){ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ュ憳宸ャ��"+memberName+" "+idCode+"銆戝凡鍦ㄣ��"+companyName+"銆戝瓨鍦ㄤ繚闄�,璇疯仈绯诲鏈嶇‘璁�"); + }else{ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇ュ憳宸ャ��"+memberName+" "+idCode+"銆戝湪璇ヤ繚闄╂柟妗堜笅宸插瓨鍦ㄦ姇淇濊褰曪紝鏃犳硶杩涜璇ユ搷浣�"); + } + }; + } public static void checkStaticMemberSolution(Integer solutionId,Integer memberId,String memberIdCard,String memberName,Date startTime, @@ -3765,59 +3806,6 @@ } return applyPowerVO; } - -// @Override -// public InsuranceDataVO getInsuranceDataVO(){ -// InsuranceDataVO insuranceDataVO = new InsuranceDataVO(); -// insuranceDataVO.setInsuranceTotal(Constants.ZERO); -// insuranceDataVO.setInsuranceAddTotal(Constants.ZERO); -// insuranceDataVO.setInsuranceApplyTotal(Constants.ZERO); -// insuranceDataVO.setInsuranceApplyAddTotal(Constants.ZERO); -// insuranceDataVO.setInsuranceUserTotal(Constants.ZERO); -// insuranceDataVO.setInsuranceUserAddTotal(Constants.ZERO); -// insuranceDataVO.setTotalAddFee(BigDecimal.ZERO); -// insuranceDataVO.setTotalFee(BigDecimal.ZERO); -// //鏈湀鏃ユ湡 -// String monthData = DateUtil.DateToStr(new Date(),"yyyy-MM"); -// //淇濋櫓鍏徃鏁伴噺 -// List<Insurance> insuranceList = insuranceMapper.selectList(new QueryWrapper<Insurance>().lambda().eq(Insurance::getIsdeleted,Constants.ZERO).eq(Insurance::getStatus,Constants.ZERO)); -// if(CollectionUtils.isNotEmpty(insuranceList)){ -// insuranceDataVO.setInsuranceTotal(insuranceList.size()); -// insuranceDataVO.setInsuranceAddTotal(insuranceList.stream().filter(i->Objects.nonNull(i.getCreateDate())&&DateUtil.DateToStr(i.getCreateDate(),"yyyy-MM").equals(monthData)).collect(Collectors.toList()).size()); -// } -// -// //淇濆崟鏁伴噺 -// List<InsuranceApply> insuranceApplyList = insuranceApplyMapper.selectList(new QueryWrapper<InsuranceApply>() -// .lambda().eq(InsuranceApply::getIsdeleted,Constants.ZERO).in(InsuranceApply::getStatus, -// Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) -// ); -// if(CollectionUtils.isNotEmpty(insuranceApplyList)){ -// insuranceDataVO.setInsuranceApplyTotal(insuranceApplyList.size()); -// insuranceDataVO.setInsuranceApplyAddTotal(insuranceApplyList.stream().filter(i->Objects.nonNull(i.getCreateDate())&&DateUtil.DateToStr(i.getCreateDate(),"yyyy-MM").equals(monthData)).collect(Collectors.toList()).size()); -// } -// -// //鍦ㄤ繚浜烘暟 -// List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class,new MPJLambdaWrapper<ApplyDetail>().selectAll(ApplyDetail.class) -// .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) -// .eq(InsuranceApply::getIsdeleted,Constants.ZERO).in(InsuranceApply::getStatus, -// Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()) -// .eq(ApplyDetail::getIsdeleted,Constants.ZERO) -// .apply(" ( t.START_TIME >= now() and t.END_TIME <= now() ) ") -// ); -// if(CollectionUtils.isNotEmpty(applyDetailList)){ -// insuranceDataVO.setInsuranceUserTotal(applyDetailList.size()); -// insuranceDataVO.setInsuranceUserAddTotal( -// applyDetailList.stream().filter(i->Objects.nonNull(i.getCreateDate())&&DateUtil.DateToStr(i.getCreateDate(),"yyyy-MM") -// .equals(monthData)).collect(Collectors.toList()).size()); -// -// insuranceDataVO.setTotalFee(applyDetailList.stream().map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add)); -// insuranceDataVO.setTotalAddFee(applyDetailList.stream() -// .filter(i->Objects.nonNull(i.getCreateDate())&&DateUtil.DateToStr(i.getCreateDate(),"yyyy-MM") -// .equals(monthData)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add)); -// } -// -// return insuranceDataVO; -// } -- Gitblit v1.9.3