فهرست منبع

义务中心医院:切词修改

rengb 4 سال پیش
والد
کامیت
6d5e5ec50d
1فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 7 3
      trans/src/main/java/com/lantone/qc/trans/comsis/CommonAnalysisUtil.java

+ 7 - 3
trans/src/main/java/com/lantone/qc/trans/comsis/CommonAnalysisUtil.java

@@ -214,7 +214,7 @@ public class CommonAnalysisUtil {
             return;
         }
         String beforeTitle = null, title = null, newTitle = null, value = null;
-        beforeTitle = titles.get(Math.max(depth - 1, 0));
+        beforeTitle = StringUtil.removeBlank(titles.get(Math.max(depth - 1, 0)));
         title = titles.get(Math.min(depth, titles.size() - 1));
         if (depth == titles.size()) {
             value = line;
@@ -222,7 +222,9 @@ public class CommonAnalysisUtil {
             if (value.startsWith(":") || value.startsWith(":")) {
                 value = value.replaceFirst("[::]", "");
             }
-            structureMap.put(StringUtil.removeBlank(beforeTitle), value.replace("\n", ""));
+            if (StringUtil.isBlank(structureMap.get(beforeTitle))) {
+                structureMap.put(beforeTitle, value.replace("\n", ""));
+            }
             return;
         }
         if (line.contains(title)) {
@@ -233,7 +235,9 @@ public class CommonAnalysisUtil {
                 if (value.startsWith(":") || value.startsWith(":")) {
                     value = value.replaceFirst("[::]", "");
                 }
-                structureMap.put(StringUtil.removeBlank(beforeTitle), value.trim().replace("\n", ""));
+                if (StringUtil.isBlank(structureMap.get(beforeTitle))) {
+                    structureMap.put(beforeTitle, value.trim().replace("\n", ""));
+                }
             }
             line = line.substring(line.indexOf(newTitle) + newTitle.length());
             depth++;