瀏覽代碼

恩泽身高体重解析修改

rengb 4 年之前
父節點
當前提交
94d69bb662
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. 13 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/ez/EzXmlAnalysis.java

+ 13 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/ez/EzXmlAnalysis.java

@@ -33,6 +33,7 @@ public class EzXmlAnalysis {
         Document doc = DocumentHelper.parseText(xml);
         Element rootElement = doc.getRootElement();
         jbxxInsertMap(rootElement, map);
+        sgtzInsertMap(rootElement, map);
         tgjcInsertMap(rootElement, map);
         fzjcInsertMap(rootElement, map);
         zkjcInsertMap(rootElement, map);
@@ -144,6 +145,18 @@ public class EzXmlAnalysis {
         }
     }
 
+    //身高体重
+    public static void sgtzInsertMap(Element rootElement, Map<String, String> map) {
+        Node tgjcNode = rootElement.selectSingleNode("section[@name='体格检查']");
+        if (tgjcNode != null) {
+            Node ybqkNode = tgjcNode.selectSingleNode("section[@name='一般情况']");
+            if (ybqkNode != null) {
+                elementInsertMap((Element) tgjcNode.selectSingleNode("fieldelem[@name='身高']"), map);
+                elementInsertMap((Element) tgjcNode.selectSingleNode("fieldelem[@name='体重']"), map);
+            }
+        }
+    }
+
     //体格检查
     public static void tgjcInsertMap(Element rootElement, Map<String, String> map) {
         Node tgjcNode = rootElement.selectSingleNode("section[@name='体格检查']");