fix: 增加icd文件异常提示

dev
huangfeng 3 months ago
parent 63a60caac6
commit 688c702af9

@ -31,7 +31,7 @@ public class IcdXmlUtil {
return icdFile;
}
private static void processTypeRoot(JsonNode root, IcdFile icdFile) {
private static void processTypeRoot(JsonNode root, IcdFile icdFile) throws BusinessException {
LinkedHashMap<String, IcdConfigType> configMap = new LinkedHashMap<>();
Map<String, JsonNode> mapLNodeType = buildLNodeTypeMap(root);
@ -77,7 +77,7 @@ public class IcdXmlUtil {
}
private static void processIEDNode(LinkedHashMap<String, IcdConfigType> configMap, JsonNode iedNode,
Map<String, JsonNode> mapLNodeType, Map<String, JsonNode> mapDOType, Map<String, JsonNode> mapDAType) {
Map<String, JsonNode> mapLNodeType, Map<String, JsonNode> mapDOType, Map<String, JsonNode> mapDAType) throws BusinessException {
String iedName = iedNode.get("name").asText();
List<JsonNode> devList = findNodes(iedNode, "LDevice");
@ -88,7 +88,7 @@ public class IcdXmlUtil {
}
private static void processTypeDeviceNode(LinkedHashMap<String, IcdConfigType> configMap, String iedName, JsonNode deviceNode,
Map<String, JsonNode> mapLNodeType, Map<String, JsonNode> mapDOType, Map<String, JsonNode> mapDAType) {
Map<String, JsonNode> mapLNodeType, Map<String, JsonNode> mapDOType, Map<String, JsonNode> mapDAType) throws BusinessException {
String ldeviceInst = deviceNode.get("inst").asText();
Map<String, JsonNode> mapLN = buildLNMap(deviceNode);
@ -115,6 +115,9 @@ public class IcdXmlUtil {
}
JsonNode nodeLNodeType = mapLNodeType.get(lnType);
JsonNode nodeDO = findLNodeType_DO_Node(nodeLNodeType, doName);
if (nodeDO == null) {
throw new BusinessException(lnType + "该LNodeType节点下缺少名字为" + doName + "的DO节点");
}
String doType = nodeDO.get("type").asText();
JsonNode nodeDoDesc = nodeDO.get("desc");
String doDesc = null;

Loading…
Cancel
Save