Browse Source

事件分析

develop
王兴琳 3 months ago
parent
commit
dfa2c0abc7
  1. 10
      zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

10
zc-business/src/main/java/com/zc/business/service/impl/DcSdhsEventServiceImpl.java

@ -1065,9 +1065,13 @@ public class DcSdhsEventServiceImpl implements IDcSdhsEventService {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(startTime); // 设置当前时间为 startTime calendar.setTime(startTime); // 设置当前时间为 startTime
calendar.add(Calendar.YEAR, -1); // 减去一年 calendar.add(Calendar.YEAR, -1); // 减去一年
Date oneYearAgoStart = calendar.getTime(); // 一年前的开始时间 Date oneYearAgoStart = calendar.getTime(); // 一年前的开始时间‘
dcSdhsEventQuery.setStartTime(oneYearAgoStart); DcSdhsEventQuery dcSdhsEventQuery1 = new DcSdhsEventQuery();
Map<String, Long> lastYearData = accidentTimeAnalysis(dcSdhsEventQuery); dcSdhsEventQuery1.setStartTime(oneYearAgoStart);
dcSdhsEventQuery1.setType(dcSdhsEventQuery.getType());
dcSdhsEventQuery1.setEndTime(dcSdhsEventQuery.getEndTime());
Map<String, Long> lastYearData = accidentTimeAnalysis(dcSdhsEventQuery1);
String type = dcSdhsEventQuery.getType(); String type = dcSdhsEventQuery.getType();
int rows = 0; int rows = 0;
String stingType = ""; String stingType = "";

Loading…
Cancel
Save