南网,epc和国网模板下載更新

This commit is contained in:
fl 2025-06-27 17:23:00 +08:00
parent 15f982e3a4
commit 758ee01647
3 changed files with 70 additions and 23 deletions

View File

@ -73,4 +73,9 @@ public class ComOtherPersonBean extends PersonFileBean{
*/
private Integer isNormal;
/**
* 职工类型
*/
private String workType;
}

View File

@ -23,6 +23,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author fly
@ -381,6 +382,10 @@ public class StateGridServiceImpl implements StateGridService {
//项目关键人员
if (tbData.getComCoreList() != null && !tbData.getComCoreList().isEmpty()) {
for (ComCorePersonBean item : tbData.getComCoreList()) {
if(!("项目经理".equals(item.getPostName()) || "项目负责人".equals(item.getPostName()))){
continue;
}
// 拟投入项目经理项目负责人一览表
Map<String, Object> map = new HashMap<>();
map.put("bName", ""); // 标的名称
@ -414,7 +419,7 @@ public class StateGridServiceImpl implements StateGridService {
map2.put("level", item2.getLevel()); // 项目经理项目负责人级别
}
if ("项目经理B证".equals(item2.getDiploma())) {
map2.put("bCode", ""); // 项目经理项目负责人B证证书编号
map2.put("bCode", item2.getDiploma()+item2.getDiplomaNum()); // 项目经理项目负责人B证证书编号
}
});
}
@ -503,6 +508,7 @@ public class StateGridServiceImpl implements StateGridService {
//本项目现场作业人员统计表
if (tbData.getComOtherList() != null && !tbData.getComOtherList().isEmpty()) {
for (ComOtherPersonBean item : tbData.getComOtherList()) {
//表格 数据
Map<String, Object> map = new HashMap<>();
map.put("name", item.getUserName() != null ? item.getUserName() : "" ); // 姓名
map.put("position", item.getPostName() != null ? item.getPostName() : "" ); // 工作岗位
@ -520,7 +526,19 @@ public class StateGridServiceImpl implements StateGridService {
// 投入本项目主要项目团队施工团队一览表
if (tbData.getComOtherList() != null && !tbData.getComOtherList().isEmpty()) {
for (ComOtherPersonBean item : tbData.getComOtherList()) {
//使用 Java 8 Stream 进行分组排序并每组只取一个
Map<String, ComOtherPersonBean> groupedMap = tbData.getComOtherList().stream()
.filter(Objects::nonNull) // 非空过滤
.sorted(Comparator.comparing(ComOtherPersonBean::getPostName)) // postName 排序
.collect(Collectors.toMap(
ComOtherPersonBean::getPostName, // 分组字段
item -> item, // 当前元素本身
(existing, replacement) -> existing // 如果键冲突保留第一个出现的元素
));
// 获取去重后的有序列表
List<ComOtherPersonBean> result = new ArrayList<>(groupedMap.values());
for (ComOtherPersonBean item : result) {
Map<String, Object> map = new HashMap<>();
List<String> proList = new ArrayList<>();
map.put("name", item.getUserName() != null ? item.getUserName() : ""); // 姓名
@ -542,7 +560,15 @@ public class StateGridServiceImpl implements StateGridService {
Map<String, Object> map2 = new HashMap<>();
List<Map<String, Object>> imgList = new ArrayList<>(); // 项目副经理证书图片及其他个人材料图片
map.put("title", item.getTitle() != null ? item.getTitle() : ""); // 项目名称
item.getOtherFileList().forEach(item2 -> {
List<TbFileSourceVo> allFileList = new ArrayList<>();
List<TbCertificationVo> certList = item.getCertList();
if (certList != null && !certList.isEmpty()) {
certList.forEach(item1 -> {
allFileList.addAll(item1.getTbFileSourceVoList());
});
}
allFileList.addAll(item.getOtherFileList());
allFileList.forEach(item2 -> {
Map<String, Object> imgMap = new HashMap<>();
try {
imgMap.put("index", IdUtils.fastSimpleUUID());
@ -742,24 +768,35 @@ public class StateGridServiceImpl implements StateGridService {
otherMap.put("zw", item.getPostName() != null ? item.getPostName() : "");
otherMap.put("name", item.getUserName() != null ? item.getUserName() : "");
otherMap.put("zc", item.getTitle() != null ? item.getTitle() : "");
otherMap.put("yg", item.getDiploma());
otherMap.put("zs", item.getDiploma() != null ? item.getDiploma() : "");
otherMap.put("jb", item.getLevel() != null ? item.getLevel() : "");
otherMap.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
otherMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
otherMap.put("bh", "");
// 处理证书列表
List<Map<String, Object>> zsList = new ArrayList<>();
otherMap.put("yg", item.getWorkType() != null ? item.getWorkType() : "");
// otherMap.put("zs", "");
// otherMap.put("jb", "");
// otherMap.put("zh", "");
// otherMap.put("zy", "");
// otherMap.put("bh", "");
if(!item.getCertList().isEmpty()){
for (int i = 0; i < item.getCertList().size(); i++) {
TbCertificationVo cert = item.getCertList().get(i);
if(i == 0){
otherMap.put("zs", cert.getDiploma() != null ? cert.getDiploma() : "");
otherMap.put("jb", cert.getLevel() != null ? cert.getLevel() : "");
otherMap.put("zh", cert.getDiplomaNum() != null ? cert.getDiplomaNum() : "");
otherMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
otherMap.put("bh", "");
}else{
Map<String, Object> zsMap = new HashMap<>();
zsMap.put("zs", cert.getDiploma() != null ? cert.getDiploma() : "");
zsMap.put("jb", cert.getLevel() != null ? cert.getLevel() : "");
zsMap.put("zh", cert.getDiplomaNum() != null ? cert.getDiplomaNum() : "");
zsMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
zsMap.put("bh", "");
zsList.add(zsMap);
}
}
}
//表设计是不可能有两个证件后续修改将item.getDiploma()改成集合存储
// if (item.getDiploma() != null || item.getDiplomaNum() != null || item.getMajor() != null || item.getLevel() != null) {
// Map<String, Object> zsMap = new HashMap<>();
// zsMap.put("zs", item.getDiploma() != null ? item.getDiploma() : "");
// zsMap.put("jb", item.getLevel() != null ? item.getLevel() : "");
// zsMap.put("zh", item.getDiplomaNum() != null ? item.getDiplomaNum() : "");
// zsMap.put("zy", item.getMajor() != null ? item.getMajor() : "");
// zsMap.put("bh", "");
// zsList.add(zsMap);
// }
otherMap.put("zsList", zsList);
otherUserList.add(otherMap);
// 处理人员证件图片
@ -777,8 +814,10 @@ public class StateGridServiceImpl implements StateGridService {
}
}
if (item.getDiplomaFileList() != null) {
allImages.addAll(item.getDiplomaFileList());
if (!item.getCertList().isEmpty()) {
item.getCertList().forEach(item2 -> {
allImages.addAll(item2.getTbFileSourceVoList());
});
}
if (item.getOtherFileList() != null) {
allImages.addAll(item.getOtherFileList());
@ -884,8 +923,10 @@ public class StateGridServiceImpl implements StateGridService {
// 处理人员证件图片
// 处理身份证资格证书和其他资质的图片
List<TbFileSourceVo> allImages = new ArrayList<>();
if (item.getDiplomaFileList() != null) {
allImages.addAll(item.getDiplomaFileList());
if (!item.getCertList().isEmpty()) {
item.getCertList().forEach(item2 -> {
allImages.addAll(item2.getTbFileSourceVoList());
});
}
if (item.getOtherFileList() != null) {
allImages.addAll(item.getOtherFileList());

View File

@ -222,7 +222,8 @@
tkp.diploma_num,
tkp.major,
tkp.`level`,
tgou.position as post_name
tgou.position as post_name,
if(tkp.work_type = 1,'正式职工','劳务派遣') as workType
FROM tb_gw_other_user tgou
LEFT JOIN tb_other_people tkp ON tgou.other_id = tkp.id
WHERE tgou.gw_id = #{id}