Browse Source

#App光伏首页

zhongwei
yang_shj 2 years ago
parent
commit
d4d0001e4a
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
  2. 5
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/GenerationPowerVo.java
  3. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/GenerationVo.java
  4. 21
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicDeviceStateVo.java
  5. 5
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicDeviceVo.java
  6. 66
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicLoadGenerateVo.java
  7. 31
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicLoadVo.java
  8. 41
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicStationAppVo.java
  9. 72
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateAppVo.java
  10. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/PhotovoltaicController.java
  11. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/IAnalyseDataService.java
  12. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/PhotovoltaicService.java
  13. 46
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AnalyseDataServiceImpl.java
  14. 680
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java
  15. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java
  16. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WebHomeServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java

@ -178,6 +178,8 @@ public interface HomePageConstant {
// 光伏指标属性 // 光伏指标属性
String PHOTOVOLTAIC_GENERATE = "generation_capacity"; // 发电量 String PHOTOVOLTAIC_GENERATE = "generation_capacity"; // 发电量
String PHOTOVOLTAIC_LOAD = "active_power"; // 功率 String PHOTOVOLTAIC_LOAD = "active_power"; // 功率
String PHOTOVOLTAIC_LOAD_TARGET = "0";
/*==========================================================================================*/ /*==========================================================================================*/
// 水电集团、区域指标关联 // 水电集团、区域指标关联
/**功率**/ /**功率**/

5
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/GenerationPowerVo.java

@ -12,5 +12,8 @@ public class GenerationPowerVo {
private String date; private String date;
@ApiModelProperty(value = "发电量") @ApiModelProperty(value = "发电量")
private Float generationPower; private Float generate;
@ApiModelProperty(value = "功率·")
private Float load;
} }

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/GenerationVo.java

@ -17,6 +17,6 @@ public class GenerationVo {
@ApiModelProperty(value = "周期") @ApiModelProperty(value = "周期")
private String period; private String period;
@ApiModelProperty(value = "发电量") @ApiModelProperty(value = "发电量")
private Float power; private Float power;
} }

21
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicDeviceStateVo.java

@ -0,0 +1,21 @@
package com.hnac.hzims.operational.main.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/04/03 16:57:22
* @version 4.0.0
*/
@Data
@ApiModel(value = "光伏站点设备状态对象")
public class PhotovoltaicDeviceStateVo {
@ApiModelProperty(value = "设备装态 : 0 - 离线 1 - 在线 2 - 故障")
private Integer state;
@ApiModelProperty(value = "数量")
private Integer count;
}

5
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicDeviceVo.java

@ -75,6 +75,11 @@ public class PhotovoltaicDeviceVo {
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double tec; private Double tec;
@ApiModelProperty(value = "减少森林砍伐:1kwh = 0.000553")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double deforest;
@ApiModelProperty(value = "收益: 元") @ApiModelProperty(value = "收益: 元")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double income; private Double income;

66
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicLoadGenerateVo.java

@ -22,68 +22,10 @@ import java.util.List;
@ApiModel(value = "水利站点首页对象") @ApiModel(value = "水利站点首页对象")
public class PhotovoltaicLoadGenerateVo { public class PhotovoltaicLoadGenerateVo {
@ApiModelProperty(value = "机构Id") @ApiModelProperty(value = "周期")
private Long deptId; private String period;
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "数据值")
private String deptName; private Float value;
@ApiModelProperty(value = "站点编码")
private String stationCode;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "投运时间")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime operationTime;
@ApiModelProperty(value = "总装机容量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double capacity;
@ApiModelProperty(value = "安全运行天数")
private Integer runDay;
@ApiModelProperty(value = "总发电负荷")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double load;
@ApiModelProperty(value = "日发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateDay;
@ApiModelProperty(value = "月发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateMon;
@ApiModelProperty(value = "年发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateYear;
@ApiModelProperty(value = "总发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generate;
@ApiModelProperty(value = "站点实时温度")
private String temp;
@ApiModelProperty(value = "站点收益")
private Double income;
@ApiModelProperty(value = "逆变器数量")
private Integer inverterCount;
@ApiModelProperty(value = "七日内天气")
private List<Daily> weather;
@ApiModelProperty(value = "发电排行")
private List<PhotovoltaicDeviceVo> devices;
@ApiModelProperty(value = "年发电量完成百分比")
private List<PowerYearVo> generateSurvey;
@ApiModelProperty(value = "设备信息")
private List<PhotovoltaicDeviceChartsVo> charts;
} }

31
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicLoadVo.java

@ -0,0 +1,31 @@
package com.hnac.hzims.operational.main.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/04/04 09:28:34
* @version 4.0.0
*/
@Data
@ApiModel(value = "发电量数据")
public class PhotovoltaicLoadVo {
@ApiModelProperty(value = "机构ID")
private Long deptId;
@ApiModelProperty(value = "站点编码")
private String code;
@ApiModelProperty(value = "站点名称")
private String name;
@ApiModelProperty(value = "实时功率")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double load;
}

41
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicStationAppVo.java

@ -19,7 +19,7 @@ import java.util.List;
* @version 4.0.0 * @version 4.0.0
*/ */
@Data @Data
@ApiModel(value = "水利站点首页对象") @ApiModel(value = "光伏站点首页对象")
public class PhotovoltaicStationAppVo { public class PhotovoltaicStationAppVo {
@ApiModelProperty(value = "机构Id") @ApiModelProperty(value = "机构Id")
@ -34,18 +34,6 @@ public class PhotovoltaicStationAppVo {
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
@ApiModelProperty(value = "投运时间")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime operationTime;
@ApiModelProperty(value = "总装机容量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double capacity;
@ApiModelProperty(value = "安全运行天数")
private Integer runDay;
@ApiModelProperty(value = "总发电负荷") @ApiModelProperty(value = "总发电负荷")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double load; private Double load;
@ -58,10 +46,6 @@ public class PhotovoltaicStationAppVo {
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateMon; private Double generateMon;
@ApiModelProperty(value = "年发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateYear;
@ApiModelProperty(value = "总发电量") @ApiModelProperty(value = "总发电量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double generate; private Double generate;
@ -72,18 +56,19 @@ public class PhotovoltaicStationAppVo {
@ApiModelProperty(value = "站点收益") @ApiModelProperty(value = "站点收益")
private Double income; private Double income;
@ApiModelProperty(value = "逆变器数量") @ApiModelProperty(value = "co2减排: kg")
private Integer inverterCount; @JsonSerialize(nullsUsing = NullSerializer.class)
private Double co2;
@ApiModelProperty(value = "七日内天气")
private List<Daily> weather;
@ApiModelProperty(value = "发电排行") @ApiModelProperty(value = "节约标准煤减排: kt")
private List<PhotovoltaicDeviceVo> devices; @JsonSerialize(nullsUsing = NullSerializer.class)
private Double tec;
@ApiModelProperty(value = "年发电量完成百分比") @ApiModelProperty(value = "减少森林砍伐:1kwh = 0.000553")
private List<PowerYearVo> generateSurvey; @JsonSerialize(nullsUsing = NullSerializer.class)
private Double deforest;
@ApiModelProperty(value = "设备信息") @ApiModelProperty(value = "减少森林砍伐:1kwh = 0.000553")
private List<PhotovoltaicDeviceChartsVo> charts; @JsonSerialize(nullsUsing = NullSerializer.class)
private List<PhotovoltaicDeviceStateVo> deviceState;
} }

72
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/PhotovoltaicSubordinateAppVo.java

@ -25,63 +25,67 @@ public class PhotovoltaicSubordinateAppVo {
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "机构名称")
private String deptName; private String deptName;
@ApiModelProperty(value = "地市编码") @ApiModelProperty(value = "温度")
private String areaCode; private String temp;
@ApiModelProperty(value = "地市名称")
private String areaName;
@ApiModelProperty(value = "光伏站点类型:0-个体光伏站 1-厂房光伏站") @ApiModelProperty(value = "地址")
private Long type; private String address;
@ApiModelProperty("经度(东经)")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Float lgtd;
@ApiModelProperty("纬度(北纬)")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Float lttd;
@ApiModelProperty(value = "容量") @ApiModelProperty(value = "容量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double capacity; private Double capacity;
@ApiModelProperty(value = "功率") @ApiModelProperty(value = "今日发电量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Double generateDay;
@ApiModelProperty(value = "实时功率")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double load; private Double load;
@ApiModelProperty(value = "发电量") @ApiModelProperty(value = "站点实时功率列表")
private List<PhotovoltaicLoadVo> stationLoads;
@ApiModelProperty(value = "日常任务数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double generation; private Integer maintenanceCount;
@ApiModelProperty(value = "发电占比") @ApiModelProperty(value = "日常任务完成数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double generationRate; private Integer maintenanceFinishCount;
@ApiModelProperty(value = "容量利用率") @ApiModelProperty(value = "缺陷任务数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double capacityUse; private Integer defectCount;
@ApiModelProperty(value = "电站利用率") @ApiModelProperty(value = "缺陷任务完成数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Double stationUse; private Integer defectFinishCount;
@ApiModelProperty(value = "站点实时温度") @ApiModelProperty(value = "检修任务数量")
private String temp; @JsonSerialize(nullsUsing = NullSerializer.class)
private Integer overhaulCount;
@ApiModelProperty(value = "七日内天气") @ApiModelProperty(value = "检修任务完成数量")
private List<Daily> weather; @JsonSerialize(nullsUsing = NullSerializer.class)
private Integer overhaulFinishCount;
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "操作票任务数量")
private Integer sort; @JsonSerialize(nullsUsing = NullSerializer.class)
private Integer operateCount;
@ApiModelProperty(value = "站点数量") @ApiModelProperty(value = "操作票任务完成数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Long stationCount; private Integer operateFinishCount;
@ApiModelProperty(value = "站点使用数量") @ApiModelProperty(value = "操作票任务数量")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)
private Long stationUseCount; private Integer workCount;
@ApiModelProperty(value = "操作票任务完成数量")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Integer workFinishCount;
@ApiModelProperty(value = "排序")
private Integer sort;
} }

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/PhotovoltaicController.java

@ -80,7 +80,8 @@ public class PhotovoltaicController extends BladeController {
@GetMapping("/app_load_generate") @GetMapping("/app_load_generate")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
public R app_load_generate(@ApiParam(value = "区域/站点机构编号") Long deptId, public R app_load_generate(@ApiParam(value = "区域/站点机构编号") Long deptId,
@ApiParam(value = "查询类型: 0 - 发电量 1 - 功率") Long type) { @ApiParam(value = "数据类型: 0 - 功率 1 - 发电量") String type,
return R.data(service.app_load_generate(deptId,type)); @ApiParam(value = "查询类型: 0 - 日 1 - 周 2 - 月 3 - 年") String queryType) {
return R.data(service.app_load_generate(deptId,type,queryType));
} }
} }

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/IAnalyseDataService.java

@ -1,8 +1,9 @@
package com.hnac.hzims.operational.main.service; package com.hnac.hzims.operational.main.service;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import org.apache.poi.ss.formula.functions.T;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
@ -11,6 +12,10 @@ import java.util.function.Function;
* @author hx * @author hx
*/ */
public interface IAnalyseDataService { public interface IAnalyseDataService {
<T> List<AnalyzeCodeBySignagesVO> getAnalyzeCodeBySignages(Function<T, MultiAnalyzeCodePO> convert, T resource); <T> List<AnalyzeCodeBySignagesVO> getAnalyzeCodeBySignages(Function<T, MultiAnalyzeCodePO> convert, T resource);
List<AnalyseDataTaosVO> periodTargetData(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, String signages);
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/PhotovoltaicService.java

@ -30,11 +30,11 @@ public interface PhotovoltaicService {
PhotovoltaicStationVo station(Long deptId); PhotovoltaicStationVo station(Long deptId);
// app区域数据 // app区域数据
PhotovoltaicStationAppVo app_subordinate(Long deptId); List<PhotovoltaicSubordinateAppVo> app_subordinate(Long deptId);
// app站点数据 // app站点数据
PhotovoltaicStationAppVo app_station(Long deptId); PhotovoltaicStationAppVo app_station(Long deptId);
// App功率/发电量查询 // App功率/发电量查询
PhotovoltaicLoadGenerateVo app_load_generate(Long deptId, Long type); List<PhotovoltaicLoadGenerateVo> app_load_generate(Long deptId, String type,String queryType);
} }

46
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AnalyseDataServiceImpl.java

@ -1,15 +1,25 @@
package com.hnac.hzims.operational.main.service.impl; package com.hnac.hzims.operational.main.service.impl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.hnac.hzims.EquipmentConstants;
import com.hnac.hzims.operational.main.service.IAnalyseDataService; import com.hnac.hzims.operational.main.service.IAnalyseDataService;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyzeDataConditionPO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -33,4 +43,40 @@ public class AnalyseDataServiceImpl implements IAnalyseDataService {
} }
return result; return result;
} }
/***
* 指标数据查询
* @param startTime 开始时间
* @param endTime 结束时间
* @param cycleType
* @param deviceCode
* @param signages
* @return
*/
@Override
public List<AnalyseDataTaosVO> periodTargetData(String startTime, String endTime, Integer accessRules, Integer cycleType, String deviceCode, String signages) {
AnalyseCodeByAnalyseDataPO po = new AnalyseCodeByAnalyseDataPO();
List<AnalyzeDataConditionPO> signboardConditions = new ArrayList<>();
AnalyzeDataConditionPO analyzeDataConditionPO = new AnalyzeDataConditionPO();
analyzeDataConditionPO.setFull(1);
po.setDeviceCode(deviceCode);
analyzeDataConditionPO.setSignages(signages);
// 取数规则: 0=(整点值/最早值)、1=最大值、2=最小值、3=平均值、4=(累计值/和值)、5=(变化值/差值) 6=最新值
analyzeDataConditionPO.setAccessRules(accessRules);
// 周期类型: 0-> s(秒) 1->、m(分)、2->h(小时)3->、d(天)4->、w(周)5->、n(自然月)、6->y(自然年)
analyzeDataConditionPO.setSaveTimeType(cycleType);
// 间隔
analyzeDataConditionPO.setTimeInterval(1);
analyzeDataConditionPO.setBeginTime(LocalDateTime.parse(DateUtil.format(new Date(), startTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME)));
analyzeDataConditionPO.setEndTime(LocalDateTime.parse(DateUtil.format(new Date(), endTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME)));
signboardConditions.add(analyzeDataConditionPO);
po.setSignboardConditions(signboardConditions);
R<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po);
if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) {
return new ArrayList<>();
}
return result.getData().get(0).getList();
}
} }

680
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java

File diff suppressed because it is too large Load Diff

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java

@ -1634,7 +1634,7 @@ public class SideHustleServiceImpl implements ISideHustleService {
if(CollectionUtil.isEmpty(list)){ if(CollectionUtil.isEmpty(list)){
return 0; return 0;
} }
return (float) list.stream().filter(v->o.equals(v.getDate())).mapToDouble(GenerationPowerVo::getGenerationPower).sum(); return (float) list.stream().filter(v->o.equals(v.getDate())).mapToDouble(GenerationPowerVo::getGenerate).sum();
} }
/** /**

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WebHomeServiceImpl.java

@ -322,7 +322,7 @@ public class WebHomeServiceImpl implements IWebHomeService {
generationPowerVo.setDate(dayList.get(i)); generationPowerVo.setDate(dayList.get(i));
// 某天发电量 // 某天发电量
float power = homePageService.getAnalyzeCodeAndSignages(device, dayList.get(i) + " 00:00:00", dayList.get(i + 1) + " 00:00:00",EquipmentConstants.CycleTypeEnum.DAY_CYCLE.getType(),HomePageConstant.HYDROPOWER_GENERATE_POWER); float power = homePageService.getAnalyzeCodeAndSignages(device, dayList.get(i) + " 00:00:00", dayList.get(i + 1) + " 00:00:00",EquipmentConstants.CycleTypeEnum.DAY_CYCLE.getType(),HomePageConstant.HYDROPOWER_GENERATE_POWER);
generationPowerVo.setGenerationPower(power); generationPowerVo.setGenerate(power);
generationPowerVoList.add(generationPowerVo); generationPowerVoList.add(generationPowerVo);
} }
return generationPowerVoList; return generationPowerVoList;

Loading…
Cancel
Save