Browse Source

调整dmp-dic配置,解决注册成dmp-rwd实例的问题

lijie 3 years ago
parent
commit
e89cf0c117

+ 1 - 1
dmp-dic/src/main/resources/bootstrap-dev.yml

@@ -1,6 +1,6 @@
 spring:
   application:
-    name: dmp-rwd
+    name: dmp-dic
   cloud:
     config:
       profile: dev2

+ 21 - 0
dmp-rwd-datautils/src/test/java/com/persagy/dmp/rwd/dic/FuncidUtils.java

@@ -222,6 +222,27 @@ public class FuncidUtils {
                 if (idx == -1) {
                     continue;
                 }
+                /*if (temp.matches("^([0-9]+[.]){2,}[^.]+$")){
+                    // 1) 11.1. 测试 2)11.1.测试
+                    String key = temp.substring(0,temp.lastIndexOf("."));
+                    String value = temp.substring(temp.lastIndexOf(".")+1).trim();
+                    data.put(key, value);
+                    ObjectNode item = array.addObject();
+                    item.put("code", key);
+                    item.put("name", value);
+                    continue;
+                }
+                if (temp.matches("^([0-9]+[.])+[0-9]+[.]?[^.]+$")){
+                    // 1)11.1 测试
+                    String[] temps = temp.split(" ");
+                    String key = temps[0];
+                    String value = temps[1];
+                    data.put(key, value);
+                    ObjectNode item = array.addObject();
+                    item.put("code", key);
+                    item.put("name", value);
+                    continue;
+                }*/
                 String key = temp.substring(0, idx);
                 String value = temp.substring(idx + 1);
                 data.put(key, value);