From cd67694a99260d1cd1d7a08c9dce251bf75242e5 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 16 May 2023 18:22:07 +0800 Subject: [PATCH] =?UTF-8?q?#bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/main/service/impl/PhotovoltaicServiceImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java index c51451f..9042377 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java @@ -350,11 +350,8 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { */ private List generateFill(List stations) { Calendar calendar = Calendar.getInstance(); - //String day = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); String mon = DateUtil.format(calendar.getTime(),"yyyy-MM"); String year = String.valueOf(calendar.get(Calendar.YEAR)); - //calendar.add(Calendar.DAY_OF_MONTH,-1); - //String yesterday = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); return stations.stream().map(station ->{ PhotovoltaicTargetVo target = new PhotovoltaicTargetVo(); target.setDeptId(station.getRefDept()); @@ -1344,10 +1341,11 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { if(CollectionUtil.isEmpty(devices)){ return new ArrayList<>(); } - String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); + Calendar calendar = Calendar.getInstance(); + String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE) + " 00:00:00"; List list = new ArrayList<>(); for(PhotovoltaicTargetVo device : devices){ - list.addAll(analyseDataService.periodTargetData(start,end,1,2,device.getDeviceCode(),HomePageConstant.PV_LOAD)); + list.addAll(analyseDataService.periodTargetData(start,DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME),1,2,device.getDeviceCode(),HomePageConstant.PV_LOAD)); } if(CollectionUtil.isEmpty(list)){ return new ArrayList<>();