计算站点日报, 实付金额大于0小于结算金额, 按照实付金额汇总

This commit is contained in:
Guoqs
2025-06-23 16:36:47 +08:00
parent dcb09557b7
commit a81b1392d1
4 changed files with 28 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.common.util.id.IdUtils;
import com.jsowell.pile.domain.PileStationInfo;
import com.jsowell.pile.domain.SettleOrderReport;
@@ -682,10 +683,9 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
BigDecimal settleAmount = StringUtils.isBlank(vo.getSettleAmount())
? BigDecimal.ZERO
: new BigDecimal(vo.getSettleAmount());
// if (settleAmount.compareTo(BigDecimal.ZERO) <= 0) {
// // 只统计用电量大于0的
// continue;
// }
// 实收金额
BigDecimal actualReceivedAmount = vo.getActualReceivedAmount();
// 用电度数
BigDecimal chargingDegree = StringUtils.isBlank(vo.getChargingDegree())
@@ -704,6 +704,9 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
continue;
}
// 结算金额与实收金额取大于0的最小值
settleAmount = YKCUtils.getMinBigDecimal(settleAmount, actualReceivedAmount);
String orderAmount = vo.getOrderAmount(); // 订单消费金额
useElectricity = useElectricity.add(chargingDegree); // 充电度数累计

View File

@@ -248,6 +248,11 @@ public class OrderListVO {
@Excel(name = "结算金额")
private String settleAmount;
/**
* 实收金额
*/
private BigDecimal actualReceivedAmount;
/**
* 交易服务费/通道手续费
*/