Commit f5b3a939 authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.开发间开优化结果统计功能,创建间开优化效果统计表,生成对应代码;
2.修改15天,10天,3天,1天间开优化功能,修改代码结构;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent c3ca9686
...@@ -1800,10 +1800,13 @@ public class EnergyConsumptionAnalysisService { ...@@ -1800,10 +1800,13 @@ public class EnergyConsumptionAnalysisService {
for (DateTime dateTime : rangeToList) { for (DateTime dateTime : rangeToList) {
if (avgMap.containsKey(dateTime)) { if (avgMap.containsKey(dateTime)) {
//用电*3 //用电*3
powerConsumption = avgMap.get(dateTime).multiply(BigDecimal.valueOf(3)).setScale(2, RoundingMode.HALF_UP); powerConsumption = avgMap.get(dateTime).setScale(2, RoundingMode.HALF_UP);
} else { } else {
powerConsumption = defaultPower; powerConsumption = defaultPower;
} }
if (ObjectUtil.isNotNull(powerConsumption) && powerConsumption.compareTo(BigDecimal.ZERO) > 0) {
powerConsumption = powerConsumption.multiply(BigDecimal.valueOf(3));
}
if (powerMap.containsKey(dateTime)) { if (powerMap.containsKey(dateTime)) {
powerGeneration = powerMap.get(dateTime).setScale(2, RoundingMode.HALF_UP); powerGeneration = powerMap.get(dateTime).setScale(2, RoundingMode.HALF_UP);
} else { } else {
......
...@@ -337,7 +337,10 @@ public class HomePageService { ...@@ -337,7 +337,10 @@ public class HomePageService {
BigDecimal defaultPower = CharSequenceUtil.equals(oilFieldCode, BusinessConstant.ENV_CQ) ? BigDecimal.ZERO : null; BigDecimal defaultPower = CharSequenceUtil.equals(oilFieldCode, BusinessConstant.ENV_CQ) ? BigDecimal.ZERO : null;
for (DateTime dateTime : rangeToList) { for (DateTime dateTime : rangeToList) {
//用电*3 //用电*3
powerConsumption = avgMap.getOrDefault(dateTime, defaultPower).multiply(BigDecimal.valueOf(3)); powerConsumption = avgMap.getOrDefault(dateTime, defaultPower);
if (ObjectUtil.isNotNull(powerConsumption) && powerConsumption.compareTo(BigDecimal.ZERO) > 0) {
powerConsumption = powerConsumption.multiply(BigDecimal.valueOf(3));
}
powerGeneration = powerMap.getOrDefault(dateTime, BigDecimal.ZERO); powerGeneration = powerMap.getOrDefault(dateTime, BigDecimal.ZERO);
outputs.add(GetPowerAnalyseOutput.builder() outputs.add(GetPowerAnalyseOutput.builder()
.dateFormat(dateTime.toString(BusinessConstant.DATE_FORMAT_ALL)) .dateFormat(dateTime.toString(BusinessConstant.DATE_FORMAT_ALL))
......
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