|
@@ -296,7 +296,7 @@ public class OpcAsyncTask {
|
|
|
ReportTable reportTable = reportTableDao.getReportTableById(tableReportId);
|
|
|
String reportTableData = reportTable.getReportTableData();
|
|
|
JSONObject jsonObject = JSONObject.parseObject(reportTableData);
|
|
|
- JSONArray objects = jsonObject.getJSONArray("tables");
|
|
|
+ JSONArray objects = new JSONArray();
|
|
|
if (Blank.isNotEmpty(itemList)) {
|
|
|
for (int i = 0; i < itemList.size(); i++) {
|
|
|
List<RawData> rawDataList = rawDataDao.getEventRawDataList(itemList.get(i), dataSourceId, sqlCurrentYmdh);
|
|
@@ -325,6 +325,9 @@ public class OpcAsyncTask {
|
|
|
dataList.add(JSON.parseObject(rawData1.getDataValue(), BigDecimal.class));
|
|
|
dataTimeList.add(rawData1.getDataValueTime());
|
|
|
}
|
|
|
+ jsonObject1.put("itemGroupId", rawData.getItemGroupId());
|
|
|
+ jsonObject1.put("itemName", itemList.get(i).getItemName());
|
|
|
+ jsonObject1.put("describe", itemList.get(i).getDescribe());
|
|
|
jsonObject1.put("dataList", dataList);
|
|
|
jsonObject1.put("dataTimeList", dataTimeList);
|
|
|
objects.set(i, jsonObject1);
|
|
@@ -335,6 +338,9 @@ public class OpcAsyncTask {
|
|
|
dataList.add(rawData1.getDataValue());
|
|
|
dataTimeList.add(rawData1.getDataValueTime());
|
|
|
}
|
|
|
+ jsonObject1.put("itemGroupId", rawData.getItemGroupId());
|
|
|
+ jsonObject1.put("itemName", itemList.get(i).getItemName());
|
|
|
+ jsonObject1.put("describe", itemList.get(i).getDescribe());
|
|
|
jsonObject1.put("dataList", dataList);
|
|
|
jsonObject1.put("dataTimeList", dataTimeList);
|
|
|
objects.set(i, jsonObject1);
|
|
@@ -344,7 +350,7 @@ public class OpcAsyncTask {
|
|
|
rawDataDao.delEventRawDataList(itemList.get(i), dataSourceId, sqlCurrentYmdh);
|
|
|
}
|
|
|
}
|
|
|
- jsonObject.put("tables", objects);
|
|
|
+ jsonObject.put("eventTables", objects);
|
|
|
ReportTable reportTable1 = new ReportTable();
|
|
|
reportTable1.setTableTemplateId(reportTable.getTableTemplateId());
|
|
|
reportTable1.setUserId(reportTable.getUserId());
|