收益报表新增一列”实际收益“,价格保留三位小数
This commit is contained in:
@ -41,6 +41,9 @@ public class AmmeterRevenueStatisListVo {
|
||||
/** 组合无功-谷 */
|
||||
private BigDecimal reActiveValleyPrice = BigDecimal.ZERO;
|
||||
|
||||
/** 实际收益 */
|
||||
private BigDecimal actualRevenue = BigDecimal.ZERO;
|
||||
|
||||
public String getDataTime() {
|
||||
return dataTime;
|
||||
}
|
||||
@ -128,4 +131,12 @@ public class AmmeterRevenueStatisListVo {
|
||||
public void setReActiveValleyPrice(BigDecimal reActiveValleyPrice) {
|
||||
this.reActiveValleyPrice = reActiveValleyPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getActualRevenue() {
|
||||
return actualRevenue;
|
||||
}
|
||||
|
||||
public void setActualRevenue(BigDecimal actualRevenue) {
|
||||
this.actualRevenue = actualRevenue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -347,10 +347,11 @@ public class EmsStatsReportServiceImpl implements IEmsStatsReportService
|
||||
if (CollectionUtils.isEmpty(resultList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
//计算每天总收益
|
||||
//计算每天总收益和当日实际收益(放电总-充电总)
|
||||
resultList.forEach(ammeterRevenue -> {
|
||||
ammeterRevenue.setActiveTotalPrice(ammeterRevenue.getActivePeakPrice().add(ammeterRevenue.getActiveHighPrice()).add(ammeterRevenue.getActiveFlatPrice()).add(ammeterRevenue.getActiveValleyPrice()));
|
||||
ammeterRevenue.setReActiveTotalPrice(ammeterRevenue.getReActivePeakPrice().add(ammeterRevenue.getReActiveHighPrice()).add(ammeterRevenue.getReActiveFlatPrice()).add(ammeterRevenue.getReActiveValleyPrice()));
|
||||
ammeterRevenue.setActualRevenue(ammeterRevenue.getReActiveFlatPrice().subtract(ammeterRevenue.getActiveTotalPrice()));
|
||||
});
|
||||
|
||||
return resultList;
|
||||
|
||||
Reference in New Issue
Block a user