Browse Source

调整代码

lijie 3 years ago
parent
commit
b1d4179b2f

+ 6 - 0
dmp-rwd-datautils/pom.xml

@@ -13,6 +13,12 @@
     <artifactId>dmp-rwd-datautils</artifactId>
 
     <dependencies>
+        <!-- mybatisPlus -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.3.1</version>
+        </dependency>
         <dependency>
             <groupId>com.persagy</groupId>
             <artifactId>dmp-common</artifactId>

File diff suppressed because it is too large
+ 1072 - 530
dmp-rwd-datautils/src/test/java/com/persagy/dmp/rwd/datautils/ImportFuncidForRwdEdit.java


+ 26 - 3
dmp-rwd-datautils/src/test/java/com/persagy/dmp/rwd/dic/ExcelUtilsForEdit.java

@@ -1,5 +1,6 @@
 package com.persagy.dmp.rwd.dic;
 
+import cn.hutool.core.io.FileUtil;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Sheet;
@@ -93,7 +94,8 @@ public class ExcelUtilsForEdit {
                         String key = item.getKey();
                         String value = item.getValue();
                         if (name.contains(value)) {
-                            System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 2) + "\", \"/附表7-系统类对象分类属性点表/" + name + "\", \"" + sheetName + "\",\"2\");");
+                            System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 2) + "\", \"/附表7-系统类对象分类属性点表/" + name + "\", \"" + sheetName + "\",\"2\",systemCommonSeq);");
+                            System.out.println("systemCommonSeq = new AtomicInteger(this.systemCommonSeq.intValue());");
                         }
                     });
                 }
@@ -127,7 +129,8 @@ public class ExcelUtilsForEdit {
                     Sheet sheet = workbook.getSheetAt(i);
                     String sheetName = sheet.getSheetName();
                     // funcids.addAll(readSheet("FFFA", "/2.2-设备设施类对象/2.2.3-系统/50-消防专业系统.xlsx", "FA火灾报警系统"));
-                    System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 4) + "\", \"" + pathName + "/" + name + "\", \"" + sheetName + "\",\"2\");");
+                    System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 4) + "\", \"" + pathName + "/" + name + "\", \"" + sheetName + "\",\"2\",equipCommonSeq);");
+                    System.out.println("equipCommonSeq = new AtomicInteger(this.equipCommonSeq.intValue());");
                 }
             }
         }
@@ -165,13 +168,28 @@ public class ExcelUtilsForEdit {
                         String key = item.getKey();
                         String value = item.getValue();
                         if (name.contains(value)) {
-                            System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 6) + "\", \"/附表9-部件类对象分类属性点表/" + name + "\", \"" + sheetName + "\",\"2\");");
+                            System.out.println("analysisSheetDataAndWriteToFile(\"" + key + sheetName.substring(0, 6) + "\", \"/附表9-部件类对象分类属性点表/" + name + "\", \"" + sheetName + "\",\"2\",componentCommonSeq);");
+                            System.out.println("componentCommonSeq = new AtomicInteger(this.componentCommonSeq.intValue());");
                         }
                     });
                 }
             }
         }
     }
+    @Test
+    public void test4() throws Exception {
+        showPathForTool(basepath + "/附表12-工具类对象分类属性点表");
+    }
+
+    public void showPathForTool(String path) throws Exception {
+        List<File> files = listFiles(path);
+        for (File file : files) {
+            String absolutePath = file.getAbsolutePath();
+            System.out.println(absolutePath);
+
+
+        }
+    }
 
 
     private List<String> listFile(String path) {
@@ -180,4 +198,9 @@ public class ExcelUtilsForEdit {
         return Arrays.stream(files).map(File::getName).filter(item -> !item.startsWith("~")).collect(Collectors.toList());
     }
 
+    private List<File> listFiles(String path) {
+        List<File> files = FileUtil.loopFiles(path);
+        return files.stream().filter(file -> !file.getName().startsWith("~")).collect(Collectors.toList());
+    }
+
 }