|
@@ -51,7 +51,7 @@ public class ThreadDinzhiHistoryTask implements Runnable{
|
|
|
LocalDateTime now = LocalDateTime.now().withSecond(0);
|
|
|
|
|
|
// 使用提取的值构造新的LocalDateTime对象
|
|
|
- LocalDateTime firstDayOfMonthWithCurrentTime = now.minusDays(2);
|
|
|
+ LocalDateTime firstDayOfMonthWithCurrentTime = now.minusDays(2).withHour(0).withMinute(0).withSecond(0);
|
|
|
|
|
|
// days.add(now);//测试用
|
|
|
|
|
@@ -65,8 +65,8 @@ public class ThreadDinzhiHistoryTask implements Runnable{
|
|
|
paramRealtime.put("deviceCode", String.valueOf(map.get("deviceCode")));
|
|
|
// paramRealtime.put("pageNo", String.valueOf(pageNo));
|
|
|
// paramRealtime.put("pageSize", String.valueOf(pageSize));
|
|
|
- paramRealtime.put("startTime", now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
- paramRealtime.put("endTime", firstDayOfMonthWithCurrentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
+ paramRealtime.put("startTime", firstDayOfMonthWithCurrentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
+ paramRealtime.put("endTime", now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
paramRealtime.put("interval", String.valueOf((collectionFrequency < 60 ? 60 : collectionFrequency)));
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Authorization", "Bearer " + KprDangyangWaterBizFun.dangyangToken);
|