Commit 6d288330 by wuwenlong

设备参数解析

parent 6f17ee6f
...@@ -3,6 +3,7 @@ package com.baosight.hpjx.equipment.hp.domain; ...@@ -3,6 +3,7 @@ package com.baosight.hpjx.equipment.hp.domain;
import com.baosight.hpjx.xml.IXml; import com.baosight.hpjx.xml.IXml;
import com.baosight.hpjx.xml.XmlUtils; import com.baosight.hpjx.xml.XmlUtils;
import lombok.Data; import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
...@@ -63,4 +64,12 @@ public class CutterbarWarning { ...@@ -63,4 +64,12 @@ public class CutterbarWarning {
} }
return warning; return warning;
} }
public static void main(String[] args) {
List<CutterbarWarningBase> list = XmlUtils.readXml("<alarm><no>0</no><prio>0</prio><arg1>0</arg1><arg2>0</arg2><fileName></fileName></alarm>", CutterbarWarningBase.class);
if(CollectionUtils.isNotEmpty(list)) {
System.out.println(CutterbarWarning.convertBase(list.get(0)));
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment