|
@@ -858,6 +858,54 @@ public class RWDLoadUtil {
|
|
|
String validPath = Constant.info_point;
|
|
|
|
|
|
{
|
|
|
+ JSONArray InfoPointListArray = new JSONArray();
|
|
|
+ JSONArray InfoPointRelationArray = new JSONArray();
|
|
|
+ Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(validPath + Constant.getSeperator() + "info-point.xlsx", true);
|
|
|
+ for (String sheetName : sheetMap.keySet()) {
|
|
|
+ ExcelSheet sheet = sheetMap.get(sheetName);
|
|
|
+ for (int i = 0; i < sheet.contentListList.size(); i++) {
|
|
|
+ String equipTypeName = ExcelCommonUtil.getContentInner(sheet, "设备类型名称", i);
|
|
|
+ String infoType = ExcelCommonUtil.getContentInner(sheet, "信息点类型", i);
|
|
|
+ String infoCode = ExcelCommonUtil.getContentInner(sheet, "信息点编码", i);
|
|
|
+ String isBatchControlParam = ExcelCommonUtil.getContentInner(sheet, "是否批量控制", i);
|
|
|
+ String isKeyPoint = ExcelCommonUtil.getContentInner(sheet, "是否关键参数", i);
|
|
|
+ String feedback = ExcelCommonUtil.getContentInner(sheet, "控制反馈点", i);
|
|
|
+ String force = ExcelCommonUtil.getContentInner(sheet, "强制模式", i);
|
|
|
+ String force_feedback = ExcelCommonUtil.getContentInner(sheet, "强制模式反馈", i);
|
|
|
+ {
|
|
|
+ JSONObject pointListItem = new JSONObject();
|
|
|
+ pointListItem.put("equipTypeName", equipTypeName);
|
|
|
+ pointListItem.put("infoCode", infoCode);
|
|
|
+ pointListItem.put("isControlParam", infoType.equals("设定参数") ? true : false);
|
|
|
+ pointListItem.put("isRunParam", infoType.equals("运行参数") ? true : false);
|
|
|
+ pointListItem.put("isBatchControlParam", (isBatchControlParam != null && isBatchControlParam.equals("Y")) ? true : false);
|
|
|
+ pointListItem.put("isKeyPoint", (isKeyPoint != null && isKeyPoint.equals("Y")) ? true : false);
|
|
|
+ InfoPointListArray.add(pointListItem);
|
|
|
+ }
|
|
|
+ {
|
|
|
+ JSONObject pointRelationItem = new JSONObject();
|
|
|
+ if (feedback != null) {
|
|
|
+ pointRelationItem.put("控制反馈点", feedback);
|
|
|
+ }
|
|
|
+ if (force != null) {
|
|
|
+ pointRelationItem.put("强制模式", force);
|
|
|
+ }
|
|
|
+ if (force_feedback != null) {
|
|
|
+ pointRelationItem.put("强制模式反馈", force_feedback);
|
|
|
+ }
|
|
|
+ if (pointRelationItem.size() > 0) {
|
|
|
+ pointRelationItem.put("equipTypeName", equipTypeName);
|
|
|
+ pointRelationItem.put("控制点", infoCode);
|
|
|
+ InfoPointRelationArray.add(pointRelationItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ FileUtil.Save(validPath + Constant.getSeperator() + "info-point-list" + ".json", FastJsonUtil.toFormatString(InfoPointListArray));
|
|
|
+ FileUtil.Save(validPath + Constant.getSeperator() + "info-point-relation" + ".json", FastJsonUtil.toFormatString(InfoPointRelationArray));
|
|
|
+ }
|
|
|
+
|
|
|
+ {
|
|
|
JSONArray classArray = FastJsonReaderUtil.Instance()
|
|
|
.ReadJSONArray(new File(validPath + Constant.getSeperator() + "info-point-list.json"));
|
|
|
SceneDataSet SceneDataSet = new SceneDataSet(false);
|