From 4c179612568430d4d9ebdc41d520c96e0c6ecded Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期一, 01 四月 2024 19:18:51 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java | 43 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 37 insertions(+), 6 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java index 1f311eb..b37246d 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionApplyServiceImpl.java @@ -36,10 +36,7 @@ import com.github.xiaoymin.knife4j.core.util.CollectionUtils; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Objects; +import java.util.*; import java.util.stream.Collectors; /** @@ -319,6 +316,8 @@ } initStatusInfo(unionApply); + //鏌ヨ闄勪欢鏁版嵁 + initImgData(unionApply); //鏌ヨ鎿嶄綔璁板綍 List<ApplyLog> applyLogList = applyLogJoinMapper.selectJoinList(ApplyLog.class, new MPJLambdaWrapper<ApplyLog>() @@ -333,10 +332,41 @@ .orderByAsc(ApplyLog::getCreateDate) ); unionApply.setApplyLogList(applyLogList); + return unionApply; } + private void initImgData(UnionApply model) { + List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() + .eq(Multifile::getObjId, model.getId()) + .in(Multifile::getObjType, Arrays.asList(new Integer[]{ + Constants.MultiFile.HBD_BD_APPLY_PDF.getKey() + ,Constants.MultiFile.HBD_BD_SIGNED_PDF.getKey() + ,Constants.MultiFile.WTB_BD_DONE_PDF.getKey() })) + .eq(Multifile::getIsdeleted,Constants.ZERO) + .orderByAsc(Multifile::getId)); + if(multifiles!=null){ + String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() + +systemDictDataBiz.queryByCode(Constants.OSS,Constants.APPLY_FILE).getCode(); + for(Multifile f : multifiles){ + if(StringUtils.isBlank(f.getFileurl())){ + continue; + } + f.setFileurlFull(path+f.getFileurl()); + if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HBD_BD_APPLY_PDF.getKey())){ + //绛剧讲鍓嶇殑鎶曚繚鍗� + model.setToubaodanFile(f); + }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HBD_BD_SIGNED_PDF.getKey())){ + //绛剧讲鍚庣殑鎶曚繚鍗� + model.setToubaodanSignedFile(f); + }else if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.WTB_BD_DONE_PDF.getKey())){ + //鏈�绲備繚闄╁崟 + model.setBaoxiandanFile(f); + } + } + } + } @Override @@ -508,13 +538,14 @@ if(Objects.isNull(unionApply)||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){ throw new BusinessException(ResponseStatus.DATA_EMPTY); } + unionApply.setStatus(Constants.formatIntegerNum(unionApply.getStatus())); if(!unionApply.getCompanyId().equals(user.getCompanyId())){ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧烽潪鎮ㄧ殑鍚堝苟鍗曪紝鎮ㄦ棤娉曡繘琛屾搷浣滐紒"); } if(unionApply.getStatus().equals(Constants.UnionApplyStatus.FINISH.getKey())){ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡瀹岀粨锛屾偍鏃犳硶杩涜璇ユ搷浣滐紒"); } - if(unionApply.getStatus().equals(Constants.UnionApplyStatus.MERGE.getKey())){ + if(!unionApply.getStatus().equals(Constants.UnionApplyStatus.MERGE.getKey())){ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡娴佽浆锛屾偍鏃犳硶杩涜璇ユ搷浣滐紒"); } @@ -566,7 +597,7 @@ multifile.setCreateDate(new Date()); multifile.setObjId(uploadMultifileDTO.getBusinessId()); multifile.setCreateDate(new Date()); - multifile.setObjType(Constants.MultiFile.HBD_BD_SIGNED_PDF.getKey()); + multifile.setObjType(Constants.MultiFile.HBD_BD_APPLY_PDF.getKey()); multifile.setType(Constants.TWO); multifile.setFileurl(uploadMultifileDTO.getFileurl()); multifile.setName(uploadMultifileDTO.getName()); -- Gitblit v1.9.3