Commit 6bcc4980 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.修改部分第三方数据处理定时任务,修改系统来源,将固定来源按环境区分改为动态获取;
2.修改统计分析-间开效果评价新页面累节电能接口,暂时无法获取电费信息,将电费信息默认做随机数处理;
3.修改统计分析-能耗分析新页面峰谷能耗对比分析接口,暂时无法获取电费信息,将电费信息默认做随机数处理;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent aeac71c2
......@@ -775,15 +775,17 @@ public class EnergyConsumptionAnalysisService {
if (map.containsKey(dateTime)) {
saveElectricity = map.get(dateTime);
carbonReduction = this.calculateCarbonReduction(map.get(dateTime));
electricityFees = this.calculateElectricityFees(map.get(dateTime));
} else {
saveElectricity = BigDecimal.ZERO;
carbonReduction = BigDecimal.ZERO;
electricityFees = BigDecimal.ZERO;
}
outputs.add(GetEconomicBenefitsOutput.builder()
.dateFormat(dateTime)
.carbonReduction(carbonReduction)
.saveElectricity(saveElectricity)
.electricityFees(BigDecimal.ZERO)
.electricityFees(electricityFees)
.build());
}
break;
......@@ -1407,6 +1409,24 @@ public class EnergyConsumptionAnalysisService {
return economicBenefit;
}
/**
* 计算电费
*
* @param photovoltaicPower 光伏发电
* @return {@link BigDecimal }
*/
private BigDecimal calculateElectricityFees(BigDecimal photovoltaicPower) {
BigDecimal economicBenefit;
if (photovoltaicPower.compareTo(BigDecimal.ZERO) > 0) {
economicBenefit = photovoltaicPower
.multiply(BigDecimal.valueOf(0.8))
.setScale(2, RoundingMode.HALF_UP);
} else {
economicBenefit = BigDecimal.ZERO;
}
return economicBenefit;
}
/**
* 计算累计减碳量
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment