Browse Source

#班组名称

zhongwei
yang_shj 2 years ago
parent
commit
8a3278ff16
  1. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java
  2. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java
  3. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java
  4. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/AppHomeController.java

@ -31,7 +31,7 @@ public class AppHomeController extends BladeController {
@ApiLog @ApiLog
@ApiOperation("app首页-站点") @ApiOperation("app首页-站点")
@GetMapping("/appStation") @GetMapping("/appStation")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 1)
public R<List<AppStationVo>> appStation(@ApiParam(value = "区域机构ID") Long deptId) { public R<List<AppStationVo>> appStation(@ApiParam(value = "区域机构ID") Long deptId) {
return R.data(appService.appStation(deptId)); return R.data(appService.appStation(deptId));
} }
@ -39,7 +39,7 @@ public class AppHomeController extends BladeController {
@ApiLog @ApiLog
@ApiOperation("app首页-站点列表数据") @ApiOperation("app首页-站点列表数据")
@GetMapping("/appStationList") @GetMapping("/appStationList")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 2)
public R<List<AppStationAreaVo>> appStationList(@ApiParam(value = "机构ID") Long deptId) { public R<List<AppStationAreaVo>> appStationList(@ApiParam(value = "机构ID") Long deptId) {
return R.data(appService.appStationList(deptId)); return R.data(appService.appStationList(deptId));
} }
@ -47,7 +47,7 @@ public class AppHomeController extends BladeController {
@ApiLog @ApiLog
@ApiOperation("app首页-当班数据") @ApiOperation("app首页-当班数据")
@GetMapping("/getDutyData") @GetMapping("/getDutyData")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 3)
public R<List<AppAreaDutyVo>> getDutyData(@ApiParam(value = "区域机构ID") Long deptId) { public R<List<AppAreaDutyVo>> getDutyData(@ApiParam(value = "区域机构ID") Long deptId) {
return R.data(appService.getDutyData(deptId)); return R.data(appService.getDutyData(deptId));
} }

2
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) { private void getNextDuty(AppAreaDutyVo item, Long id) {
DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id); DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id);
if(ObjectUtil.isEmpty(nextDuty)){ if(ObjectUtil.isEmpty(nextDuty) || ObjectUtil.isEmpty(nextDuty.getId())){
return; return;
} }
item.setNextShift(nextDuty.getClassName()); item.setNextShift(nextDuty.getClassName());

5
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 * @param item
*/ */
private void settingBase(DutyMainInfoVo duty, AppAreaDutyVo item) { private void settingBase(DutyMainInfoVo duty, AppAreaDutyVo item) {
if(ObjectUtil.isEmpty(duty)){
return;
}
item.setShift(duty.getClassName()); item.setShift(duty.getClassName());
item.setTeam(Optional.ofNullable(duty.getGroupName()).orElse("灵活排班")); item.setTeam(Optional.ofNullable(duty.getGroupName()).orElse("灵活排班"));
// 班组负责人 // 班组负责人
@ -1662,7 +1665,7 @@ public class HydropowerServiceImpl implements HydropowerService {
*/ */
private void getNextDuty(AppAreaDutyVo item, Long id) { private void getNextDuty(AppAreaDutyVo item, Long id) {
DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id); DutyMainInfoVo nextDuty = this.dutyMainService.getNextDutyDataV2(id);
if(ObjectUtil.isEmpty(nextDuty)){ if(ObjectUtil.isEmpty(nextDuty) || ObjectUtil.isEmpty(nextDuty.getId())){
return; return;
} }
item.setNextShift(nextDuty.getClassName()); item.setNextShift(nextDuty.getClassName());

4
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 ->{ return list.stream().collect(Collectors.groupingBy(AnalyseDataTaosVO::getTs)).entrySet().stream().map(entry ->{
PhotovoltaicLoadGenerateVo target = new PhotovoltaicLoadGenerateVo(); 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.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; return target;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }

Loading…
Cancel
Save