From 87cc98263db6d1eeac48d0c06852c559cd0838ea Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期六, 20 一月 2024 09:37:59 +0800
Subject: [PATCH] 111
---
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 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 4cbbb7a..8940095 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
@@ -23,7 +23,6 @@
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import io.swagger.models.auth.In;
-import jdk.internal.jline.internal.Log;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -277,6 +276,13 @@
if (pageWrap.getModel().getStartTimeE() != null) {
queryWrapper.le(InsuranceApply::getStartTime, Utils.Date.getEnd(pageWrap.getModel().getStartTimeE()));
}
+ if (pageWrap.getModel().getCreateTimeS() != null) {
+ queryWrapper.ge(InsuranceApply::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateTimeS()));
+ }
+ if (pageWrap.getModel().getCreateTimeE() != null) {
+ queryWrapper.le(InsuranceApply::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateTimeE()));
+ }
+
if (pageWrap.getModel().getCode() != null) {
queryWrapper.eq(InsuranceApply::getCode, pageWrap.getModel().getCode());
}
@@ -331,7 +337,7 @@
@Override
@Transactional(rollbackFor = {Exception.class,BusinessException.class})
- public void applyReturn(InsuranceApplyOptDTO insuranceApplyOptDTO){
+ public void applyOpt(InsuranceApplyOptDTO insuranceApplyOptDTO){
if(Objects.isNull(insuranceApplyOptDTO)
||Objects.isNull(insuranceApplyOptDTO.getApplyId())
||StringUtils.isBlank(insuranceApplyOptDTO.getOptIllustration())){
@@ -348,23 +354,35 @@
if(insuranceApply.getIsdeleted().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"鏁版嵁宸插垹闄�,鏃犳硶杩涜璇ユ搷浣�");
}
- if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.COMPANY_APPLY_RETURN.getKey())){
- throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"閫�鍥炵敵璇蜂腑锛岃鍕块噸澶嶆搷浣�");
+ Constants.InsuranceApplyStatus insuranceApplyStatus = Constants.InsuranceApplyStatus.COMPANY_APPLY_RETURN;
+ if(insuranceApplyOptDTO.getOptType().equals(Constants.ONE)){
+ if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.COMPANY_APPLY_RETURN.getKey())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"閫�鍥炵敵璇蜂腑锛岃鍕块噸澶嶆搷浣�");
+ }
+ if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey())
+ ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())
+ ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀潪鍙敵璇烽��鍥�!");
+ }
+ }else if(insuranceApplyOptDTO.getOptType().equals(Constants.TWO)){
+ insuranceApplyStatus = Constants.InsuranceApplyStatus.CLOSE;
+ if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.CLOSE.getKey())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"宸插叧闂紝璇峰嬁閲嶅鎿嶄綔");
+ }
+ if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_AGREE.getKey())
+ ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀潪鍙敵璇烽��鍥�!");
+ }
}
- if(!(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD.getKey())
- ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.WAIT_SIGNATURE.getKey())
- ||insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.SIGNATURE.getKey()))){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀潪鍙敵璇烽��鍥�!");
- }
+ insuranceApply.setStatus(insuranceApplyStatus.getKey());
insuranceApply.setCheckDate(new Date());
insuranceApply.setCheckInfo(insuranceApplyOptDTO.getOptIllustration());
insuranceApply.setCheckUserId(loginUserInfo.getId());
insuranceApplyMapper.updateById(insuranceApply);
-
//瀛樺偍鏃ュ織鏁版嵁
- this.saveApplyLog(insuranceApply,Constants.InsuranceApplyStatus.COMPANY_APPLY_RETURN,null);
-
+ this.saveApplyLog(insuranceApply,insuranceApplyStatus,null);
}
+
}
--
Gitblit v1.9.3