浏览代码

Merge remote-tracking branch 'origin/master'

liuyc 2 年之前
父节点
当前提交
a37345345b

+ 6 - 2
blade-common/src/main/java/org/springblade/common/utils/CommonUtil.java

@@ -312,10 +312,14 @@ public class CommonUtil {
      * @param filesPath
      * @throws Exception
      */
-    public static void packageZip(String filesPath) throws Exception {
+    public static void packageZip(String filesPath,String zipUrl) throws Exception {
         // 要被压缩的文件夹
         File file = new File(filesPath);   //需要压缩的文件夹
-        File zipFile = new File(filesPath + ".zip");  //放于和需要压缩的文件夹同级目录
+        File folder = new File(zipUrl);
+        if (!folder.exists() && !folder.isDirectory()) {
+            folder.mkdirs();
+        }
+        File zipFile = new File(zipUrl+"/" + "localArchive.zip");  //放于和需要压缩的文件夹同级目录
         ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
         isDirectory(file, zipOut, "", true);   //判断是否为文件夹
         zipOut.close();

+ 2 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/config/sqliteConfig.java

@@ -14,7 +14,8 @@ import javax.sql.DataSource;
 public class sqliteConfig {
     public DataSource dataSource() {
         DruidDataSource ds = new DruidDataSource();
-        ds.setUrl("jdbc:sqlite:/www/wwwroot/localClient/data");
+//        ds.setUrl("jdbc:sqlite:/www/wwwroot/localClient/data");
+        ds.setUrl("jdbc:sqlite:/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/data");
         ds.setDriverClassName("org.sqlite.JDBC");
         return ds;
     }

+ 1 - 12
blade-service/blade-archive/src/main/java/org/springblade/archive/mapper/ArchivesAutoMapper.xml

@@ -405,18 +405,7 @@
     </select>
 
     <select id="getListByProjectId" resultType="org.springblade.archive.dto.ArchivesAutoDTO">
-        select id,
-               project_id   as projectId,
-               name,
-               file_number  as fileNumber,
-               unit,
-               storage_time as storageTime,
-               node_id      as nodeId,
-               tree_sort    as treeSort,
-               status,
-               is_deleted   as isDeleted,
-               is_lock      as isLock,
-               create_time  as createTime
+        select *
         from u_archives_auto
         where project_id = #{projectId} and is_deleted = 0;
     </select>

+ 30 - 15
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveOfflineVersionInfoServiceImpl.java

@@ -30,6 +30,7 @@ import java.sql.PreparedStatement;
 import java.sql.Statement;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -52,30 +53,38 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
     @Override
     @Async
     public void packData(Long projectId) throws Exception {
-        String localUrl = "/www/wwwroot/localClient/local_archives/alilib";
-        String packUrl = "/www/wwwroot/localClient";
-        String zipUrl = "/www/wwwroot/localClient.zip";
+//        String localUrl = "/www/wwwroot/localClient/local_archives/alilib";
+//        String packUrl = "/www/wwwroot/localClient";
+//        String zipUrl = "/www/wwwroot/localClient.zip";
+        String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib";
+        String packUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient";
+        String zipUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/"+projectId;
         //清空url的文件夹
         CommonUtil.deleteDir(localUrl);
         //导入档案到sqlite
         this.autoToSqlite(projectId);
+        System.out.println("导入档案到sqlite");
         //导入归档树到sqlite
         this.contractToSqlite(projectId);
+        System.out.println("导入归档树到sqlite");
         //导入档案文件
         this.fileToSqlite(projectId);
+        System.out.println("导入档案文件");
         //打包文件
-        CommonUtil.packageZip(packUrl);
+        CommonUtil.packageZip(packUrl,zipUrl);
+        System.out.println("打包文件");
         //上传文件
-        File zipFile = ResourceUtil.getFile(zipUrl);
+//        File zipFile = ResourceUtil.getFile(zipUrl);
         //BladeFile bladeFile = ossBuilder.template().putFile("localClient.zip",new FileInputStream(zipFile));
-        BladeFile bladeFile = newIOSSClient.uploadFile("localClient.zip", zipUrl);
+//        BladeFile bladeFile = newIOSSClient.uploadFile("localClient.zip", zipUrl);
         ArchiveOfflineVersionInfo info = new ArchiveOfflineVersionInfo();
         info.setId(SnowFlakeUtil.getId());
-        info.setFileUrl(bladeFile.getLink());
-        info.setFileName(bladeFile.getOriginalName());
+        info.setFileUrl("http://fileinfo.hczcxx.cn/localArchive/"+projectId+"/localArchive.zip");
+        info.setFileName("localArchive.zip");
         info.setUploadDate(LocalDateTime.now());
         info.setProjectId(projectId);
-        info.setFileSize(CommonUtil.getResourceLength(bladeFile.getLink()) + "");
+        File file = new File(zipUrl+"/localArchive.zip");
+        info.setFileSize(file.length()+"");
         infoMapper.insert(info);
 
     }
@@ -83,7 +92,7 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
     public void fileToSqlite(Long projectId) throws Exception {
         List<ArchiveFile> list = fileClient.getListByProjectId(projectId);
         if (list != null && list.size() > 0) {
-            String localUrl = "/www/wwwroot/localClient/local_archives/alilib/";
+            String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
             for (ArchiveFile file : list) {
                 if (StringUtil.isNotBlank(file.getFileUrl())) {
                     String fileUrl = file.getFileUrl();
@@ -111,8 +120,8 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
                 statement.execute("DELETE FROM u_archive_file");
                 statement.close();
                 //导入最新数据
-                String sql = "INSERT INTO u_archive_file (id, project_id, node_id, file_number, file_name, file_time, file_url, pdf_file_url, status, is_deleted, archive_id,create_time)" +
-                        " VALUES(?,?,?,?,?,?,?,?,?,?,?,?)";
+                String sql = "INSERT INTO u_archive_file (id, project_id, node_id, file_number, file_name, file_time, file_url, pdf_file_url, status, is_deleted, archive_id,create_time,duty_user)" +
+                        " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)";
                 PreparedStatement pstm = conn.prepareStatement(sql);
                 //pstm 绑定数据
                 int i = 0;
@@ -130,6 +139,7 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
                     pstm.setInt(10, file.getIsDeleted());
                     pstm.setLong(11, file.getArchiveId() == null ? -1 : file.getArchiveId());
                     pstm.setString(12, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(file.getCreateTime()));
+                    pstm.setString(12, file.getDutyUser());
                     //添加批处理
                     pstm.addBatch();
                     if (i % 1000 == 0) {
@@ -193,7 +203,7 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
     public void autoToSqlite(Long projectId) {
         List<ArchivesAutoDTO> list = autoMapper.getListByProjectId(projectId);
         if (list != null && list.size() > 0) {
-            String localUrl = "/www/wwwroot/localClient/local_archives/alilib/";
+            String localUrl = "/www/wwwroot/Users/hongchuangyanfa/Desktop/localArchive/localClient/local_archives/alilib/";
             //拼接档案里文件的pdf设置allPdf
             for (ArchivesAutoDTO dto : list) {
                 List<ArchiveFile> files = fileClient.getArchiveFileByArchivesId(dto.getId() + "", "");
@@ -219,8 +229,8 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
                 statement.execute("DELETE FROM u_archives_auto");
                 statement.close();
                 //导入数据
-                String sql = "INSERT INTO u_archives_auto (id, project_id, name, file_number, unit,storage_time, is_archive,node_id, status, is_deleted,create_time,all_file_pdf)" +
-                        "VALUES(?,?,?,?,?,?,?,?,?,?,?,?)";
+                String sql = "INSERT INTO u_archives_auto (id, project_id, name, file_number, unit,storage_time, is_archive,node_id, status, is_deleted,create_time,all_file_pdf,file_size,tree_sort,start_date,end_date,secret_level)" +
+                        "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                 PreparedStatement pstm = conn.prepareStatement(sql);
                 //pstm 绑定数据
                 int i = 0;
@@ -238,6 +248,11 @@ public class ArchiveOfflineVersionInfoServiceImpl extends BaseServiceImpl<Archiv
                     pstm.setInt(10, auto.getIsDeleted());
                     pstm.setString(11, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(auto.getCreateTime()));
                     pstm.setString(12, auto.getAllFilePdf() == null ? "" : auto.getAllFilePdf());
+                    pstm.setLong(13, auto.getFileSize() == null ? 0L : auto.getFileSize());
+                    pstm.setString(14, auto.getTreeSort() == null ? "" : auto.getTreeSort());
+                    pstm.setString(15, auto.getStartDate() == null ? "" : auto.getStartDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+                    pstm.setString(16, auto.getEndDate() == null ? "" : auto.getEndDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+                    pstm.setString(17, auto.getSecretLevel());
 
                     //添加批处理
                     pstm.addBatch();

+ 60 - 25
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java

@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.StringUtils;
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
 import org.springblade.business.entity.ArchiveFile;
 import org.springblade.business.feign.ArchiveFileClient;
 import org.springblade.business.mapper.ArchiveFileMapper;
@@ -132,34 +134,67 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
         List<ArchiveFileVO> list = fileMapper.getAllArchiveFileByContractType(projectId);
         List<ContractInfo> infos = contractClient.queryContractListByIds(Arrays.asList(projectId));
         int key1 = 0, key2 = 0, key3 = 0;
-        //判断案卷属于1施工,2监理,还是3业主
-        for (ArchiveFileVO l : list) {
-            String type = l.getContractType();
-            if (StringUtils.isBlank(type)) {
-                //业主
-                key3++;
-            } else if ("S".equals(type)) {
-                //监理
-                key2++;
-            } else if ("C".equals(type)) {
-                //施工
-                key1++;
-            } else if (type.length() > 10) {
-                for (ContractInfo info : infos) {
-                    if (type.equals(info.getId() + "")) {
-                        Integer t = info.getContractType();
-                        if (t == 1) {
-                            key1++;
-                        } else if (t == 2) {
-                            key2++;
-                        } else {
-                            key3++;
+        //判断文件属于1施工,2监理,还是3业主
+        if (list != null && list.size() > 0) {
+            for (ArchiveFileVO l : list) {
+                String type = l.getContractType();
+                if (StringUtils.isBlank(type)) {
+                    //业主
+                    key3++;
+                } else if ("S".equals(type)) {
+                    //监理
+                    key2++;
+                } else if ("C".equals(type)) {
+                    //施工
+                    key1++;
+                } else if (type.length() > 10) {
+                    for (ContractInfo info : infos) {
+                        if (type.equals(info.getId() + "")) {
+                            Integer t = info.getContractType();
+                            if (t == 1) {
+                                key1++;
+                            } else if (t == 2) {
+                                key2++;
+                            } else {
+                                key3++;
+                            }
+                            break;
                         }
-                        break;
                     }
+                } else {
+                    System.out.println(type);
+                }
+            }
+        }else {
+            List<ArchivesAutoVO> autos = fileMapper.getAllArchiveAutoByContractType(projectId);
+            for (ArchivesAutoVO l : autos) {
+                String type = l.getContractType();
+                if (StringUtils.isBlank(type)) {
+                    //业主
+                    key3++;
+                } else if ("S".equals(type)) {
+                    //监理
+                    key2++;
+                } else if ("C".equals(type)) {
+                    //施工
+                    key1++;
+                } else if (type.length() > 10) {
+                    for (ContractInfo info : infos) {
+                        if (type.equals(info.getId() + "")) {
+                            Integer t = info.getContractType();
+                            if (t == 1) {
+                                key1++;
+                            } else if (t == 2) {
+                                key2++;
+                            } else {
+                                key3++;
+                            }
+                            break;
+                        }
+                    }
+                } else {
+                    System.out.println(type);
                 }
-            } else {
-                System.out.println(type);
             }
         }
         List<Map<String, Object>> mapList = new ArrayList<>();

+ 3 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.java

@@ -17,6 +17,8 @@
 package org.springblade.business.mapper;
 
 import org.apache.ibatis.annotations.Param;
+import org.springblade.archive.entity.ArchivesAuto;
+import org.springblade.archive.vo.ArchivesAutoVO;
 import org.springblade.business.entity.ArchiveFile;
 import org.springblade.business.vo.ArchiveFileVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -94,4 +96,5 @@ public interface ArchiveFileMapper extends BaseMapper<ArchiveFile> {
     List<ArchiveFile> getListByContractId(@Param("contractId") Long contractId);
 
 
+    List<ArchivesAutoVO> getAllArchiveAutoByContractType(@Param("projectId") Long projectId);
 }

+ 7 - 13
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -321,18 +321,7 @@
         order by sort,create_time
     </select>
     <select id="getListByProjectId" resultType="org.springblade.business.entity.ArchiveFile">
-        select id,
-               project_id   as projectId,
-               node_id      as nodeId,
-               file_number  as fileNumber,
-               file_name    as fileName,
-               file_time    as fileTime,
-               file_url     as fileUrl,
-               pdf_file_url as pdfFileUrl,
-               archive_id   as archiveId,
-               status,
-               is_deleted   as isDeleted,
-               create_time  as createTime
+        select *
         from u_archive_file
         where project_id = #{projectId} and is_deleted = 0;
     </select>
@@ -406,5 +395,10 @@
         from u_archive_file
         where contract_id = #{contractId} and is_deleted = 0 and source_type = 1;
     </select>
-
+    <select id="getAllArchiveAutoByContractType" resultType="org.springblade.archive.vo.ArchivesAutoVO">
+        SELECT uaa.*, matc.tree_code as 'contractType'
+        FROM u_archives_auto uaa
+                 left join m_archive_tree_contract matc on uaa.node_id = matc.id
+        WHERE uaa.project_id = #{projectId} and uaa.is_deleted = 0
+    </select>
 </mapper>

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/DepartmentPlanLogImpl.java

@@ -170,7 +170,7 @@ public class DepartmentPlanLogImpl extends BaseServiceImpl<DepartmentPlanLogMapp
         DepartmentPlanLogVO vo = new DepartmentPlanLogVO();
         //先判断日期是否超过35天
         if (log.getOpenPlanStartTime().until(log.getOpenPlanEndTime(), ChronoUnit.DAYS) > 35) {
-            throw new ServiceException("请不要制定超过一个月的临时计划");
+            throw new ServiceException("请不要制定超过一个月的固定计划");
         }
         //计算中途开启的工作日
         int planDays = CommonUtil.getWorkDays(log.getOpenPlanStartTime(), log.getOpenPlanEndTime());

+ 13 - 4
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ProjectCostBudgetServiceImpl.java

@@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.temporal.ChronoUnit;
 import java.time.temporal.TemporalAdjusters;
 import java.util.*;
@@ -325,7 +326,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                         vo2.setPlanDays(new BigDecimal(endDate.compareTo(startDate) + 1));
                     }else {
                         if (startDate.until(endDate,ChronoUnit.DAYS) > 35){
-                            throw new ServiceException("请不要制定超过一个月的临时计划");
+                            throw new ServiceException("请不要制定超过一个月的固定计划");
 //                            //工作天数,工具只能获取50天之内的
 //                            int i = 0;
 //                            while (endDate.compareTo(startDate) > 0){
@@ -1034,7 +1035,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
             vo2.setPlanDays(new BigDecimal(vo2.getPlanStartTime().until(vo2.getPlanEndTime(),ChronoUnit.DAYS) + 1));
         }else {
             if (vo2.getPlanStartTime().until(vo2.getPlanEndTime(),ChronoUnit.DAYS) > 35){
-                throw new ServiceException("请不要制定超过一个月的临时计划");
+                throw new ServiceException("请不要制定超过一个月的固定计划");
 //                //工作天数,工具只能获取50天之内的
 //                LocalDate startDate = vo2.getPlanStartTime();
 //                LocalDate endDate = vo2.getPlanEndTime();
@@ -1120,7 +1121,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                         l.setPlanDays(new BigDecimal(l.getPlanStartTime().until(l.getPlanEndTime(),ChronoUnit.DAYS) + 1));
                     } else {
                         if (l.getPlanStartTime().until(l.getPlanEndTime(), ChronoUnit.DAYS) > 35) {
-                            throw new ServiceException("请不要制定超过一个月的临时计划");
+                            throw new ServiceException("请不要制定超过一个月的固定计划");
                         }else {
                             l.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(budgetVO2.getPlanStartTime(), budgetVO2.getPlanEndTime())));
                         }
@@ -1170,7 +1171,7 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                 vo2.setPlanDays(new BigDecimal(startDate.until(endDate,ChronoUnit.DAYS)+ 1));
             }else {
                 if (startDate.until(endDate,ChronoUnit.DAYS) > 35){
-                    throw new ServiceException("请不要制定超过一个月的临时计划");
+                    throw new ServiceException("请不要制定超过一个月的固定计划");
 //                    //工作天数,工具只能获取50天之内的
 //                    int i = 0;
 //                    while (endDate.compareTo(startDate) > 0){
@@ -1205,6 +1206,8 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
      */
     @Override
     public void taskFinishedStats(Long PlanId, LocalDate practicalFinishTime) {
+        System.out.println("计划实际结束时间"+practicalFinishTime);
+        System.out.println("今天"+ LocalDateTime.now());
         if (practicalFinishTime == null){
             throw new ServiceException("请传入任务完成时间");
         }
@@ -1239,6 +1242,9 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                     if (planLog.getRealPlanStartTime().until(practicalFinishTime, ChronoUnit.DAYS) > 35) {
                         throw new ServiceException("固定计划完成周期超过一个月,请联系管理员");
                     }else {
+                        if (planLog.getRealPlanStartTime().compareTo(practicalFinishTime) >= 1){
+                            throw new ServiceException("数据错误,计划开始时间大于结束时间");
+                        }
                         realWorkDays = CommonUtil.getWorkDays(planLog.getRealPlanStartTime(), practicalFinishTime);
                     }
                 }else {
@@ -1249,6 +1255,9 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
                     if (planLog.getOpenPlanStartTime().until(practicalFinishTime, ChronoUnit.DAYS) > 35) {
                         throw new ServiceException("固定计划完成周期超过一个月,请联系管理员");
                     }else {
+                        if (planLog.getOpenPlanStartTime().compareTo(practicalFinishTime) >= 1){
+                            throw new ServiceException("数据错误,计划开始时间大于结束时间");
+                        }
                         int day = CommonUtil.getWorkDays(planLog.getOpenPlanStartTime(), practicalFinishTime);
                         realWorkDays = days + day;
                     }

+ 16 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreePrivateServiceImpl.java

@@ -937,7 +937,7 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
                 Map<String, Map<String, Object>> distMap = distListMap.stream().collect(Collectors.toMap(m -> m.get("privateId").toString() + m.get("k"), m -> m, mapBinaryOperator));
                 /*比较的结果*/
                 Map<String, Map<String, Object>> updateMap = new HashMap<>();
-                Map<String, Map<String, Object>> insertMap = new HashMap<>();
+                List<Map<String, Object>> insertMapList = new ArrayList<>();
                 sourceMap.forEach((k, v) -> {
                     if (distMap.containsKey(k)) {
                         String s = Func.toStr(v.get("v"));
@@ -954,7 +954,8 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
                         }
                     } else {
                         /*假如对应节点不存在,则把节点内容添加到待新增列表*/
-                        insertMap.put(v.get("privateId").toString(), v);
+                      //  insertMap.put(v.get("privateId").toString() + v.get("k"), v);
+                        insertMapList.add(v);
                     }
                 });
                 List<WbsParam> updateList;
@@ -968,15 +969,20 @@ public class WbsTreePrivateServiceImpl extends BaseServiceImpl<WbsTreePrivateMap
                     }
                 }
                 List<WbsParam> insertList = new ArrayList<>();
-                if (!insertMap.isEmpty()) {
-                    List<WbsTreePrivate> targetList = Optional.ofNullable(this.list(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getProjectId, projectId).in(WbsTreePrivate::getId, insertMap.values().stream().map(m -> m.get("privateId")).collect(Collectors.toList())))).orElse(new ArrayList<>());
+                if (!insertMapList.isEmpty()) {
+                    List<WbsTreePrivate> targetList = Optional.ofNullable(this.list(Wrappers.<WbsTreePrivate>lambdaQuery().eq(WbsTreePrivate::getProjectId, projectId).in(WbsTreePrivate::getId, insertMapList.stream().map(m -> m.get("privateId")).collect(Collectors.toList())))).orElse(new ArrayList<>());
+                     Map<String,List<Map<String,Object>>>insertGroup =insertMapList.stream().collect(Collectors.groupingBy(m->m.get("privateId").toString()));
                     targetList.forEach(e -> {
-                        Map<String, Object> kmp = insertMap.get(e.getId().toString());
-                        if (kmp != null) {
-                            WbsParam one = BeanUtil.toBean(kmp, WbsParam.class);
-                            one.setNodeId(e.getPKeyId());
-                            insertList.add(one);
-                        }
+                       List<Map<String, Object>> nodeParamList = insertGroup.get(e.getId().toString());
+                       if(Func.isNotEmpty(nodeParamList)){
+                             nodeParamList.forEach(kmp->{
+                                 if (kmp != null) {
+                                     WbsParam one = BeanUtil.toBean(kmp, WbsParam.class);
+                                     one.setNodeId(e.getPKeyId());
+                                     insertList.add(one);
+                                 }
+                             });
+                       }
                     });
                     if (!insertList.isEmpty()) {
                         insertList.forEach(i -> i.setId(SnowFlakeUtil.getId()));