|
@@ -0,0 +1,471 @@
|
|
|
|
+package com.persagy.data_dict_tool.v2;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
+import com.pbsage.util.Constant;
|
|
|
|
+import com.pbsage.util.HttpUtil;
|
|
|
|
+import com.persagy.util.DataDictUtil;
|
|
|
|
+import com.persagy.util.ExcelSheet;
|
|
|
|
+import com.persagy.util.ExcelUtil;
|
|
|
|
+
|
|
|
|
+public class DataDictExportAllPoint {
|
|
|
|
+ public static String projectId = "Pj4403070003";
|
|
|
|
+ public static String groupCode = "WD";
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public static String second_period = "5";
|
|
|
|
+ public static String collect_cycle = "5min";
|
|
|
|
+ public static boolean filter = false;
|
|
|
|
+ public static String filter_objType = null;
|
|
|
|
+ public static String filter_classCode = null;
|
|
|
|
+ public static boolean hbase = false;
|
|
|
|
+ public static String Database = "db_public";
|
|
|
|
+ public static String QueryType = "batch_insert";
|
|
|
|
+ public static boolean all_point = false;
|
|
|
|
+
|
|
|
|
+ public static Map<String, String[]> up_lowMap = null;
|
|
|
|
+
|
|
|
|
+ public static Map<String, Map<String, String[]>> objectMapMap = null;
|
|
|
|
+
|
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
|
+ int index = 1;
|
|
|
|
+ projectId = args[index++];
|
|
|
|
+ groupCode = args[index++];
|
|
|
|
+ second_period = args[index++];
|
|
|
|
+ collect_cycle = args[index++];
|
|
|
|
+ while (index < args.length) {
|
|
|
|
+ if (args[index].equalsIgnoreCase("filter")) {
|
|
|
|
+ filter = true;
|
|
|
|
+ }
|
|
|
|
+ if (args[index].startsWith("-objType:")) {
|
|
|
|
+ filter_objType = args[index].substring("-objType:".length());
|
|
|
|
+ }
|
|
|
|
+ if (args[index].startsWith("-classCode:")) {
|
|
|
|
+ filter_classCode = args[index].substring("-classCode:".length());
|
|
|
|
+ }
|
|
|
|
+ if (args[index].startsWith("-db:")) {
|
|
|
|
+ Database = args[index].substring("-db:".length());
|
|
|
|
+ }
|
|
|
|
+ if (args[index].equalsIgnoreCase("hbase")) {
|
|
|
|
+ hbase = true;
|
|
|
|
+ }
|
|
|
|
+ if (args[index].startsWith("-db:")) {
|
|
|
|
+ Database = args[index].substring("-db:".length());
|
|
|
|
+ }
|
|
|
|
+ if (args[index].equalsIgnoreCase("override")) {
|
|
|
|
+ QueryType = "batch_put";
|
|
|
|
+ }
|
|
|
|
+ if (args[index].startsWith("-all:")) {
|
|
|
|
+ all_point = args[index].substring("-all:".length()).equalsIgnoreCase("true") ? true : false;
|
|
|
|
+ }
|
|
|
|
+ index++;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (filter) {
|
|
|
|
+ objectMapMap = new HashMap<String, Map<String, String[]>>();
|
|
|
|
+ ExcelSheet ExcelSheet = ExcelUtil.ReadSheet(Constant.GetPath() + "/info_code-" + groupCode + ".xlsx", "Sheet1", true);
|
|
|
|
+ int index_1 = -1;
|
|
|
|
+ int index_2 = -1;
|
|
|
|
+ int index_3 = -1;
|
|
|
|
+ int index_4 = -1;
|
|
|
|
+ int index_5 = -1;
|
|
|
|
+ for (int i = 0; i < ExcelSheet.titleColList.size(); i++) {
|
|
|
|
+ String titleCol = ExcelSheet.titleColList.get(i);
|
|
|
|
+ if (titleCol == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ if (titleCol.equals("系统编码")) {
|
|
|
|
+ index_1 = i;
|
|
|
|
+ }
|
|
|
|
+ if (titleCol.equals("设备类型编码")) {
|
|
|
|
+ index_2 = i;
|
|
|
|
+ }
|
|
|
|
+ if (titleCol.equals("信息点编码")) {
|
|
|
|
+ index_3 = i;
|
|
|
|
+ }
|
|
|
|
+ if (titleCol.equals("下限")) {
|
|
|
|
+ index_4 = i;
|
|
|
|
+ }
|
|
|
|
+ if (titleCol.equals("上限")) {
|
|
|
|
+ index_5 = i;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (int i = 0; i < ExcelSheet.contentListList.size(); i++) {
|
|
|
|
+ String content1 = ExcelUtil.getContentInner(ExcelSheet, index_1, i);
|
|
|
|
+ String content2 = ExcelUtil.getContentInner(ExcelSheet, index_2, i);
|
|
|
|
+ String content3 = ExcelUtil.getContentInner(ExcelSheet, index_3, i);
|
|
|
|
+ String content4 = ExcelUtil.getContentInner(ExcelSheet, index_4, i);
|
|
|
|
+ String content5 = ExcelUtil.getContentInner(ExcelSheet, index_5, i);
|
|
|
|
+ if (content1 == null && content3 == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ String[] low_high;
|
|
|
|
+ if (content4 == null || content4.trim().length() == 0 || content4.trim().equalsIgnoreCase("null") || content5 == null
|
|
|
|
+ || content5.trim().length() == 0 || content5.trim().equalsIgnoreCase("null")) {
|
|
|
|
+ low_high = null;
|
|
|
|
+ } else {
|
|
|
|
+ low_high = new String[2];
|
|
|
|
+ low_high[0] = content4;
|
|
|
|
+ low_high[1] = content5;
|
|
|
|
+ }
|
|
|
|
+ if (content2 == null || content2.length() == 0) {
|
|
|
|
+ if (!objectMapMap.containsKey(content1)) {
|
|
|
|
+ objectMapMap.put(content1, new HashMap<String, String[]>());
|
|
|
|
+ }
|
|
|
|
+ objectMapMap.get(content1).put(content3.toLowerCase(), low_high);
|
|
|
|
+ } else {
|
|
|
|
+ if (!objectMapMap.containsKey(content2)) {
|
|
|
|
+ objectMapMap.put(content2, new HashMap<String, String[]>());
|
|
|
|
+ }
|
|
|
|
+ objectMapMap.get(content2).put(content3.toLowerCase(), low_high);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ up_lowMap = new HashMap<String, String[]>();
|
|
|
|
+ ExcelSheet ExcelSheet = ExcelUtil.ReadSheet(Constant.GetPath() + "/info_code-all.xlsx", "Sheet1", true);
|
|
|
|
+ Map<String, List<String>> map = new HashMap<String, List<String>>();
|
|
|
|
+ for (int i = 0; i < ExcelSheet.contentListList.size(); i++) {
|
|
|
|
+ List<String> content = ExcelSheet.contentListList.get(i);
|
|
|
|
+ String content1 = ExcelUtil.getContentInner(ExcelSheet, 0, i);
|
|
|
|
+ if (!map.containsKey(content1)) {
|
|
|
|
+ map.put(content1, content);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ {
|
|
|
|
+ String[] rows = map.keySet().toArray(new String[0]);
|
|
|
|
+ Arrays.sort(rows);
|
|
|
|
+ List<List<String>> contentListList = new ArrayList<List<String>>();
|
|
|
|
+ for (String row : rows) {
|
|
|
|
+ contentListList.add(map.get(row));
|
|
|
|
+ }
|
|
|
|
+ ExcelSheet es = new ExcelSheet();
|
|
|
|
+ es.titleRowList = ExcelSheet.titleRowList;
|
|
|
|
+ es.titleColList = ExcelSheet.titleColList;
|
|
|
|
+ es.contentListList = contentListList;
|
|
|
|
+ Map<String, ExcelSheet> reportMap = new HashMap<String, ExcelSheet>();
|
|
|
|
+ reportMap.put("Sheet1", es);
|
|
|
|
+ ExcelUtil.Write(Constant.GetPath() + "/info_code-all.xlsx", reportMap);
|
|
|
|
+
|
|
|
|
+ ExcelSheet = ExcelUtil.ReadSheet(Constant.GetPath() + "/info_code-all.xlsx", "Sheet1", true);
|
|
|
|
+ for (List<String> row : ExcelSheet.contentListList) {
|
|
|
|
+ String info = row.get(0);
|
|
|
|
+ if (row.size() > 2 && row.get(1) != null && row.get(1).length() > 0 && row.get(2) != null && row.get(2).length() > 0) {
|
|
|
|
+ String[] up_low = new String[2];
|
|
|
|
+ up_low[0] = row.get(1);
|
|
|
|
+ up_low[1] = row.get(2);
|
|
|
|
+ up_lowMap.put(info, up_low);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Scan_object();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static void Scan_object() throws Exception {
|
|
|
|
+ ExcelSheet report = new ExcelSheet();
|
|
|
|
+ {
|
|
|
|
+ List<String> titleColList = new ArrayList<String>();
|
|
|
|
+ titleColList.add("sign");
|
|
|
|
+ titleColList.add("funcid");
|
|
|
|
+ titleColList.add("dataType");
|
|
|
|
+ titleColList.add("period_second");
|
|
|
|
+ titleColList.add("lower_limit");
|
|
|
|
+ titleColList.add("upper_limit");
|
|
|
|
+ titleColList.add("rel_set_sign");
|
|
|
|
+ titleColList.add("rel_set_funcid");
|
|
|
|
+ report.titleColList = titleColList;
|
|
|
|
+ }
|
|
|
|
+ ExcelSheet set = new ExcelSheet();
|
|
|
|
+ {
|
|
|
|
+ List<String> titleColList = new ArrayList<String>();
|
|
|
|
+ titleColList.add("sign");
|
|
|
|
+ titleColList.add("funcid");
|
|
|
|
+ titleColList.add("dataType");
|
|
|
|
+ titleColList.add("manual_sign");
|
|
|
|
+ titleColList.add("manual_funcid");
|
|
|
|
+ set.titleColList = titleColList;
|
|
|
|
+ }
|
|
|
|
+ ExcelSheet dy_pointlist = new ExcelSheet();
|
|
|
|
+ {
|
|
|
|
+ List<String> titleColList = new ArrayList<String>();
|
|
|
|
+ titleColList.add("building");
|
|
|
|
+ titleColList.add("meter");
|
|
|
|
+ titleColList.add("funcid");
|
|
|
|
+ titleColList.add("data_type");
|
|
|
|
+ titleColList.add("collect_cycle");
|
|
|
|
+ dy_pointlist.titleColList = titleColList;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ JSONObject classParam = new JSONObject();
|
|
|
|
+ classParam.put("criteria", new JSONObject());
|
|
|
|
+ JSONObject classTree = JSON
|
|
|
|
+ .parseObject(HttpUtil.Instance().post(Constant.data_middle_url + "rwd/def/class?projectId=" + projectId + "&groupCode=" + groupCode,
|
|
|
|
+ JSON.toJSONString(classParam, SerializerFeature.WriteMapNullValue)));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ JSONArray dataArray = (JSONArray) classTree.get("data");
|
|
|
|
+
|
|
|
|
+ Map<String, List<List<String>>> classCode2HBasePointList = new HashMap<String, List<List<String>>>();
|
|
|
|
+ Scan_object_Array(dataArray, report, set, dy_pointlist, classCode2HBasePointList);
|
|
|
|
+ if (hbase) {
|
|
|
|
+ int totalCount = 0;
|
|
|
|
+ int totalBad = 0;
|
|
|
|
+ String[] classCodes = classCode2HBasePointList.keySet().toArray(new String[0]);
|
|
|
|
+ Arrays.sort(classCodes);
|
|
|
|
+ Constant.warn("****************************************************************");
|
|
|
|
+ for (String classCode : classCodes) {
|
|
|
|
+ List<List<String>> HBasePointList = classCode2HBasePointList.get(classCode);
|
|
|
|
+ if (HBasePointList.size() == 0) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ int bad = 0;
|
|
|
|
+ for (int i = 0; i < HBasePointList.size(); i = i + 100) {
|
|
|
|
+ JSONArray InsertObjects = new JSONArray();
|
|
|
|
+ for (int ii = i; ii < i + 100 && ii < HBasePointList.size(); ii++) {
|
|
|
|
+ List<String> point = HBasePointList.get(ii);
|
|
|
|
+ String building = point.get(0);
|
|
|
|
+ String meter = point.get(1);
|
|
|
|
+ long funcid = Long.parseLong(point.get(2));
|
|
|
|
+ String data_type = point.get(3);
|
|
|
|
+ String collect_cycle = point.get(4);
|
|
|
|
+ JSONObject InsertObject = new JSONObject();
|
|
|
|
+ InsertObject.put("building", building);
|
|
|
|
+ InsertObject.put("meter", meter);
|
|
|
|
+ InsertObject.put("funcid", funcid);
|
|
|
|
+ InsertObject.put("data_type", data_type);
|
|
|
|
+ InsertObject.put("collect_cycle", collect_cycle);
|
|
|
|
+ InsertObject.put("system", "IBMS");
|
|
|
|
+ InsertObjects.add(InsertObject);
|
|
|
|
+ Constant.warn(building + "\t\t" + meter + "\t\t" + funcid + "\t\t" + data_type + "\t\t" + collect_cycle);
|
|
|
|
+ }
|
|
|
|
+ JSONObject query = new JSONObject();
|
|
|
|
+ query.put("QueryType", QueryType);
|
|
|
|
+ query.put("Database", Database);
|
|
|
|
+ query.put("Datatable", "dy_pointlist");
|
|
|
|
+ query.put("InsertObjects", InsertObjects);
|
|
|
|
+ Map<String, String> params = new HashMap<String, String>();
|
|
|
|
+ params.put("param", query.toJSONString());
|
|
|
|
+ String postResult = HttpUtil.Instance().post(Constant.metadata_web_url + "services/Service1_POST/Query", params);
|
|
|
|
+ JSONObject resultJSON = JSON.parseObject(postResult);
|
|
|
|
+ if (resultJSON.containsKey("Count")) {
|
|
|
|
+ long Count_bad = resultJSON.getLong("Count");
|
|
|
|
+ bad += Count_bad;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ Constant.warn(classCode + " scan count: " + HBasePointList.size() + "\t\t" + "insert: " + (HBasePointList.size() - bad) + "\t\t"
|
|
|
|
+ + "exist: " + bad);
|
|
|
|
+ totalCount += HBasePointList.size();
|
|
|
|
+ totalBad += bad;
|
|
|
|
+ }
|
|
|
|
+ Constant.warn("****************************************************************");
|
|
|
|
+ Constant.warn("total count: " + totalCount + "\t\t" + "insert: " + (totalCount - totalBad) + "\t\t" + "exist: " + totalBad);
|
|
|
|
+ Constant.warn("****************************************************************");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Map<String, ExcelSheet> reportMap = new HashMap<String, ExcelSheet>();
|
|
|
|
+ reportMap.put(projectId, report);
|
|
|
|
+ ExcelUtil.Write(groupCode + "-" + projectId + "-" + "report.xlsx", reportMap);
|
|
|
|
+
|
|
|
|
+ Map<String, ExcelSheet> SetMap = new HashMap<String, ExcelSheet>();
|
|
|
|
+ SetMap.put(projectId, set);
|
|
|
|
+ ExcelUtil.Write(groupCode + "-" + projectId + "-" + "set.xlsx", SetMap);
|
|
|
|
+
|
|
|
|
+ Map<String, ExcelSheet> dyMap = new HashMap<String, ExcelSheet>();
|
|
|
|
+ dyMap.put("Sheet1", dy_pointlist);
|
|
|
|
+ ExcelUtil.Write(groupCode + "-" + projectId + "-" + "dy_pointlist.xlsx", dyMap);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static void Scan_object_Array(JSONArray dataArray, ExcelSheet report, ExcelSheet set, ExcelSheet dy_pointlist,
|
|
|
|
+ Map<String, List<List<String>>> classCode2HBasePointList) throws Exception {
|
|
|
|
+ Map<String, JSONObject> classMap = new HashMap<String, JSONObject>();
|
|
|
|
+ for (int i = 0; i < dataArray.size(); i++) {
|
|
|
|
+ JSONObject data = (JSONObject) dataArray.get(i);
|
|
|
|
+ String objType = (String) data.get("objType");
|
|
|
|
+ if (objType == null || objType.length() == 0) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String classCode = (String) data.get("code");
|
|
|
|
+ classMap.put(classCode, data);
|
|
|
|
+ }
|
|
|
|
+ String[] codes = classMap.keySet().toArray(new String[0]);
|
|
|
|
+ Arrays.sort(codes);
|
|
|
|
+ for (String code : codes) {
|
|
|
|
+ JSONObject data = classMap.get(code);
|
|
|
|
+ Scan_object_Object(data, report, set, dy_pointlist, classCode2HBasePointList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private static void Scan_object_Object(JSONObject data, ExcelSheet report, ExcelSheet set, ExcelSheet dy_pointlist,
|
|
|
|
+ Map<String, List<List<String>>> classCode2HBasePointList) throws Exception {
|
|
|
|
+ String objType = (String) data.get("objType");
|
|
|
|
+ if (objType == null || objType.length() == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String classCode = (String) data.get("code");
|
|
|
|
+
|
|
|
|
+ if (filter && !objectMapMap.containsKey(classCode)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (filter_objType != null && !filter_objType.equalsIgnoreCase(objType)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (filter_classCode != null && !filter_classCode.equalsIgnoreCase(classCode)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ JSONArray objectArray = DataDictQueryUtil_v2.getObjects(classCode, projectId, groupCode);
|
|
|
|
+ Constant.warn(classCode + "\t" + objectArray.size());
|
|
|
|
+ if (objectArray == null || objectArray.size() == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ JSONArray infoArray = DataDictQueryUtil_v2.get_infos(classCode, projectId, groupCode);
|
|
|
|
+ if (infoArray != null && objectArray != null) {
|
|
|
|
+ List<List<String>> HBasePointList = new ArrayList<List<String>>();
|
|
|
|
+ classCode2HBasePointList.put(classCode, HBasePointList);
|
|
|
|
+ Map<String, String> status_set = DataDictUtil.status_set(infoArray);
|
|
|
|
+ Constant.warn(status_set.toString());
|
|
|
|
+ for (int index_o = 0; index_o < objectArray.size(); index_o++) {
|
|
|
|
+ JSONObject object = (JSONObject) objectArray.get(index_o);
|
|
|
|
+ String object_name = (String) object.get("localName");
|
|
|
|
+ Constant.info(object_name);
|
|
|
|
+ for (int i = 0; i < infoArray.size(); i++) {
|
|
|
|
+ JSONObject info = (JSONObject) infoArray.get(i);
|
|
|
|
+ String firstTag = (String) info.get("firstTag");
|
|
|
|
+ if (firstTag == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ if (firstTag.equals("运行参数") || firstTag.equals("设定参数") || firstTag.equals("事件记录")) {
|
|
|
|
+ } else {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ String code = (String) info.get("code");
|
|
|
|
+ String dataType = (String) info.get("dataType");
|
|
|
|
+
|
|
|
|
+ if (filter && !objectMapMap.get(classCode).containsKey(code.toLowerCase())) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Object infoValue = object.get(code);
|
|
|
|
+ if (infoValue == null || !(infoValue instanceof String)) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ String infoValueString = (String) infoValue;
|
|
|
|
+ if (infoValueString.length() == 0) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ int index_ = infoValueString.lastIndexOf('-');
|
|
|
|
+ if (index_ == -1) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ String sign = infoValueString.substring(0, index_);
|
|
|
|
+ String funcid = infoValueString.substring(index_ + 1);
|
|
|
|
+ if (sign == null || sign.trim().length() == 0 || funcid == null || funcid.trim().length() == 0) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (all_point) {
|
|
|
|
+ } else {
|
|
|
|
+ if (infoValueString.toString().startsWith(classCode + "_") && (infoValueString.toString().endsWith("_" + code + "-" + "901")
|
|
|
|
+ || infoValueString.toString().endsWith("_" + code + "-" + "902")
|
|
|
|
+ || infoValueString.toString().endsWith("_" + code + "-" + "903"))) {
|
|
|
|
+ } else {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<String> columnList = new ArrayList<String>();
|
|
|
|
+ List<String> columnList_dy = new ArrayList<String>();
|
|
|
|
+
|
|
|
|
+ columnList.add(sign);
|
|
|
|
+ columnList.add(funcid);
|
|
|
|
+ columnList.add(dataType);
|
|
|
|
+ columnList_dy.add(projectId.substring(2));
|
|
|
|
+ columnList_dy.add(sign);
|
|
|
|
+ columnList_dy.add(funcid);
|
|
|
|
+ columnList_dy.add("Inst");
|
|
|
|
+ columnList_dy.add(collect_cycle);
|
|
|
|
+ if (DataDictUtil.getInfoType(info) == 1) {
|
|
|
|
+ columnList.add(second_period);
|
|
|
|
+ Map<String, String[]> up_lowMapInner;
|
|
|
|
+ if (filter) {
|
|
|
|
+ up_lowMapInner = objectMapMap.get(classCode);
|
|
|
|
+ } else {
|
|
|
|
+ up_lowMapInner = up_lowMap;
|
|
|
|
+ }
|
|
|
|
+ if (up_lowMapInner.containsKey(code)) {
|
|
|
|
+ String[] up_low = up_lowMapInner.get(code);
|
|
|
|
+ columnList.add(up_low[0].toString());
|
|
|
|
+ columnList.add(up_low[1].toString());
|
|
|
|
+ } else {
|
|
|
|
+ columnList.add(null);
|
|
|
|
+ columnList.add(null);
|
|
|
|
+ }
|
|
|
|
+ if (code.equals("runStatus")) {
|
|
|
|
+ String value_set = (String) object.get("equipSwitchSet");
|
|
|
|
+ if (value_set != null && value_set.length() > 0) {
|
|
|
|
+ int index_set = value_set.lastIndexOf('-');
|
|
|
|
+ columnList.add(value_set.substring(0, index_set));
|
|
|
|
+ columnList.add(value_set.substring(index_set + 1));
|
|
|
|
+ }
|
|
|
|
+ } else if (status_set.containsKey(code)) {
|
|
|
|
+ String info_set = status_set.get(code);
|
|
|
|
+ if (object.get(info_set) instanceof String) {
|
|
|
|
+ String value_set = (String) object.get(info_set);
|
|
|
|
+ if (value_set != null && value_set.length() > 0) {
|
|
|
|
+ int index_set = value_set.lastIndexOf('-');
|
|
|
|
+ columnList.add(value_set.substring(0, index_set));
|
|
|
|
+ columnList.add(value_set.substring(index_set + 1));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ report.contentListList.add(columnList);
|
|
|
|
+ dy_pointlist.contentListList.add(columnList_dy);
|
|
|
|
+
|
|
|
|
+ HBasePointList.add(columnList_dy);
|
|
|
|
+ } else if (DataDictUtil.getInfoType(info) == 2) {
|
|
|
|
+ if (code.equals("equipSwitchSet")) {
|
|
|
|
+ String value_set = (String) object.get("manualAutoStatus");
|
|
|
|
+ if (value_set != null && value_set.length() > 0) {
|
|
|
|
+ int index_set = value_set.lastIndexOf('-');
|
|
|
|
+ columnList.add(value_set.substring(0, index_set));
|
|
|
|
+ columnList.add(value_set.substring(index_set + 1));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ set.contentListList.add(columnList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|