Răsfoiți Sursa

全量更新-优化1

chenendian 4 zile în urmă
părinte
comite
638f5bf433

+ 3 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/third/DealExcelController.java

@@ -35,6 +35,7 @@ public class DealExcelController extends BaseController {
     DealExcelServiceImpl  dealExcelService;
     DealExcelServiceImpl  dealExcelService;
 
 
 
 
+
     @GetMapping("testData/{fileName}")
     @GetMapping("testData/{fileName}")
     public R<List<Map<String,String>>> testDealData(@PathVariable String fileName) {
     public R<List<Map<String,String>>> testDealData(@PathVariable String fileName) {
         try {
         try {
@@ -68,7 +69,7 @@ public class DealExcelController extends BaseController {
                 tdgyShpOfZdList = dealExcelService.getBusinessCodeFromExcel(tdgyShpOfZdList, excelDataMap);
                 tdgyShpOfZdList = dealExcelService.getBusinessCodeFromExcel(tdgyShpOfZdList, excelDataMap);
 
 
                 //这里进行数据入库处理,直接根据业务号,和项目id去抓取不动产的附件信息并且增加节点:
                 //这里进行数据入库处理,直接根据业务号,和项目id去抓取不动产的附件信息并且增加节点:
-                dealExcelService.addBDCDataAndAttachment(tdgyShpOfZdList,1);
+                //dealExcelService.addBDCDataAndAttachment(tdgyShpOfZdList,1);
             }
             }
             return R.ok(tdgyShpOfZdList);
             return R.ok(tdgyShpOfZdList);
         } catch (Exception e) {
         } catch (Exception e) {
@@ -95,7 +96,7 @@ public class DealExcelController extends BaseController {
                 tdgyShpOfZdList = dealExcelService.getBusinessCodeFromExcelOfHouse(tdgyShpOfZdList, excelDataMap);
                 tdgyShpOfZdList = dealExcelService.getBusinessCodeFromExcelOfHouse(tdgyShpOfZdList, excelDataMap);
 
 
                 //这里进行数据入库处理,直接根据业务号,和项目id去抓取不动产的附件信息并且增加节点:
                 //这里进行数据入库处理,直接根据业务号,和项目id去抓取不动产的附件信息并且增加节点:
-                dealExcelService.addBDCDataAndAttachment(tdgyShpOfZdList,2);
+                //dealExcelService.addBDCDataAndAttachment(tdgyShpOfZdList,2);
             }
             }
             return R.ok(tdgyShpOfZdList);
             return R.ok(tdgyShpOfZdList);
         } catch (Exception e) {
         } catch (Exception e) {

+ 10 - 8
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/third/impl/DealExcelServiceImpl.java

@@ -72,6 +72,9 @@ public class DealExcelServiceImpl {
     /** 不动产单元号参与匹配的前缀长度(前19位) */
     /** 不动产单元号参与匹配的前缀长度(前19位) */
     private static final int SUB_BDCDYH_LENGTH = 19;
     private static final int SUB_BDCDYH_LENGTH = 19;
 
 
+    private static final ThreadLocal<Integer> PREFIX_COUNT = new ThreadLocal<>();
+
+
     @Autowired
     @Autowired
     private ProjectService projectService;
     private ProjectService projectService;
 
 
@@ -328,6 +331,7 @@ public class DealExcelServiceImpl {
                 log.error("项目类型不合法,项目类型只能是单独选址或者批次报批{}", projectType);
                 log.error("项目类型不合法,项目类型只能是单独选址或者批次报批{}", projectType);
                 continue;
                 continue;
             }
             }
+            PREFIX_COUNT.set(i);
 
 
             String projectName = xm.get("项目名称");
             String projectName = xm.get("项目名称");
             String newProjectName = "";
             String newProjectName = "";
@@ -575,7 +579,9 @@ public class DealExcelServiceImpl {
                 }
                 }
             }
             }
             log.info("====这里到第几条======数字{}",i);
             log.info("====这里到第几条======数字{}",i);
+
             i++;
             i++;
+
         }
         }
         return "successs";
         return "successs";
     }
     }
@@ -1283,24 +1289,20 @@ public class DealExcelServiceImpl {
             log.info("数据治理文件名称--附件材料:{}", projectFileName);
             log.info("数据治理文件名称--附件材料:{}", projectFileName);
             return;
             return;
         }
         }
-
-        if("用地规划设计条件(2018)赣新经第27号".equalsIgnoreCase(projectFileName)){
-            int xx= 1010;
-            log.info("数据治理文件名称--附件材料:{},不进行处理", projectFileName);
-        }
-
+        projectFileName = projectFileName.trim();
+        //projectFileName += PREFIX_COUNT.get();
         //这里先初始化项目(因为如果没有初始化,这里没有附件信息,将会造成前端附件数据无任何展示)
         //这里先初始化项目(因为如果没有初始化,这里没有附件信息,将会造成前端附件数据无任何展示)
         nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
         nodeAttachmentService.addDefaultAttachment(projectId, nodeId,gdType);
         String fullFilePath ="";
         String fullFilePath ="";
 
 
         Path filePath = Paths.get(outPath+"\\" +projectFileName);
         Path filePath = Paths.get(outPath+"\\" +projectFileName);
         if (Files.exists(filePath) && Files.isDirectory(filePath)) {
         if (Files.exists(filePath) && Files.isDirectory(filePath)) {
-            fullFilePath = copyFileToDirectory(outPath+"\\" +projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
+            fullFilePath = copyFileToDirectory(outPath+"\\" +projectFileName, targectDir + "\\" + projectFileName+PREFIX_COUNT.get(), nodeFileName);
         }else {
         }else {
             //当前目录存在子目录情况
             //当前目录存在子目录情况
             String innerDirName = getDealFilePath(outPath,projectFileName);//找到当前文件
             String innerDirName = getDealFilePath(outPath,projectFileName);//找到当前文件
             if (StringUtils.isNotBlank(innerDirName)) {
             if (StringUtils.isNotBlank(innerDirName)) {
-                fullFilePath = copyFileToDirectory(outPath +"\\" + innerDirName + "\\" + projectFileName, targectDir + "\\" + projectFileName, nodeFileName);
+                fullFilePath = copyFileToDirectory(outPath +"\\" + innerDirName + "\\" + projectFileName, targectDir + "\\" + projectFileName+PREFIX_COUNT.get(), nodeFileName);
             }
             }
         }
         }
 
 

+ 1 - 2
siwei-modules/siwei-apply/src/main/resources/mapper/TdgyMapper.xml

@@ -317,12 +317,11 @@
         LEFT JOIN t_node_land land ON details.upload_id = land.geom_db_id
         LEFT JOIN t_node_land land ON details.upload_id = land.geom_db_id
         LEFT JOIN t_tdgy t_table ON land.node_id = t_table.id
         LEFT JOIN t_tdgy t_table ON land.node_id = t_table.id
         LEFT JOIN t_project project ON project.id = t_table.project_id
         LEFT JOIN t_project project ON project.id = t_table.project_id
-        WHERE t_table.has_onchain = true
+        WHERE project."name"  LIKE 'pro3%'  or   project."name"  LIKE 'xxxx3%' ;
     </select>
     </select>
 
 
 
 
 
 
-
 <!--    <select id="getIntersectsGeomZdList" resultType="map">-->
 <!--    <select id="getIntersectsGeomZdList" resultType="map">-->
 <!--        SELECT project.id AS project_id,-->
 <!--        SELECT project.id AS project_id,-->
 <!--               t_table.id AS node_id,-->
 <!--               t_table.id AS node_id,-->