From fcb5436199d6cf0c3a1ef6ad0dbb37589860b6a2 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期二, 09 四月 2024 14:03:25 +0800
Subject: [PATCH] 提交一把
---
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 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 d775638..bd27772 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
@@ -1532,6 +1532,17 @@
if(!(solutions.getIsdeleted().equals(Constants.ZERO)||solutions.getStatus().equals(Constants.ZERO))){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏂规淇℃伅宸茶绂佺敤");
}
+ if(solutions.getValidType().equals(Constants.ZERO)){
+ if(DateUtil.getMontageDate(
+ DateUtil.addDaysToDate(new Date(),solutions.getValidType()),0).getTime()>insuranceApply.getApplyStartTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"淇濆崟鐢熸晥璧锋湡閿欒");
+ }
+ }else{
+ if(DateUtil.getNextMonthFirst(new Date()).getTime()>insuranceApply.getApplyStartTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"淇濆崟鐢熸晥璧锋湡閿欒");
+ }
+ }
+
List<ApplyDetail> applyDetailList = insuranceApply.getApplyDetailList();
//鍒ゆ柇鏄惁瀛樺湪閲嶅淇℃伅
List<String> idCardList = applyDetailList.stream().map(i->i.getIdcardNo()).collect(Collectors.toList());
@@ -1919,11 +1930,11 @@
queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getSolutionName()),Solutions::getName,pageWrap.getModel().getSolutionName());
if(Constants.equalsInteger(pageWrap.getModel().getStatusCollect(),Constants.ApplyCollectStatus.YGQ.getKey()) ){
//濡傛灉鏄凡閬庢湡
- queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
+// queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
queryWrapper.lt(InsuranceApply::getEndTime, Utils.Date.getStart(new Date()));
}else if(Constants.equalsInteger(pageWrap.getModel().getStatusCollect(),Constants.ApplyCollectStatus.BZZ.getKey()) ){
//濡傛灉鏄繚闅滀腑
- queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
+// queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
queryWrapper.gt(InsuranceApply::getEndTime, Utils.Date.getStart(new Date()));
}
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
@@ -2452,7 +2463,8 @@
MPJLambdaWrapper<ApplyDetail> lambdaWrapper = new MPJLambdaWrapper<ApplyDetail>();
lambdaWrapper.select(ApplyDetail::getId)
.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId)
- .and(i->i.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()).or().eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey()))
+ .and(i->i.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
+ .or().eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey()))
.eq(InsuranceApply::getCompanyId,loginUserInfo.getCompanyId())
.apply(" now() between t.START_TIME and t.END_TIME ");
--
Gitblit v1.9.3