Bläddra i källkod

首次病程录文书解析

zhaops 3 år sedan
förälder
incheckning
3a23035692

+ 1 - 5
trans/src/main/java/com/lantone/qc/trans/ningbozhenhai/util/CommonAnalysisUtil.java

@@ -28,7 +28,6 @@ public class CommonAnalysisUtil {
         for (String title : titles) {
             index = 0;
             firstIndex = -1;
-            Boolean firstMatch = false;
             while (index >= 0 && index < content.length()) {
                 index_1 = content.indexOf(title + ":", index);
                 index_2 = content.indexOf(title + ":", index);
@@ -38,10 +37,7 @@ public class CommonAnalysisUtil {
                 }
                 if (firstIndex == -1 && index > firstIndex) {
                     firstIndex = index;
-                    firstMatch = true;
-                }
-                if (firstMatch) {
-                    titleIndex.put(index, title);
+                    titleIndex.put(firstIndex, title);
                 }
                 StringBuffer sb = new StringBuffer(title.length());
                 for (int i = 0; i < title.length(); i++) {