From 91ef431d0dda430889b190f79afd9c0849b35b5e Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期一, 01 四月 2024 19:37:37 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 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 4cfc6f0..cf3753f 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 @@ -1932,9 +1932,13 @@ queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId); queryWrapper.eq(InsuranceApply::getIsdeleted,Constants.ZERO); + queryWrapper.eq(model.getUnionApplyId()!=null,InsuranceApply::getUnionApplyId, model.getUnionApplyId()); //浼佷笟浜哄憳鏌ョ湅鏈紒涓氭暟鎹� if(loginUserInfo.getType().equals(Constants.ONE)){ queryWrapper.eq(InsuranceApply::getCompanyId, loginUserInfo.getCompanyId()); + }else if(loginUserInfo.getType().equals(Constants.TWO)){ + //濡傛灉鏄晢瀹舵煡鐪� + queryWrapper.eq(Solutions::getShopId, loginUserInfo.getCompanyId()); }else{ if(loginUserInfo.getCompanyIdList()!=null && loginUserInfo.getCompanyIdList().size()>0){ queryWrapper.in(InsuranceApply::getCompanyId, loginUserInfo.getCompanyIdList()); @@ -1985,9 +1989,64 @@ queryWrapper.ge(InsuranceApply::getEndTime,DateUtil.DateToStr(new Date(),"yyyy-MM-dd HH:mm:ss")); } List<InsuranceApply> list = insuranceApplyJoinMapper.selectJoinList(InsuranceApply.class, queryWrapper); + if(Constants.equalsObject(model.getGetFiles(),Constants.ONE)){ + //濡傛灉鏄悎骞跺崟,闇�瑕佹煡璇㈤檮浠朵俊鎭� + initFileForList(list); + } return list; } + private void initFileForList(List<InsuranceApply> list) { + List<Integer> objList = new ArrayList<>(); + if(list!=null && list.size()>0){ + for(InsuranceApply param : list){ + objList.get(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.BD_APPLY_PDF.getKey() + ,Constants.MultiFile.BD_SIGNED_PDF.getKey() + ,Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey() + ,Constants.MultiFile.MEMBER_LIST_LATTER.getKey() + ,Constants.MultiFile.BD_DONE_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(InsuranceApply 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.BD_APPLY_PDF.getKey())) { + //绛剧讲鍓嶇殑鎶曚繚鍗� + model.setToubaodanFile(f); + } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.BD_SIGNED_PDF.getKey())) { + //绛剧讲鍚庣殑鎶曚繚鍗� + model.setToubaodanSignedFile(f); + } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.BD_DONE_PDF.getKey())) { + //鏈�绲備繚闄╁崟 + model.setBaoxiandanFile(f); + } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.MEMBER_LIST_LATTER.getKey())) { + //鐢宠鍗� + model.setShenqingdanFile(f); + } else if (Constants.equalsInteger(f.getObjType(), Constants.MultiFile.WTB_CONFIRMATION_LATTER.getKey())) { + //绛剧讲鍚庣‘璁や功 + model.setFanganFile(f); + } + } + } + } + } + + } + @Override public long count(InsuranceApply insuranceApply) { -- Gitblit v1.9.3