From f44d6f6177f565d4a6abc1df98606222537eb14d Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期日, 07 四月 2024 17:39:24 +0800
Subject: [PATCH] git ch
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 62 ++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 9 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 deeb284..47a52e0 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
@@ -780,9 +780,9 @@
if (Objects.isNull(insuranceApply)) {
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
- if (!(Constants.equalsInteger(insuranceApply.getStatus(),
- Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())||Constants.equalsInteger(insuranceApply.getStatus(),
- Constants.InsuranceApplyStatus.WTB_DONE.getKey()))
+ if (!(Constants.equalsInteger(insuranceApply.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
+ ||Constants.equalsInteger(insuranceApply.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey())
+ )
) {
throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "淇濆崟鐘舵�侀敊璇�");
}
@@ -1517,6 +1517,9 @@
queryWrapper
.selectAll(ApplyChange.class)
.selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode)
+ .selectAs(InsuranceApply::getStartTime,ApplyChange::getStartTime)
+ .selectAs(InsuranceApply::getCode,ApplyChange::getValidCode)
+ .selectAs(InsuranceApply::getEndTime,ApplyChange::getEndTime)
.selectAs(Solutions::getName,ApplyChange::getSolutionsName)
.selectAs(Solutions::getType,ApplyChange::getSolutionType)
.selectAs(Company::getName,ApplyChange::getCompanyName)
@@ -1529,13 +1532,15 @@
.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
.eq(!Objects.isNull(model.getType()),ApplyChange::getType,model.getType())
.eq(!Objects.isNull(model.getStatus())&&!model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,model.getStatus())
- .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,
+ .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),
+ ApplyChange::getStatus,
Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey(),
Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
.eq(!Objects.isNull(model.getUnionApplyId()),InsuranceApply::getUnionApplyId,model.getUnionApplyId())
// .eq(!Objects.isNull(model.getSolutionsId()),ApplyChange::getSolutionsId,model.getSolutionsId())
.eq(!Objects.isNull(model.getSolutionType()),Solutions::getType,model.getSolutionType())
.eq(!Objects.isNull(model.getApplyId()),ApplyChange::getApplyId,model.getApplyId())
+ .eq(!Objects.isNull(model.getUnionChangeId()),ApplyChange::getUnionChangeId,model.getUnionChangeId())
.eq(!Objects.isNull(model.getBaseSolutionsId()),Solutions::getBaseId,model.getBaseSolutionsId())
.like(StringUtils.isNotBlank(model.getSolutionsName()),Solutions::getName,model.getSolutionsName())
.ge(StringUtils.isNotBlank(model.getCreateDateS()),ApplyChange::getCreateDate, model.getCreateDateS()+" 00:00:00" )
@@ -1553,7 +1558,7 @@
}else if(model.getSolutionType()!=null && model.getSolutionType() ==1){
queryWrapper.eq(Solutions::getShopId,loginUserInfo.getCompanyId());
}else{
- queryWrapper.apply("((t1.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
+ queryWrapper.apply("((t2.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
"t2.type=1 and t2.shop_id="+loginUserInfo.getCompanyId()+"))") ;
}
}else{
@@ -1566,7 +1571,46 @@
}
queryWrapper.orderByDesc(ApplyDetail::getCreateDate);
- return applyChangeJoinMapper.selectJoinList(ApplyChange.class,queryWrapper);
+ List<ApplyChange> list =applyChangeJoinMapper.selectJoinList(ApplyChange.class,queryWrapper);
+ if(Constants.equalsObject(model.getGetFiles(),Constants.ONE)){
+ //濡傛灉鏄悎骞跺崟,闇�瑕佹煡璇㈤檮浠朵俊鎭�
+ initFileForList(list);
+ }
+ return list;
+ }
+ private void initFileForList(List<ApplyChange> list) {
+ List<Integer> objList = new ArrayList<>();
+ if(list!=null && list.size()>0){
+ for(ApplyChange param : list){
+ objList.add(param.getId());
+ }
+ }else{
+ return;
+ }
+ List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
+ .in(Multifile::getObjId,objList)
+ .in(Multifile::getObjType,Arrays.asList(new Integer[]{Constants.MultiFile.CA_PD_PDF.getKey()}))
+ .eq(Multifile::getIsdeleted,Constants.ZERO)
+ .orderByAsc(Multifile::getId));
+ if(multifiles!=null && multifiles.size()>0){
+ String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
+ +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode();
+ for(ApplyChange model : list){
+ for(Multifile f : multifiles) {
+ if (StringUtils.isBlank(f.getFileurl())) {
+ continue;
+ }
+ f.setFileurlFull(path+f.getFileurl());
+ if(Constants.equalsInteger(f.getObjId(), model.getId()) ){
+ if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.CA_PD_PDF.getKey())) {
+ //绛剧讲鍓嶇殑鎶曚繚鍗�
+ model.setPidanFile(f);
+ }
+ }
+ }
+ }
+ }
+
}
@@ -1726,9 +1770,9 @@
List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
.eq(Multifile::getObjId, applyChange.getId() )
- .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey()
- ,Constants.MultiFile.CA_PD_PDF.getKey()
- ,Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey()}))
+// .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey()
+// ,Constants.MultiFile.CA_PD_PDF.getKey()
+// ,Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey()}))
.eq(Multifile::getIsdeleted,Constants.ZERO));
if(multifiles!=null){
String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()
--
Gitblit v1.9.3