Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2026-01-22 15:08:50 +08:00
4 changed files with 22 additions and 10 deletions

View File

@ -41,6 +41,9 @@ public class AmmeterRevenueStatisListVo {
/** 组合无功-谷 */ /** 组合无功-谷 */
private BigDecimal reActiveValleyPrice = BigDecimal.ZERO; private BigDecimal reActiveValleyPrice = BigDecimal.ZERO;
/** 实际收益 */
private BigDecimal actualRevenue = BigDecimal.ZERO;
public String getDataTime() { public String getDataTime() {
return dataTime; return dataTime;
} }
@ -128,4 +131,12 @@ public class AmmeterRevenueStatisListVo {
public void setReActiveValleyPrice(BigDecimal reActiveValleyPrice) { public void setReActiveValleyPrice(BigDecimal reActiveValleyPrice) {
this.reActiveValleyPrice = reActiveValleyPrice; this.reActiveValleyPrice = reActiveValleyPrice;
} }
public BigDecimal getActualRevenue() {
return actualRevenue;
}
public void setActualRevenue(BigDecimal actualRevenue) {
this.actualRevenue = actualRevenue;
}
} }

View File

@ -347,10 +347,11 @@ public class EmsStatsReportServiceImpl implements IEmsStatsReportService
if (CollectionUtils.isEmpty(resultList)) { if (CollectionUtils.isEmpty(resultList)) {
return Collections.emptyList(); return Collections.emptyList();
} }
//计算每天总收益 //计算每天总收益和当日实际收益(放电总-充电总)
resultList.forEach(ammeterRevenue -> { resultList.forEach(ammeterRevenue -> {
ammeterRevenue.setActiveTotalPrice(ammeterRevenue.getActivePeakPrice().add(ammeterRevenue.getActiveHighPrice()).add(ammeterRevenue.getActiveFlatPrice()).add(ammeterRevenue.getActiveValleyPrice())); 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.setReActiveTotalPrice(ammeterRevenue.getReActivePeakPrice().add(ammeterRevenue.getReActiveHighPrice()).add(ammeterRevenue.getReActiveFlatPrice()).add(ammeterRevenue.getReActiveValleyPrice()));
ammeterRevenue.setActualRevenue(ammeterRevenue.getReActiveFlatPrice().subtract(ammeterRevenue.getActiveTotalPrice()));
}); });
return resultList; return resultList;

View File

@ -564,7 +564,7 @@ public class SingleSiteServiceImpl implements ISingleSiteService {
for (Map<String, Object> clusterDevice : clusterIds) { for (Map<String, Object> clusterDevice : clusterIds) {
BMSBatteryClusterVo bmsBatteryClusterVo = new BMSBatteryClusterVo(); BMSBatteryClusterVo bmsBatteryClusterVo = new BMSBatteryClusterVo();
bmsBatteryClusterVo.setDeviceName(clusterDevice.get("deviceName").toString()); bmsBatteryClusterVo.setDeviceName(clusterDevice.get("deviceName").toString());
bmsBatteryClusterVo.setParentDeviceName(clusterDevice.get("parentDeviceName").toString()); bmsBatteryClusterVo.setParentDeviceName(clusterDevice.get("parentDeviceName") == null ? null : clusterDevice.get("parentDeviceName").toString());
// 从redis取单个簇详细数据 // 从redis取单个簇详细数据
String clusterId = clusterDevice.get("id").toString(); String clusterId = clusterDevice.get("id").toString();
EmsBatteryCluster clusterData = redisCache.getCacheObject(RedisKeyConstants.CLUSTER +siteId+"_"+clusterId); EmsBatteryCluster clusterData = redisCache.getCacheObject(RedisKeyConstants.CLUSTER +siteId+"_"+clusterId);

View File

@ -236,14 +236,14 @@
<select id="getRevenueDataBySiteId" resultType="com.xzzn.ems.domain.vo.AmmeterRevenueStatisListVo"> <select id="getRevenueDataBySiteId" resultType="com.xzzn.ems.domain.vo.AmmeterRevenueStatisListVo">
select select
t.data_date as dataTime, t.data_date as dataTime,
t.peak_charge_diff * pc.peak as activePeakPrice, ROUND(t.peak_charge_diff * pc.peak, 3) as activePeakPrice,
t.peak_discharge_diff * pc.peak as reActivePeakPrice, ROUND(t.peak_discharge_diff * pc.peak, 3) as reActivePeakPrice,
t.high_charge_diff * pc.high as activeHighPrice, ROUND(t.high_charge_diff * pc.high, 3) as activeHighPrice,
t.high_discharge_diff * pc.high as reActiveHighPrice, ROUND(t.high_discharge_diff * pc.high, 3) as reActiveHighPrice,
t.flat_charge_diff * pc.flat as activeFlatPrice, ROUND(t.flat_charge_diff * pc.flat, 3) as activeFlatPrice,
t.flat_discharge_diff * pc.flat as reActiveFlatPrice, ROUND(t.flat_discharge_diff * pc.flat, 3) as reActiveFlatPrice,
t.valley_charge_diff * pc.valley as activeValleyPrice, ROUND(t.valley_charge_diff * pc.valley, 3) as activeValleyPrice,
t.valley_discharge_diff * pc.valley as reActiveValleyPrice ROUND(t.valley_discharge_diff * pc.valley, 3) as reActiveValleyPrice
from ems_daily_energy_data t from ems_daily_energy_data t
left join ( left join (
select select