xufei 1 year ago
parent
commit
2b1a1ff48a

+ 1 - 1
src/test/java/com/winhc/task/DataWorksSummaryJob.java

@@ -35,7 +35,7 @@ public class DataWorksSummaryJob {
 
         //确定重跑集合(集合为空跑全量)
 
-        List<String> add = Arrays.asList("company_judicial_assistance");
+        List<String> add = Arrays.asList("company_equity_pledge_holder");
         //List<String> add = Arrays.asList("company_copyright_reg","company_copyright_works");
         //List<String> add = Arrays.asList("company_patent","company_copyright_reg","company_copyright_works");
 

+ 38 - 0
src/test/java/com/winhc/task/Schemes.java

@@ -0,0 +1,38 @@
+package com.winhc.task;
+
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author π
+ * @Description:
+ * @date 2023/4/13 10:56
+ */
+public class Schemes {
+    public static void main(String[] args) {
+        List<String> req = Arrays.asList("scode", "holder_name", "pledgee", "sharefrozennum", "deleted");
+        JSONObject j = new JSONObject();
+        JSONObject re = new JSONObject();
+        j.forEach((k, v) -> {
+            if (null == v) {
+                re.fluentPut(k, new JSONObject().fluentPut("type", Arrays.asList("null", "string")));
+            } else if (v instanceof String) {
+                List<String> a = Collections.singletonList("string");
+                if (!req.contains(a)) {
+                    a.add("null");
+                }
+                re.fluentPut(k, new JSONObject().fluentPut("type", Arrays.asList("null", "string")));
+            } else if (v instanceof Double || v instanceof Integer || v instanceof Long) {
+                List<String> a = Collections.singletonList("number");
+                if (!req.contains(a)) {
+                    a.add("null");
+                }
+                re.fluentPut(k, new JSONObject().fluentPut("type", Arrays.asList("null", "number")));
+            }
+
+        });
+    }
+}

+ 3 - 3
src/test/java/com/winhc/task/TransToExcelNewCompany.java

@@ -35,9 +35,9 @@ public class TransToExcelNewCompany {
 
 
         //全部任务
-        //run();
+        run();
         //映射跑
-        mapping_run();
+        //mapping_run();
     }
 
     private static void mapping_run() {
@@ -59,7 +59,7 @@ public class TransToExcelNewCompany {
         //如果文件夹不存在则会创建
         if (!file.exists()) file.mkdirs();
         //新公司
-        newCompanyToExcel(outPathPre, ds);
+        //newCompanyToExcel(outPathPre, ds);
         //变更
         changeToExcel(outPathPre, ds);
         //压缩文件