From 277f2d65a70bddbf9c571e2023315faad26e12d0 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期一, 18 三月 2024 14:11:44 +0800 Subject: [PATCH] Merge branch 'master' into 1.0.1 --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 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 7d4d91d..ab2102e 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 @@ -334,7 +334,8 @@ //濡傛灉鏄┏鍥�,鍙兘鍙┏鍥炲凡绛剧珷鐘舵�佷笅鐨勯��鍥炵敵璇风姸鎬佽繘琛屾搷浣� if(!(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE.getKey())|| Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE.getKey())|| - Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey())) + Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey())|| + Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey())) ){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); } @@ -347,6 +348,8 @@ update.setStatus(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()); }else if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_UPLOAD.getKey())){ update.setStatus(Constants.InsuranceApplyStatus.UPLOAD.getKey()); + }else if( Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS.getKey())){ + update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); } }else{ //濡傛灉鏄悓鎰�,涓ょ鐢宠閫�鍥炵姸鎬侀兘鍙搷浣� @@ -697,6 +700,7 @@ throw new BusinessException(ResponseStatus.DATA_EMPTY); } if(!(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey()) + || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) || Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()))){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); } @@ -807,8 +811,8 @@ noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()) .ne(Notices::getType,Constants.NoticeType.SIX.getStatus()) .eq(Notices::getObjId,model.getId())); - Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType); - noticesMapper.insert(notices); +// Notices notices = new Notices(noticeObjectType,Constants.ONE,model.getId(),solutions.getName(),model.getCompanyId(),noticeType); +// noticesMapper.insert(notices); String info =applyLogType.getInfo(); if(StringUtils.isNotBlank(update.getCheckInfo())){ @@ -1165,6 +1169,7 @@ queryWrapper.selectAll(InsuranceApply.class); queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName); queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName); + queryWrapper.selectAs(Solutions::getType,InsuranceApply::getSolutionType); queryWrapper.selectAs(Solutions::getMaxAge,InsuranceApply::getMaxAge); queryWrapper.selectAs(Solutions::getMinAge,InsuranceApply::getMinAge); queryWrapper.selectAs(Solutions::getPrice,InsuranceApply::getPrice); @@ -1200,6 +1205,9 @@ if (pageWrap.getModel().getSolutionId() != null) { queryWrapper.eq(InsuranceApply::getSolutionId, pageWrap.getModel().getSolutionId()); } + if (pageWrap.getModel().getSolutionType() != null) { + queryWrapper.eq(Solutions::getType, pageWrap.getModel().getSolutionType()); + } if (pageWrap.getModel().getEndTimeS() != null) { queryWrapper.ge(InsuranceApply::getEndTime, Utils.Date.getStart(pageWrap.getModel().getEndTimeS())); } @@ -1228,7 +1236,7 @@ queryWrapper.in(InsuranceApply::getStatus, pageWrap.getModel().getStatus().split(",")); } if (pageWrap.getModel().getLoseEfficacy() != null && pageWrap.getModel().getLoseEfficacy() ==1) { - queryWrapper.apply(" DATEDIFF(t.END_TIME,CURRENT_DATE() ) <= 5 "); + queryWrapper.apply(" DATEDIFF(t.END_TIME,CURRENT_DATE() ) <= 5 and t.END_TIME >= now() "); } if(CollectionUtils.isNotEmpty(pageWrap.getSorts())){ for(PageWrap.SortData sortData: pageWrap.getSorts()) { @@ -1271,6 +1279,7 @@ queryWrapper.selectAll(InsuranceApply.class); queryWrapper.selectAs(Company::getName,InsuranceApply::getCompanyName); queryWrapper.selectAs(Solutions::getName,InsuranceApply::getSolutionsName); + queryWrapper.selectAs(Solutions::getType,InsuranceApply::getSolutionType); queryWrapper.select(" ( select sum(td.fee) from taxes ts inner join tax_detial td on ts.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ) as taxesMoney "); queryWrapper.select(" ( select td.CREATE_DATE from taxes ts inner join tax_detial td on ts.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id order by td.CREATE_DATE desc limit 1 ) as taxesLast "); queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); @@ -1288,6 +1297,9 @@ } if (model.getSolutionId() != null) { queryWrapper.eq(InsuranceApply::getSolutionId, model.getSolutionId()); + } + if (model.getSolutionType() != null) { + queryWrapper.eq(Solutions::getType,model.getSolutionType() ); } if (model.getEndTimeS() != null) { queryWrapper.ge(InsuranceApply::getEndTime, Utils.Date.getStart(model.getEndTimeS())); @@ -1341,6 +1353,7 @@ .selectAs(Solutions::getMinAge,InsuranceApply::getMinAge) .selectAs(Solutions::getPrice,InsuranceApply::getPrice) .selectAs(Solutions::getTimeUnit,InsuranceApply::getTimeUnit) + .selectAs(Solutions::getType,InsuranceApply::getSolutionType) .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") @@ -1411,7 +1424,7 @@ private void initImgData(InsuranceApply model) { List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() - .eq(Multifile::getObjId,model.getId()) + .eq(Multifile::getObjId,Constants.equalsInteger(model.getSolutionType(),Constants.ZERO)? model.getId():model.getUnionApplyId()) .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.BD_APPLY_PDF.getKey() ,Constants.MultiFile.BD_SIGNED_PDF.getKey() ,Constants.MultiFile.BD_DONE_PDF.getKey()})) @@ -1512,6 +1525,7 @@ if(insuranceApplyOptDTO.getOptType().equals(Constants.ONE)){ if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey()) ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) + ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()) ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()))){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀潪鍙敵璇烽��鍥�!"); } @@ -1521,6 +1535,8 @@ insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_WAIT_SIGNATURE; }else if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey())){ insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_SIGNATURE; + }else if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey())){ + insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_BACK_APPLY_PASS; } //瀛樺偍寰呭姙淇℃伅 @@ -1540,8 +1556,9 @@ } if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey()) ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()) + ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()) ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()))){ - throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀潪鍙敵璇烽��鍥�!"); + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�佹棤娉曡繘琛屽叧闂�!"); } //鍒犻櫎鍏朵粬寰呭姙 noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,insuranceApply.getId())); -- Gitblit v1.9.3