|
@@ -17,6 +17,7 @@ import com.bizmatics.service.vo.*;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.lucene.index.IndexFormatTooNewException;
|
|
|
+import org.apache.poi.ss.usermodel.DateUtil;
|
|
|
import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -93,8 +94,9 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
Date date = new Date();
|
|
|
List<CommonIcoVO> list = new ArrayList<>();
|
|
|
List<Integer> idList = getSiteIdList(siteId);
|
|
|
- list.add(getTrendOne("today", idList, DateUtils.getDayStartTime(date), date));
|
|
|
- list.add(getTrendOne("yesterday", idList, DateUtils.addDays(date, -1), date));
|
|
|
+ list.add(getTrendOne("today", idList, DateUtils.getDayStartTime(date), DateUtils.getDayEndTime(date)));
|
|
|
+ Date yeDate = DateUtils.addDays(date, -1);
|
|
|
+ list.add(getTrendOne("yesterday", idList,DateUtils.getDayStartTime(yeDate) , DateUtils.getDayEndTime(yeDate)));
|
|
|
return list;
|
|
|
}
|
|
|
|
|
@@ -124,7 +126,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
dates.add("00:00:00");
|
|
|
for (int i = 2; i < 24 ; i+=2) {
|
|
|
//结束时间
|
|
|
- Date hours = DateUtils.addHours(startTime, i);
|
|
|
+ Date hours = DateUtils.setHours(startTime, i);
|
|
|
objects.add(getEpp(list,idList,startTime,hours));
|
|
|
startTime = hours;
|
|
|
dates.add(DateUtils.getTime(hours));
|
|
@@ -282,7 +284,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
List<HadDataLog> hadDataLogList = getByToday(date, DateUtils.getDayStartTime(date));
|
|
|
for (int i = 2; i < 24 ; i+=2) {
|
|
|
//结束时间
|
|
|
- Date endTime = DateUtils.addHours(date, i);
|
|
|
+ Date endTime = DateUtils.setHours(date, i);
|
|
|
Date finalDate = date;
|
|
|
List<HadDataLogVO> maxHadList = new ArrayList<>();
|
|
|
Comparator<HadDataLogVO> comparator = Comparator.comparing(HadDataLogVO::getDataTime);
|