From b85e9515805a88914c5c97de8c312146510d1b4e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 28 六月 2024 10:38:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1
---
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 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 0998336..b8f687a 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
@@ -1764,6 +1764,11 @@
updBean.setId(insuranceApply.getId());
updBean.setFee(applyDetailList.stream().map(ApplyDetail::getFee).reduce(BigDecimal.ZERO,BigDecimal::add));
insuranceApplyMapper.updateById(updBean);
+
+// if(1==1){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED);
+// }
+
//瀛樺偍鏃ュ織鏁版嵁
Constants.ApplyLogType applyLogType = Constants.ApplyLogType.UPLOAD;
String info =applyLogType.getInfo();
@@ -2057,13 +2062,11 @@
.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId)
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.eq(ApplyDetail::getIdcardNo,idCode)
+ .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
.eq(Solutions::getBaseId,solutionId)
.ne(Objects.nonNull(applyId),InsuranceApply::getId,applyId)
.notIn(InsuranceApply::getStatus
- ,Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()
- ,Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()
,Constants.InsuranceApplyStatus.CLOSE.getKey()
- ,Constants.InsuranceApplyStatus.WTB_RETURN.getKey()
,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() )
.apply(" ( " +
" '"+DateUtil.getPlusTime(startTime)+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(endTime)+"' " +
@@ -2092,11 +2095,9 @@
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.eq(ApplyDetail::getIdcardNo,idCode)
.eq(Solutions::getBaseId,solutionId)
+ .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
.notIn(InsuranceApply::getStatus
- ,Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()
- ,Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()
,Constants.InsuranceApplyStatus.CLOSE.getKey()
- ,Constants.InsuranceApplyStatus.WTB_RETURN.getKey()
,Constants.InsuranceApplyStatus.WTB_CLOSED.getKey() )
.apply(" ( " +
" '"+DateUtil.getPlusTime(startTime)+"' <= t.start_time AND t.start_time < '"+DateUtil.getPlusTime(endTime)+"' " +
@@ -2605,7 +2606,8 @@
.selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
.selectAs(Solutions::getType,InsuranceApply::getSolutionType)
.selectAs(Company::getName,InsuranceApply::getCompanyName)
- .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad inner join insurance_apply a on ad.apply_id = a.id and a.status in ( 5 , 27 ) where ad.apply_id = t.id and ad.END_TIME > now() ) as guaranteeNum")
+ .select(" ( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad where ad.apply_id = t.id ) as insureNum")
+ .select(" ifnull(( select count(DISTINCT(ad.MEMBER_ID)) from apply_detail ad inner join insurance_apply a on ad.apply_id = a.id and a.status in ( 5 , 27 ) where ad.apply_id = t.id and ad.END_TIME > now() ),0) as guaranteeNum")
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
.eq(InsuranceApply::getId,model.getId())
@@ -2627,7 +2629,7 @@
//鏌ヨ鏄庣粏
List<ApplyDetail> detailList =applyDetailJoinMapper.selectJoinList(ApplyDetail.class,wrapper1);
if(detailList!=null){
- insuranceApply.setInsureNum(detailList.size());
+// insuranceApply.setInsureNum(detailList.size());
insuranceApply.setApplyDetailList(detailList);
}
insuranceApply.setRemark(model.getRemark());
--
Gitblit v1.9.3