|
|
@ -1296,10 +1296,10 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
// 结束时间
|
|
|
|
// 结束时间
|
|
|
|
String end = DateUtil.format(calendar.getTime(),"yyyy-MM-dd HH:") + "59:59"; |
|
|
|
String end = DateUtil.format(calendar.getTime(),"yyyy-MM-dd HH") + ":59:59"; |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-23); |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-23); |
|
|
|
// 开始时间
|
|
|
|
// 开始时间
|
|
|
|
String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
String start = DateUtil.format(calendar.getTime(),"yyyy-MM-dd HH") + ":00:00"; |
|
|
|
List<AnalyseDataTaosVO> datas = dataService.periodTargetData(start, end,6, 2,instanceCode,signage); |
|
|
|
List<AnalyseDataTaosVO> datas = dataService.periodTargetData(start, end,6, 2,instanceCode,signage); |
|
|
|
if(CollectionUtil.isEmpty(datas)){ |
|
|
|
if(CollectionUtil.isEmpty(datas)){ |
|
|
|
return new HashMap<>(); |
|
|
|
return new HashMap<>(); |
|
|
@ -1559,7 +1559,7 @@ public class RealTargetServiceImpl implements RealTargetService { |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-23); |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-23); |
|
|
|
// 开始日期
|
|
|
|
// 开始日期
|
|
|
|
Date start = calendar.getTime(); |
|
|
|
Date start = calendar.getTime(); |
|
|
|
List<AnalyseDataTaosVO> records = dataService.periodTargetData(DateUtil.format(start,"yyyy-MM-dd HH") + ":00:00", DateUtil.format(end,DateUtil.PATTERN_DATETIME), 3, 2, device.getEmCode(), HomePageConstant.PV_LOAD); |
|
|
|
List<AnalyseDataTaosVO> records = dataService.periodTargetData(DateUtil.format(start,"yyyy-MM-dd HH") + ":00:00", DateUtil.format(start,"yyyy-MM-dd HH") + ":59:59", 3, 2, device.getEmCode(), HomePageConstant.PV_LOAD); |
|
|
|
List<ActivePowerVo> activePowers = new ArrayList<>(); |
|
|
|
List<ActivePowerVo> activePowers = new ArrayList<>(); |
|
|
|
while (start.compareTo(end) <= 0){ |
|
|
|
while (start.compareTo(end) <= 0){ |
|
|
|
String time = DateUtil.format(start,"yyyy-MM-dd HH"); |
|
|
|
String time = DateUtil.format(start,"yyyy-MM-dd HH"); |
|
|
|