From 4c236ba83da7c69ac838b004d0a4b83c25fc9bea Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 23 二月 2024 16:41:02 +0800
Subject: [PATCH] mrshi
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
index 427eb00..bf1e82b 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -123,6 +123,7 @@
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey())
||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){
//宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
@@ -255,6 +256,15 @@
update.setId(model.getId());
update.setValidCode(param.getValidCode());
applyChangeMapper.updateById(update);
+
+ //淇敼鍛樺伐淇濆崟璁板綍
+ memberInsuranceJoinMapper.update(null,new UpdateWrapper<MemberInsurance>()
+ .lambda()
+ .set(MemberInsurance::getPdCode,param.getValidCode())
+ .eq(MemberInsurance::getRelationType,Constants.ONE)
+ .eq(MemberInsurance::getApplyChangeId,model.getId())
+ );
+
//鍒犻櫎鍘熸湁鐨勪繚鍗曚俊鎭�
multifileMapper.delete(new UpdateWrapper<Multifile>().lambda()
.set(Multifile::getIsdeleted,Constants.ZERO)
@@ -387,6 +397,7 @@
applyDetailJoinMapper.insert(applyDetail);
MemberInsurance memberInsurance = new MemberInsurance(applyDetail,update.getId());
+ memberInsurance.setRelationType(Constants.ONE);
memberInsuranceJoinMapper.insert(memberInsurance);
}else{
@@ -481,7 +492,7 @@
.eq(ApplyDetail::getApplyId,update.getApplyId())
.eq(ApplyDetail::getIdcardNo,detail.getIdcardNo())
.le(ApplyDetail::getStartTime,DateUtil.getMontageDate(update.getApplyStartTime(),1))
- .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(update.getApplyStartTime(),3))
+ .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(detail.getEndTime(),2))
)>Constants.ZERO){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "褰撳墠淇濆崟涓嬶紝鍔犱繚浜哄憳銆�" + detail.getMemberName() + "銆戝瓨鍦ㄦ棩鏈熷啿绐佺殑鏁版嵁");
}
@@ -521,6 +532,7 @@
currentFee = currentFee.add(add.getCurrentFee());
MemberInsurance memberInsurance = new MemberInsurance(detail, update, update.getEditor(), add.getId());
+ memberInsurance.setRelationType(Constants.ONE);
memberInsuranceList.add(memberInsurance);
applyChangeDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda()
@@ -644,7 +656,9 @@
Constants.NoticeType noticeType = Constants.NoticeType.FOUR;
if(param.getDealBackApply() ==1){
//濡傛灉鏄┏鍥�,鍙兘鍙┏鍥炲凡绛剧珷鐘舵�佷笅鐨勯��鍥炵敵璇风姸鎬佽繘琛屾搷浣�
- if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
+ if(!(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()))
+ ){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
}
applyLogType = Constants.ApplyLogType.CA_PALTFORM_REFUSE_APPLY;
@@ -723,7 +737,7 @@
}
CompanySolution companySolution = companySolutionMapper.selectOne(new QueryWrapper<CompanySolution>().lambda()
.eq(CompanySolution::getCompanyId,loginUserInfo.getCompanyId())
- .eq(CompanySolution::getSolutionId,solutions.getId())
+ .eq(CompanySolution::getSolutionBaseId,solutions.getBaseId())
.eq(CompanySolution::getIsdeleted,Constants.ZERO)
.last(" limit 1 ")
);
@@ -871,7 +885,7 @@
.eq(DispatchUnit::getUnitStatus,Constants.ONE)
.eq(DuSolution::getIsdeleted,Constants.ZERO)
.eq(DuSolution::getStatus,Constants.ONE)
- .eq(DuSolution::getSolutionId,insuranceApply.getSolutionId()));
+ .eq(DuSolution::getSolutionId,companySolution.getSolutionId()));
if(!CollectionUtils.isNotEmpty(duSolutionList)){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏁版嵁寮傚父锛氫繚闄╂柟妗堜笅鏈煡璇㈠埌娲鹃仯鍗曚綅");
}
@@ -1044,7 +1058,8 @@
.eq(ApplyDetail::getApplyId,applyChange.getApplyId())
.eq(ApplyDetail::getIdcardNo,applyChagneDetail.getIdcardNo())
.le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1))
- .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),3))
+ .ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(insuranceApply.getEndTime(),2))
+ //.ge(ApplyDetail::getEndTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),3))
)>Constants.ZERO){
throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "褰撳墠淇濆崟涓嬶紝鍔犱繚浜哄憳銆�" + applyChagneDetail.getMemberName() + "銆戝瓨鍦ㄦ棩鏈熷啿绐佺殑鏁版嵁");
}
@@ -1781,7 +1796,7 @@
BigDecimal sumPrice = countCyclePriceVO.getCyclePrice();
CountCyclePriceVO returnCountCyclePriceVO = new CountCyclePriceVO();
//鍔犲噺淇濋噾棰�
- returnCountCyclePriceVO.setCyclePrice(sumPrice.divide(new BigDecimal(sumDays),2, RoundingMode.HALF_UP).multiply(new BigDecimal(optDays)));
+ returnCountCyclePriceVO.setCyclePrice(sumPrice.multiply(new BigDecimal(optDays)).divide(new BigDecimal(sumDays),2, RoundingMode.HALF_UP));
return returnCountCyclePriceVO;
}
--
Gitblit v1.9.3