Browse Source

#电量报表

zhongwei
yang_shj 5 months ago
parent
commit
4a1ac3f8e5
  1. 3
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/ThreeGenerationEntity.java
  2. 1
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
  3. 6
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java

3
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/ThreeGenerationEntity.java

@ -40,4 +40,7 @@ public class ThreeGenerationEntity extends TenantEntity {
@ApiModelProperty(value = "发电量")
private BigDecimal generate;
@ApiModelProperty(value = "无功电量")
private BigDecimal reactiveGenerate;
}

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

@ -173,6 +173,7 @@ public interface HomePageConstant {
// 水电站实时属性名称
String HYDROPOWER_GENERATE_POWER = "generation_capacity"; // 发电量
String HYDROPOWER_REACTIVE_GENERATE = "reactive_generate"; // 无功电量
String HYDROPOWER_ACTIVE_POWER = "active_power"; // 有功功率
String HYDROPOWER_REACTIVE_POWER = "reactive_power"; // 有功功率
String HYDROPOWER_POWERFACTOR = "index_jz_cos"; // 功率因数

6
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java

@ -363,6 +363,7 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService {
if(CollectionUtil.isEmpty(records)){
return;
}
List<AnalyseDataTaosVO> reactives = dataService.periodTargetData(start,end,5,5,device.getEmCode(),HomePageConstant.HYDROPOWER_REACTIVE_GENERATE);
// 保存设备发电量
threeGenerateService.saveBatch(records.stream().map(record -> {
ThreeGenerationEntity generate = new ThreeGenerationEntity();
@ -387,6 +388,11 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService {
}else{
generate.setGenerate(BigDecimal.valueOf(Double.parseDouble(record.getVal()) * device.getRideCount()));
}
// 无功电量
if(CollectionUtil.isEmpty(reactives)){
generate.setReactiveGenerate(BigDecimal.ZERO);
}
return generate;
}).collect(Collectors.toList()));
});

Loading…
Cancel
Save