mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
站点日报统计所有耗电量大于0的订单; 分账任务里待分账的订单过滤掉结算订单为0的订单
This commit is contained in:
@@ -1232,6 +1232,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 2025年1月14日16点50分, 过滤掉结算金额为0的订单
|
||||
orderBasicInfos = orderBasicInfos.stream()
|
||||
.filter(x -> x.getSettleAmount().compareTo(BigDecimal.ZERO) > 0)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 执行分账
|
||||
for (OrderBasicInfo orderBasicInfo : orderBasicInfos) {
|
||||
try {
|
||||
|
||||
@@ -621,7 +621,7 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
|
||||
/**
|
||||
* 计算站点订单报表
|
||||
*
|
||||
* 2025年1月14日13点53分修改逻辑, 统计充电次数,耗电量和消费金额, 统计范围为全部订单(在线支付, 余额支付, 白名单支付等)
|
||||
* @param stationInfo 站点信息
|
||||
* @param tradeDate 交易日期
|
||||
*/
|
||||
@@ -651,17 +651,16 @@ public class SettleOrderReportServiceImpl implements SettleOrderReportService {
|
||||
List<String> collect = orderListVOS.stream().map(OrderListVO::getOrderCode).collect(Collectors.toList());
|
||||
log.info("站点:{}, 在{}-{}查询到订单数据{}条,订单编号:{}", stationInfo.getStationName(), startTime, endTime, orderListVOS.size(), collect);
|
||||
// 统计出日报信息
|
||||
BigDecimal useElectricity = BigDecimal.ZERO;
|
||||
int chargeNum = 0;
|
||||
long chargeTime = 0L;
|
||||
BigDecimal totalElectricityAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalServiceAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalOrderAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalVirtualAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalSettleAmount = BigDecimal.ZERO;
|
||||
// 总手续费
|
||||
BigDecimal totalFeeAmount = BigDecimal.ZERO;
|
||||
BigDecimal totalTradeAmount = BigDecimal.ZERO;
|
||||
BigDecimal useElectricity = BigDecimal.ZERO; // 总电量使用量
|
||||
int chargeNum = 0; // 总充电次数
|
||||
long chargeTime = 0L; // 总充电时长
|
||||
BigDecimal totalElectricityAmount = BigDecimal.ZERO; // 总电费金额
|
||||
BigDecimal totalServiceAmount = BigDecimal.ZERO; // 总服务费金额
|
||||
BigDecimal totalOrderAmount = BigDecimal.ZERO; // 总订单消费金额
|
||||
BigDecimal totalVirtualAmount = BigDecimal.ZERO; // 总虚拟金额
|
||||
BigDecimal totalSettleAmount = BigDecimal.ZERO; // 总结算金额
|
||||
BigDecimal totalFeeAmount = BigDecimal.ZERO; // 总手续费
|
||||
BigDecimal totalTradeAmount = BigDecimal.ZERO; // 总交易金额
|
||||
|
||||
List<String> orderCodeList = Lists.newArrayList();
|
||||
for (OrderListVO vo : orderListVOS) {
|
||||
@@ -669,21 +668,24 @@ 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;
|
||||
}
|
||||
|
||||
// 订单消费金额
|
||||
String orderAmount = vo.getOrderAmount();
|
||||
// if (settleAmount.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
// // 只统计用电量大于0的
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// 用电度数
|
||||
BigDecimal chargingDegree = StringUtils.isBlank(vo.getChargingDegree())
|
||||
? BigDecimal.ZERO
|
||||
: new BigDecimal(vo.getChargingDegree());
|
||||
|
||||
// 充电度数累计
|
||||
useElectricity = useElectricity.add(chargingDegree);
|
||||
// 统计用电度数大于0的订单, 2025年1月14日16点00分修改
|
||||
if (chargingDegree.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
// 只统计用电量大于0的
|
||||
continue;
|
||||
}
|
||||
|
||||
String orderAmount = vo.getOrderAmount(); // 订单消费金额
|
||||
useElectricity = useElectricity.add(chargingDegree); // 充电度数累计
|
||||
|
||||
// 充电次数
|
||||
chargeNum += 1;
|
||||
|
||||
Reference in New Issue
Block a user