模版下载接口
This commit is contained in:
parent
9689c1b3a7
commit
c0bac469f7
|
|
@ -564,69 +564,85 @@ public class StateGridServiceImpl implements StateGridService {
|
|||
|
||||
// 处理核心人员简历及证明材料
|
||||
if (tbData.getComCoreList() != null && !tbData.getComCoreList().isEmpty()) {
|
||||
// 按职位名称分组
|
||||
Map<String, List<ComCorePersonBean>> 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<String, List<ComCorePersonBean>> entry : groupedByPost.entrySet()) {
|
||||
String postName = entry.getKey();
|
||||
List<ComCorePersonBean> personList = entry.getValue();
|
||||
Map<String, Object> personMap = new HashMap<>();
|
||||
List<Map<String, Object>> jlList = new ArrayList<>();
|
||||
List<Map<String, Object>> corePersonImgList = new ArrayList<>();
|
||||
|
||||
personMap.put("jlTitle", (item.getPostName() != null ? item.getPostName() : "项目经理") + "简历及证明材料");
|
||||
personMap.put("userType", item.getPostName() != null ? item.getPostName() : "项目经理");
|
||||
personMap.put("zmcl", "");
|
||||
|
||||
// 处理简历信息
|
||||
Map<String, Object> 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<Map<String, Object>> yjList = new ArrayList<>();
|
||||
if (item.getPeoplePerfList() != null && !item.getPeoplePerfList().isEmpty()) {
|
||||
List<TbCompanyPerfVo> peoplePerfList = item.getPeoplePerfList();
|
||||
for (int i = 0; i < peoplePerfList.size(); i++) {
|
||||
TbCompanyPerfVo tbCompanyPerfVo = peoplePerfList.get(i);
|
||||
Map<String, Object> 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<Map<String, Object>> jlList = new ArrayList<>();
|
||||
List<Map<String, Object>> personImgList2 = new ArrayList<>();
|
||||
// 处理简历信息
|
||||
Map<String, Object> 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<Map<String, Object>> yjList = new ArrayList<>();
|
||||
if (item.getPeoplePerfList() != null && !item.getPeoplePerfList().isEmpty()) {
|
||||
List<TbCompanyPerfVo> peoplePerfList = item.getPeoplePerfList();
|
||||
for (int i = 0; i < peoplePerfList.size(); i++) {
|
||||
TbCompanyPerfVo tbCompanyPerfVo = peoplePerfList.get(i);
|
||||
Map<String, Object> 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<TbFileSourceVo> 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<String, Object> map2 = new HashMap<>();
|
||||
List<Map<String, Object>> imgList = new ArrayList<>();
|
||||
// 根据分组人数设置zmcl
|
||||
if (personList.size() == 1) {
|
||||
map2.put("zmcl", "");
|
||||
} else {
|
||||
map2.put("zmcl", postName + item.getUserName());
|
||||
}
|
||||
for (TbFileSourceVo file : allImages) {
|
||||
Map<String, Object> 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<TbFileSourceVo> 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<String, Object> 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);
|
||||
}
|
||||
}
|
||||
// 设置数据到结果
|
||||
|
|
|
|||
Loading…
Reference in New Issue