From cdd6551b190b981b807a3b95e9635c559ccc769d Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期一, 19 五月 2025 09:45:07 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java index fca9461..3dacf38 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java @@ -215,6 +215,7 @@ queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId); queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId); + queryWrapper.eq(ApplyDetail::getIsdeleted,Constants.ZERO); ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel(); @@ -223,12 +224,20 @@ //鍦ㄤ繚 if(!Objects.isNull(applyDetailPageDTO.getApplyStatus()) &&applyDetailPageDTO.getApplyStatus().equals(Constants.ONE)){ - queryWrapper.apply(" now() <= t.END_TIME "); + queryWrapper.apply(" now() <= t.END_TIME and now() >= t.START_TIME "); + queryWrapper.in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()); } //涓嶅湪淇� if(!Objects.isNull(applyDetailPageDTO.getApplyStatus()) &&applyDetailPageDTO.getApplyStatus().equals(Constants.TWO)){ queryWrapper.apply("now() > t.END_TIME "); + queryWrapper.in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()); + } + //寰呯敓鏁� + if(!Objects.isNull(applyDetailPageDTO.getApplyStatus()) + &&applyDetailPageDTO.getApplyStatus().equals(Constants.THREE)){ + queryWrapper.apply("now() < t.START_TIME "); + queryWrapper.in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),Constants.InsuranceApplyStatus.WTB_DONE.getKey()); } queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getDuId()),ApplyDetail::getDuId,applyDetailPageDTO.getDuId()); @@ -259,11 +268,25 @@ int num = 1; for (ApplyDetail d : pageData.getRecords()){ d.setSortnum(num++); - if(d.getEndTime().compareTo(new Date())<0){ - d.setApplyStatus(Constants.ONE); + if(Constants.equalsInteger(d.getStatus(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) + || Constants.equalsInteger(d.getStatus(),Constants.InsuranceApplyStatus.WTB_DONE.getKey())){ + if(d.getEndTime().getTime()< System.currentTimeMillis()){ + d.setApplyStatus(Constants.ONE); + }else if(d.getStartTime().getTime()> System.currentTimeMillis()){ + d.setApplyStatus(Constants.TWO); + }else{ + d.setApplyStatus(Constants.ZERO); + } }else{ - d.setApplyStatus(Constants.ZERO); + d.setApplyStatus(-Constants.ONE); } + if(Objects.nonNull(d.getReduceMoney())){ + d.setFee(d.getFee().add(d.getReduceMoney())); + } + +// d.setPrice(Constants.getTwoPoint(d.getPrice())); +// d.setFee(Constants.getTwoPoint(d.getFee())); + } } -- Gitblit v1.9.3