From 3970ecc4f079b2acd840d876044eb6facc25ba6a Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 30 一月 2024 20:07:44 +0800 Subject: [PATCH] 111 --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 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 b3c53e3..d9c548e 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 @@ -17,6 +17,7 @@ import com.doumee.dao.business.dto.InsuranceApplyQueryDTO; import com.doumee.dao.business.join.ApplyDetailJoinMapper; import com.doumee.dao.business.join.ApplyLogJoinMapper; +import com.doumee.dao.business.join.DuSolutionJoinMapper; import com.doumee.dao.business.join.InsuranceApplyJoinMapper; import com.doumee.dao.business.model.*; import com.doumee.dao.business.vo.CountCyclePriceVO; @@ -86,6 +87,8 @@ private MemberMapper memberMapper; @Autowired private DuSolutionMapper duSolutionMapper; + @Autowired + private DuSolutionJoinMapper duSolutionJoinMapper; @Autowired private DuWorktypeMapper duWorktypeMapper; @@ -704,7 +707,12 @@ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏈煡璇㈠埌鏂规淇℃伅"); } //鏌ヨ淇濋櫓鏂规涓嬬殑鎵�鏈夋淳閬e崟浣� - List<DuSolution> duSolutionList = duSolutionMapper.selectList(new QueryWrapper<DuSolution>().lambda() + List<DuSolution> duSolutionList = duSolutionJoinMapper.selectJoinList(DuSolution.class,new MPJLambdaWrapper<DuSolution>() + .selectAll(DuSolution.class) + .innerJoin(DispatchUnit.class,DispatchUnit::getId,DuSolution::getDispatchUnitId) + .eq(DispatchUnit::getCompanyId,insuranceApply.getCompanyId()) + .eq(DispatchUnit::getIsdeleted,Constants.ZERO) + .eq(DispatchUnit::getUnitStatus,Constants.ONE) .eq(DuSolution::getIsdeleted,Constants.ZERO) .eq(DuSolution::getStatus,Constants.ONE) .eq(DuSolution::getSolutionId,insuranceApply.getSolutionId())); @@ -1044,7 +1052,7 @@ MPJLambdaWrapper wrapper= new MPJLambdaWrapper<InsuranceApply>() .selectAll(InsuranceApply.class) .selectAs(Solutions::getName,InsuranceApply::getSolutionsName) - .selectAs(Company::getName,ApplyLog::getCompanyName) + .selectAs(Company::getName,InsuranceApply::getCompanyName) .select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum") .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) @@ -1056,6 +1064,11 @@ throw new BusinessException(ResponseStatus.DATA_EMPTY); } + if(insuranceApply.getStartTime().compareTo(new Date())<0 && insuranceApply.getEndTime().compareTo(new Date()) > 0 ){ + insuranceApply.setLoseEfficacyDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),new Date())); + } + + initApplyStatus(insuranceApply); //鏌ヨ闄勪欢鏁版嵁 -- Gitblit v1.9.3