diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java index fc614c9..ee111e7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java @@ -31,7 +31,7 @@ public class AppHomeController extends BladeController { @ApiLog @ApiOperation("app首页-站点") @GetMapping("/appStation") - @ApiOperationSupport(order = 11) + @ApiOperationSupport(order = 1) public R> appStation(@ApiParam(value = "区域机构ID") Long deptId) { return R.data(appService.appStation(deptId)); } @@ -39,7 +39,7 @@ public class AppHomeController extends BladeController { @ApiLog @ApiOperation("app首页-站点列表数据") @GetMapping("/appStationList") - @ApiOperationSupport(order = 11) + @ApiOperationSupport(order = 2) public R> appStationList(@ApiParam(value = "机构ID") Long deptId) { return R.data(appService.appStationList(deptId)); } @@ -47,7 +47,7 @@ public class AppHomeController extends BladeController { @ApiLog @ApiOperation("app首页-当班数据") @GetMapping("/getDutyData") - @ApiOperationSupport(order = 11) + @ApiOperationSupport(order = 3) public R> getDutyData(@ApiParam(value = "区域机构ID") Long deptId) { return R.data(appService.getDutyData(deptId)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java index 4aaf926..fd93f5f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java @@ -574,7 +574,7 @@ public class AppHomeServiceImpl implements IAppHomeService { */ private void getNextDuty(AppAreaDutyVo item, Long id) { DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id); - if(ObjectUtil.isEmpty(nextDuty)){ + if(ObjectUtil.isEmpty(nextDuty) || ObjectUtil.isEmpty(nextDuty.getId())){ return; } item.setNextShift(nextDuty.getClassName()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java index 7f5ee0c..2717ab6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java @@ -1645,6 +1645,9 @@ public class HydropowerServiceImpl implements HydropowerService { * @param item */ private void settingBase(DutyMainInfoVo duty, AppAreaDutyVo item) { + if(ObjectUtil.isEmpty(duty)){ + return; + } item.setShift(duty.getClassName()); item.setTeam(Optional.ofNullable(duty.getGroupName()).orElse("灵活排班")); // 班组负责人 @@ -1662,7 +1665,7 @@ public class HydropowerServiceImpl implements HydropowerService { */ private void getNextDuty(AppAreaDutyVo item, Long id) { DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id); - if(ObjectUtil.isEmpty(nextDuty)){ + if(ObjectUtil.isEmpty(nextDuty) || ObjectUtil.isEmpty(nextDuty.getId())){ return; } item.setNextShift(nextDuty.getClassName()); 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 173e3dd..8e0ac4d 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 @@ -1352,9 +1352,9 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { } return list.stream().collect(Collectors.groupingBy(AnalyseDataTaosVO::getTs)).entrySet().stream().map(entry ->{ PhotovoltaicLoadGenerateVo target = new PhotovoltaicLoadGenerateVo(); - LocalDateTime time = LocalDateTime.parse(DateUtil.format(new Date(), entry.getKey()), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME)); + LocalDateTime time = LocalDateTime.parse(DateUtil.format(DateUtil.parse(entry.getKey(), "yyyy-MM-dd HH:mm:ss.s"),DateUtil.PATTERN_DATETIME), DateUtil.DATETIME_FORMATTER); target.setPeriod(String.valueOf(time.getHour())); - target.setValue((float) entry.getValue().stream().mapToDouble(o-> Double.parseDouble(String.valueOf(o.getVal()))).sum()); + target.setValue((float) entry.getValue().stream().filter(val -> !StringUtil.isEmpty(val.getVal())).mapToDouble(o-> Double.parseDouble(String.valueOf(o.getVal()))).sum()); return target; }).collect(Collectors.toList()); }