|
@@ -103,6 +103,9 @@ public class OpcDaUtil {
|
|
|
dataSource.getClsId().toUpperCase().equals(OpcDaDriverEnum.SCADA.getValue())) {
|
|
|
List<JSONObject> jsonObjectList = generWinccTree(server);
|
|
|
return Result.ok(jsonObjectList);
|
|
|
+ }else if(dataSource.getClsId().toUpperCase().equals(OpcDaDriverEnum.PAS300.getValue())){
|
|
|
+ List<JSONObject> jsonObjectList = generPAS300Tree(server);
|
|
|
+ return Result.ok(jsonObjectList);
|
|
|
} else {
|
|
|
throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "目前未适配此种驱动类型");
|
|
|
}
|
|
@@ -196,12 +199,12 @@ public class OpcDaUtil {
|
|
|
return null;
|
|
|
}
|
|
|
Collection<Leaf> leaves = browse.getLeaves();
|
|
|
- List<String> leafNameList = new ArrayList<>();
|
|
|
if (Blank.isNotEmpty(leaves)) {
|
|
|
for (Leaf leaf : leaves) {
|
|
|
- leafNameList.add(leaf.getName());
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("label", leaf.getName());
|
|
|
+ jsonList.add(jsonObject);
|
|
|
}
|
|
|
- Collections.reverse(leafNameList);
|
|
|
}
|
|
|
return jsonList;
|
|
|
}
|