1.echarts配置地址调整
2.pms暂态报告代码调整
This commit is contained in:
@@ -23,7 +23,7 @@ import java.util.*;
|
|||||||
public class DrawPicUtil {
|
public class DrawPicUtil {
|
||||||
|
|
||||||
//目前写死,后续作为配置
|
//目前写死,后续作为配置
|
||||||
private final String URL = "http://192.168.1.18:5174/picture";
|
private final String URL = "http://192.168.1.24:5174/picture";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2437,9 +2437,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
//进行for循环获取所有事件的时间
|
//进行for循环获取所有事件的时间
|
||||||
for (EventDetailNew eventDetail : eventDetailList) {
|
for (EventDetailNew eventDetail : eventDetailList) {
|
||||||
//获取暂降事件时间
|
//获取暂降事件时间
|
||||||
/* String timeId = eventDetail.getTimeId();
|
|
||||||
Date date1 = DateUtil.parse(timeId);
|
|
||||||
int day = Integer.parseInt(String.format("%td",date1));*/
|
|
||||||
|
|
||||||
dayCount.add(DateUtil.format(DateUtil.parse(eventDetail.getStartTime()), fmt));
|
dayCount.add(DateUtil.format(DateUtil.parse(eventDetail.getStartTime()), fmt));
|
||||||
|
|
||||||
@@ -2526,6 +2523,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -2639,6 +2637,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString());
|
timeVO.setFulltime(beginTime.toString());
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -5449,6 +5448,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -5565,6 +5565,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString());
|
timeVO.setFulltime(beginTime.toString());
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -7854,8 +7855,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
if (areaReportParam.isEventTypeTable()) {
|
if (areaReportParam.isEventTypeTable()) {
|
||||||
twoCount3++;
|
twoCount3++;
|
||||||
createTitle(doc, "4." + oneCount6 + "." + twoCount3 + " 类型统计图", "标题 3", 400, 11);
|
createTitle(doc, "4." + oneCount6 + "." + twoCount3 + " 类型统计图", "标题 3", 400, 11);
|
||||||
|
|
||||||
|
|
||||||
//创建x,y参数
|
//创建x,y参数
|
||||||
List<String> xdata = new ArrayList<>();
|
List<String> xdata = new ArrayList<>();
|
||||||
List<Map<String, Object>> reasonList = new ArrayList<>();
|
List<Map<String, Object>> reasonList = new ArrayList<>();
|
||||||
@@ -7875,8 +7874,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
//创建表题计数
|
//创建表题计数
|
||||||
int twoCount = 1;
|
int twoCount = 1;
|
||||||
|
|
||||||
|
|
||||||
createTitle(doc, "4." + oneCount + " 类型统计", "标题 2", 200, 11);
|
createTitle(doc, "4." + oneCount + " 类型统计", "标题 2", 200, 11);
|
||||||
|
|
||||||
p = doc.createParagraph();// 新建一个段落
|
p = doc.createParagraph();// 新建一个段落
|
||||||
@@ -7913,7 +7910,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
//11.暂降热力图
|
//11.暂降热力图
|
||||||
if (areaReportParam.isThermodynamicChart()) {
|
if (areaReportParam.isThermodynamicChart()) {
|
||||||
//暂降热力图
|
//暂降热力图
|
||||||
|
|
||||||
createTitle(doc, "4." + oneCount + " " + typeName + "热力图", "标题 2", 200, 11);
|
createTitle(doc, "4." + oneCount + " " + typeName + "热力图", "标题 2", 200, 11);
|
||||||
|
|
||||||
p = doc.createParagraph();// 新建一个段落
|
p = doc.createParagraph();// 新建一个段落
|
||||||
@@ -7939,27 +7935,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
Integer eventDetailCount = getEventDetailCount(areaReportParam, lineIndexes);
|
Integer eventDetailCount = getEventDetailCount(areaReportParam, lineIndexes);
|
||||||
areaCount1.put(generalDeviceDTO.getName(), eventDetailCount);
|
areaCount1.put(generalDeviceDTO.getName(), eventDetailCount);
|
||||||
|
|
||||||
// StringBuilder stringBuilder = InfluxDBCommUtils.assToInfluxParam(lineIndexes);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// //查询sql语句总条数
|
|
||||||
// StringBuilder stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(areaReportParam.getSearchBeginTime()))).append("' and ")
|
|
||||||
// .append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(areaReportParam.getSearchEndTime()))).append("' and ");
|
|
||||||
// stringTotal.append(stringBuilder).append(" and ").append("(wave_type = 0 or wave_type = 1 or wave_type = 2 or wave_type = 3 or wave_type = 4)").append(" tz('Asia/Shanghai')");
|
|
||||||
//
|
|
||||||
// //总条数
|
|
||||||
// QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// if (ObjectUtil.isNull(resultTotal.getResults().get(0).getSeries())) {
|
|
||||||
// areaCount1.put(generalDeviceDTO.getName(), 0);
|
|
||||||
//
|
|
||||||
// } else {
|
|
||||||
// double count = Double.valueOf(resultTotal.getResults().get(0).getSeries().get(0).getValues().get(0).get(1).toString());
|
|
||||||
//
|
|
||||||
// areaCount1.put(generalDeviceDTO.getName(), Integer.valueOf((int) count));
|
|
||||||
// }
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//为空put 0
|
//为空put 0
|
||||||
areaCount1.put(generalDeviceDTO.getName(), 0);
|
areaCount1.put(generalDeviceDTO.getName(), 0);
|
||||||
@@ -7967,7 +7942,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// System.out.println(areaCount1);
|
|
||||||
//转为List对象集合
|
//转为List对象集合
|
||||||
List<ReportCountParam> areaCountList1 = new ArrayList<>();
|
List<ReportCountParam> areaCountList1 = new ArrayList<>();
|
||||||
for (String s : areaCount1.keySet()) {
|
for (String s : areaCount1.keySet()) {
|
||||||
@@ -7976,14 +7950,9 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
reportCountParam.setCount(areaCount1.get(s).toString());
|
reportCountParam.setCount(areaCount1.get(s).toString());
|
||||||
areaCountList1.add(reportCountParam);
|
areaCountList1.add(reportCountParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.out.println(areaCountList1);
|
|
||||||
|
|
||||||
//序号计数进行++
|
//序号计数进行++
|
||||||
oneCount++;
|
oneCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//文件下载
|
//文件下载
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
String fileName = URLEncoder.encode(deptName + "热力图.docx", "UTF-8");
|
String fileName = URLEncoder.encode(deptName + "热力图.docx", "UTF-8");
|
||||||
@@ -7991,8 +7960,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
doc.write(outputStream);
|
doc.write(outputStream);
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
//暂降事件
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user