|
@@ -66,14 +66,14 @@ public class KprAimTapWaterBizFun {
|
|
|
//TODO 此循环天数每一天所查的是所有设备每小时数据合
|
|
|
LocalDateTime newStartDateTime = startDateTime;
|
|
|
String startDate = newStartDateTime.format(formater);
|
|
|
- String endDate = today.withMinute(0).withSecond(0).format(formater);
|
|
|
+ String endDate = today.withMinute(1).withSecond(0).format(formater);
|
|
|
List<Map<String, Object>> deviceList = groupedData.get(key);
|
|
|
//TODO 循环获取该天该水厂每个设备数据
|
|
|
|
|
|
//TODO 查询当前天日期内每小时的设备数据
|
|
|
for (int i = 0; i < Integer.valueOf(String.valueOf(Duration.between(startDateTime, today.withMinute(0).withSecond(0)).toHours())); i++) {
|
|
|
String startTime = newStartDateTime.minusHours(-i).format(formater);
|
|
|
- String endTime = newStartDateTime.minusHours(-(i+1)).format(formater);
|
|
|
+ String endTime = newStartDateTime.minusMinutes(-1).minusHours(-(i+1)).format(formater);
|
|
|
Map<String, Object> recordAllEntity = new HashMap<>();//需要添加的实体数据
|
|
|
recordAllEntity.put("org_name", key.toString());//水厂
|
|
|
recordAllEntity.put("time", endTime);//采集时间(小时的最后时间)
|
|
@@ -405,7 +405,7 @@ public class KprAimTapWaterBizFun {
|
|
|
for(Long k = 0L;k<days;k++) {
|
|
|
LocalDateTime newStartDateTime = startDateTime.minusDays(-k.intValue());
|
|
|
String startDate = newStartDateTime.format(formater);
|
|
|
- String endDate = newStartDateTime.minusDays(-1).format(formater);
|
|
|
+ String endDate = newStartDateTime.withMinute(1).minusDays(-1).format(formater);
|
|
|
try {
|
|
|
ThreadTaskMgr.runTask(new TraceRunnable(TraceLogMgr.getTraceId()) {
|
|
|
@Override
|
|
@@ -418,7 +418,7 @@ public class KprAimTapWaterBizFun {
|
|
|
//TODO 查询当前天日期内每小时的设备数据
|
|
|
for (int i = 0; i < 24; i++) {
|
|
|
String startTime = newStartDateTime.withHour(i).format(formater);
|
|
|
- String endTime = newStartDateTime.withHour(i).minusHours(-1).format(formater);
|
|
|
+ String endTime = newStartDateTime.withHour(i).minusMinutes(-1).minusHours(-1).format(formater);
|
|
|
|
|
|
Map<String, Object> recordAllEntity = new HashMap<>();//需要添加的实体数据
|
|
|
recordAllEntity.put("org_name", key.toString());//水厂
|
|
@@ -589,7 +589,7 @@ public class KprAimTapWaterBizFun {
|
|
|
for(Long k = 0L;k<days;k++) {
|
|
|
LocalDateTime newStartDateTime = startDateTime.minusDays(-k.intValue());
|
|
|
String startDate = newStartDateTime.format(formater);
|
|
|
- String endDate = newStartDateTime.minusDays(-1).format(formater);
|
|
|
+ String endDate = newStartDateTime.withMinute(1).minusDays(-1).format(formater);
|
|
|
try {
|
|
|
new Thread(() -> {
|
|
|
|