1
0
فهرست منبع

增加文件初始化

chenendian 4 روز پیش
والد
کامیت
cfa13731eb

+ 20 - 11
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/DealExcelServiceImpl.java

@@ -686,13 +686,19 @@ public class DealExcelServiceImpl {
                 Map<String, String> jdMap = jdList.get(i);
                 String projectFileName = jdMap.get("数据治理文件名");
                 String nodeFileName = "03土地供应阶段";
-                dealCurrentNodeAttachment(projectId, id, projectFileName, nodeFileName);
 
+                String currentGdType =  gdType.equalsIgnoreCase("出让") ? "1" : (gdType.equalsIgnoreCase("划拨")? "2" : "1");
+                dealCurrentNodeAttachment(projectId, id, projectFileName, nodeFileName, currentGdType);
                 //矢量数据处理  -- 数据治理文件名
                 String dzjgh = jdMap.get("划拨决定书/出让合同电子监管号");
                 dealCurrentNodeGeom(dzjgh, id);
 
-                tdgyService.updateHasOnchain(id, projectId,true);
+                try{
+                    tdgyService.updateHasOnchain(id, projectId,true);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    log.info("自动上链失败:{}", e.getMessage());
+                }
 
             }
             // -----------------第二部分增加项目关联的(土地供应)环节结束-------------------------------
@@ -720,7 +726,7 @@ public class DealExcelServiceImpl {
                         vo.setDjDate(excel.get("登记日期"));
                         String nodeId = gyjsydscdjService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "04国有建设用地使用权首次登记阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "04国有建设用地使用权首次登记阶段", null);
                         }
                     }
                 }
@@ -750,7 +756,7 @@ public class DealExcelServiceImpl {
                         vo.setFzjg(excel.get("发证机关"));
                         String nodeId = jsydghxkService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "05建设用地规划许可阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "05建设用地规划许可阶段", null);
                         }
                     }
                 }
@@ -780,7 +786,7 @@ public class DealExcelServiceImpl {
                         vo.setFzjg(excel.get("发证机关"));
                         String nodeId = jsgcghxkService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "06建设工程规划许可阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "06建设工程规划许可阶段", null);
                         }
                     }
                 }
@@ -804,7 +810,7 @@ public class DealExcelServiceImpl {
                         vo.setGljsgcghxkh(excel.get("关联建设工程规划许可号"));
                         String nodeId = tdhyhsService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "07土地核验与规划核实阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "07土地核验与规划核实阶段", null);
                         }
                     }
                 }
@@ -830,7 +836,7 @@ public class DealExcelServiceImpl {
                         vo.setBz(excel.get("备注(数据清单)"));
                         String nodeId = gyjsydjfwscdjService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "08国有建设用地使用权及房屋所有权首次登记阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "08国有建设用地使用权及房屋所有权首次登记阶段", null);
                         }
                     }
                 }
@@ -863,7 +869,7 @@ public class DealExcelServiceImpl {
                         vo.setBpDate(excel.get("报批日期"));
                         String nodeId = ydbpService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "01用地报批阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "01用地报批阶段", null);
                         }
                     }
                 }
@@ -894,7 +900,7 @@ public class DealExcelServiceImpl {
                         vo.setXmjsyj(excel.get("项目建设依据"));
                         String nodeId = ydysyxzService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "00用地预审与选址阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "00用地预审与选址阶段", null);
                         }
                     }
                 }
@@ -919,7 +925,7 @@ public class DealExcelServiceImpl {
                         vo.setYdwz(excel.get("用地位置"));
                         String nodeId = tjyydhxService.add(vo);
                         if (CollectionUtils.isNotEmpty(jdList) && i < jdList.size()) {
-                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "09规划条件与用地红线出具阶段");
+                            dealCurrentNodeAttachment(projectId, nodeId, jdList.get(i).get("数据治理文件名"), "09规划条件与用地红线出具阶段", null);
                         }
                     }
                 }
@@ -932,12 +938,15 @@ public class DealExcelServiceImpl {
 
 
     //附件数据处理  -- 数据治理文件名
-    public void dealCurrentNodeAttachment(String projectId, String nodeId, String projectFileName, String nodeFileName) {
+    public void dealCurrentNodeAttachment(String projectId, String nodeId, String projectFileName, String nodeFileName,String gdType) {
         if (StringUtils.isBlank(projectFileName)) {
             log.info("数据治理文件名称--附件材料:{}", projectFileName);
             return;
         }
 
+        //这里先初始化项目
+        nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
+
         String fullFilePath = "";
         Path filePath = Paths.get(rootPath2019 + "\\" + projectFileName);
         if (Files.exists(filePath) && Files.isDirectory(filePath)) {