Browse Source

#bug修改

zhongwei
yang_shj 2 years ago
parent
commit
cd67694a99
  1. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java

8
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<PhotovoltaicTargetVo> generateFill(List<StationEntity> stations) { private List<PhotovoltaicTargetVo> generateFill(List<StationEntity> stations) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
//String day = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE);
String mon = DateUtil.format(calendar.getTime(),"yyyy-MM"); String mon = DateUtil.format(calendar.getTime(),"yyyy-MM");
String year = String.valueOf(calendar.get(Calendar.YEAR)); 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 ->{ return stations.stream().map(station ->{
PhotovoltaicTargetVo target = new PhotovoltaicTargetVo(); PhotovoltaicTargetVo target = new PhotovoltaicTargetVo();
target.setDeptId(station.getRefDept()); target.setDeptId(station.getRefDept());
@ -1344,10 +1341,11 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService {
if(CollectionUtil.isEmpty(devices)){ if(CollectionUtil.isEmpty(devices)){
return new ArrayList<>(); 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<AnalyseDataTaosVO> list = new ArrayList<>(); List<AnalyseDataTaosVO> list = new ArrayList<>();
for(PhotovoltaicTargetVo device : devices){ 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)){ if(CollectionUtil.isEmpty(list)){
return new ArrayList<>(); return new ArrayList<>();

Loading…
Cancel
Save