|
@@ -58,26 +58,28 @@ public class ProjectEnergyUsageBuilder extends ProjectParagraphBuilder {
|
|
|
|
|
|
List<AttrValueVO> result = new ArrayList<>();
|
|
|
// 总耗电量
|
|
|
- AttrValueVO totalUsage = data.get(EnergyUsageContentCodes.currentMonth.name());
|
|
|
- if (totalUsage != null) {
|
|
|
- totalUsage.setCode(EnergyUsageHeaderCodes.totalUsage.name());
|
|
|
+ AttrValueVO currentMonth = data.get(EnergyUsageContentCodes.currentMonth.name());
|
|
|
+
|
|
|
+ if (currentMonth != null) {
|
|
|
+ AttrValueVO totalUsage = new AttrValueVO(
|
|
|
+ EnergyUsageHeaderCodes.totalUsage.name(), currentMonth.getValue(), currentMonth.getType());
|
|
|
result.add(totalUsage);
|
|
|
}
|
|
|
// 同比增幅
|
|
|
AttrValueVO sametimeRange = data.get(EnergyUsageContentCodes.sametimeRange.name());
|
|
|
if (sametimeRange != null) {
|
|
|
- sametimeRange.setCode(EnergyUsageHeaderCodes.sameTimeRange.name());
|
|
|
- result.add(sametimeRange);
|
|
|
+ result.add(new AttrValueVO(
|
|
|
+ EnergyUsageHeaderCodes.sameTimeRange.name(), sametimeRange.getValue(), sametimeRange.getType()));
|
|
|
}
|
|
|
// 环比增幅
|
|
|
AttrValueVO chainRange = data.get(EnergyUsageContentCodes.chainRange.name());
|
|
|
if (chainRange != null) {
|
|
|
- chainRange.setCode(EnergyUsageHeaderCodes.chainRange.name());
|
|
|
- result.add(chainRange);
|
|
|
+ result.add(new AttrValueVO(
|
|
|
+ EnergyUsageHeaderCodes.chainRange.name(), chainRange.getValue(), chainRange.getType()));
|
|
|
}
|
|
|
// 同等碳排放量
|
|
|
- if (totalUsage != null) {
|
|
|
- AttrValueVO tce = energyUsageFactory.getTce(DataUtils.parseDouble(totalUsage.getValue()));
|
|
|
+ if (currentMonth != null) {
|
|
|
+ AttrValueVO tce = energyUsageFactory.getTce(DataUtils.parseDouble(currentMonth.getValue()));
|
|
|
result.add(tce);
|
|
|
}
|
|
|
// 总建筑面积
|