From c0bac469f7ea8905cb488b76089100ad9d0dff0a Mon Sep 17 00:00:00 2001 From: fl <3098731433@qq.com> Date: Wed, 7 May 2025 16:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=8B=E8=BD=BD=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/StateGridServiceImpl.java | 134 ++++++++++-------- 1 file changed, 75 insertions(+), 59 deletions(-) diff --git a/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java b/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java index ec69f38..b3e521e 100644 --- a/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java +++ b/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java @@ -564,69 +564,85 @@ public class StateGridServiceImpl implements StateGridService { // 处理核心人员简历及证明材料 if (tbData.getComCoreList() != null && !tbData.getComCoreList().isEmpty()) { + // 按职位名称分组 + Map> groupedByPost = new HashMap<>(); for (ComCorePersonBean item : tbData.getComCoreList()) { + String postName = item.getPostName() != null ? item.getPostName() : "项目经理"; + groupedByPost.computeIfAbsent(postName, k -> new ArrayList<>()).add(item); + } + // 处理每个分组 + for (Map.Entry> entry : groupedByPost.entrySet()) { + String postName = entry.getKey(); + List personList = entry.getValue(); Map personMap = new HashMap<>(); - List> jlList = new ArrayList<>(); - List> corePersonImgList = new ArrayList<>(); - - personMap.put("jlTitle", (item.getPostName() != null ? item.getPostName() : "项目经理") + "简历及证明材料"); - personMap.put("userType", item.getPostName() != null ? item.getPostName() : "项目经理"); - personMap.put("zmcl", ""); - - // 处理简历信息 - Map jlMap = new HashMap<>(); - jlMap.put("type", item.getPostName() != null ? item.getPostName() : ""); - jlMap.put("name", item.getUserName() != null ? item.getUserName() : ""); - jlMap.put("card", item.getIdCard() != null ? item.getIdCard() : ""); - jlMap.put("xl", item.getEducation() != null ? item.getEducation() : ""); // 没有学历字段 - jlMap.put("zc", item.getTitle() != null ? item.getTitle() : ""); - jlMap.put("zs", item.getDiploma() != null ? item.getDiploma() : ""); - jlMap.put("bh", item.getDiplomaNum() != null ? item.getDiplomaNum() : ""); // 没有编号字段 - jlMap.put("rcdate", item.getEinDate() != null ? item.getEinDate() : ""); - jlMap.put("tcDate", item.getExitDate() != null ? item.getExitDate() : ""); - - // 处理业绩经历 - List> yjList = new ArrayList<>(); - if (item.getPeoplePerfList() != null && !item.getPeoplePerfList().isEmpty()) { - List peoplePerfList = item.getPeoplePerfList(); - for (int i = 0; i < peoplePerfList.size(); i++) { - TbCompanyPerfVo tbCompanyPerfVo = peoplePerfList.get(i); - Map yjMap = new HashMap<>(); - yjMap.put("date", tbCompanyPerfVo.getStartTime()+"至"+tbCompanyPerfVo.getEndTime()); - yjMap.put("proName", tbCompanyPerfVo.getProName() != null ? tbCompanyPerfVo.getProName() : ""); - yjMap.put("gm", tbCompanyPerfVo.getLineScale() != null ? tbCompanyPerfVo.getLineScale()+"km" : ""); - yjMap.put("content", tbCompanyPerfVo.getContractRang() != null ? tbCompanyPerfVo.getContractRang() : ""); - yjMap.put("zw", item.getPostName() != null ? item.getPostName() : ""); - yjList.add(yjMap); + personMap.put("jlTitle", postName + "简历及证明材料"); + personMap.put("userType", postName); + for (ComCorePersonBean item : personList) { + List> jlList = new ArrayList<>(); + List> personImgList2 = new ArrayList<>(); + // 处理简历信息 + Map jlMap = new HashMap<>(); + jlMap.put("type", postName); + jlMap.put("name", item.getUserName() != null ? item.getUserName() : ""); + jlMap.put("card", item.getIdCard() != null ? item.getIdCard() : ""); + jlMap.put("xl", item.getEducation() != null ? item.getEducation() : ""); + jlMap.put("zc", item.getTitle() != null ? item.getTitle() : ""); + jlMap.put("zs", item.getDiploma() != null ? item.getDiploma() : ""); + jlMap.put("bh", item.getDiplomaNum() != null ? item.getDiplomaNum() : ""); + jlMap.put("rcdate", item.getEinDate() != null ? item.getEinDate() : ""); + jlMap.put("tcDate", item.getExitDate() != null ? item.getExitDate() : ""); + // 处理业绩经历 + List> yjList = new ArrayList<>(); + if (item.getPeoplePerfList() != null && !item.getPeoplePerfList().isEmpty()) { + List peoplePerfList = item.getPeoplePerfList(); + for (int i = 0; i < peoplePerfList.size(); i++) { + TbCompanyPerfVo tbCompanyPerfVo = peoplePerfList.get(i); + Map yjMap = new HashMap<>(); + yjMap.put("date", tbCompanyPerfVo.getStartTime()+"至"+tbCompanyPerfVo.getEndTime()); + yjMap.put("proName", tbCompanyPerfVo.getProName() != null ? tbCompanyPerfVo.getProName() : ""); + yjMap.put("gm", tbCompanyPerfVo.getLineScale() != null ? tbCompanyPerfVo.getLineScale()+"km" : ""); + yjMap.put("content", tbCompanyPerfVo.getContractRang() != null ? tbCompanyPerfVo.getContractRang() : ""); + yjMap.put("zw", postName); + yjList.add(yjMap); + } } + jlMap.put("yjList", yjList); + jlList.add(jlMap); + // 处理人员证件图片 + int imgIndex = 1; + // 处理身份证、资格证书和其他资质的图片 + List allImages = new ArrayList<>(); + if (item.getIdCardFileList() != null) { + allImages.addAll(item.getIdCardFileList()); + } + if (item.getDiplomaFileList() != null) { + allImages.addAll(item.getDiplomaFileList()); + } + if (item.getOtherFileList() != null) { + allImages.addAll(item.getOtherFileList()); + } + Map map2 = new HashMap<>(); + List> imgList = new ArrayList<>(); + // 根据分组人数设置zmcl + if (personList.size() == 1) { + map2.put("zmcl", ""); + } else { + map2.put("zmcl", postName + item.getUserName()); + } + for (TbFileSourceVo file : allImages) { + Map imgMap = new HashMap<>(); + imgMap.put("index", imgIndex++); + imgMap.put("width", "5325745"); + imgMap.put("height", "7534910"); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); + imgList.add(imgMap); + } + map2.put("imgList", imgList); + personImgList2.add(map2); + personMap.put("jlList", jlList); + personMap.put("personImgList", personImgList2); + list5.add(personMap); } - jlMap.put("yjList", yjList); - jlList.add(jlMap); - // 处理人员证件图片 - int imgIndex = 1; - // 处理身份证、资格证书和其他资质的图片 - List allImages = new ArrayList<>(); - if (item.getIdCardFileList() != null) { - allImages.addAll(item.getIdCardFileList()); - } - if (item.getDiplomaFileList() != null) { - allImages.addAll(item.getDiplomaFileList()); - } - if (item.getOtherFileList() != null) { - allImages.addAll(item.getOtherFileList()); - } - for (TbFileSourceVo file : allImages) { - Map imgMap = new HashMap<>(); - imgMap.put("index", imgIndex++); - imgMap.put("width", "5325745"); - imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); - corePersonImgList.add(imgMap); - } - - personMap.put("jlList", jlList); - personMap.put("personImgList", corePersonImgList); - list5.add(personMap); } } // 设置数据到结果