mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-07 15:38:10 +08:00
update 优化计算订单日报
This commit is contained in:
@@ -2086,24 +2086,37 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
BigDecimal totalVirtualAmount = BigDecimal.ZERO;
|
BigDecimal totalVirtualAmount = BigDecimal.ZERO;
|
||||||
BigDecimal totalSettleAmount = BigDecimal.ZERO;
|
BigDecimal totalSettleAmount = BigDecimal.ZERO;
|
||||||
for (OrderListVO vo : orderListVOS) {
|
for (OrderListVO vo : orderListVOS) {
|
||||||
BigDecimal chargingDegree = new BigDecimal(vo.getChargingDegree());
|
// 统计orderAmount大于0的
|
||||||
|
String orderAmount = vo.getOrderAmount();
|
||||||
|
if (StringUtils.isBlank(orderAmount)) {
|
||||||
|
// 没有订单消费金额,不统计
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 用电度数
|
||||||
|
BigDecimal chargingDegree = StringUtils.isBlank(vo.getChargingDegree())
|
||||||
|
? BigDecimal.ZERO
|
||||||
|
: new BigDecimal(vo.getChargingDegree());
|
||||||
if (chargingDegree.compareTo(BigDecimal.ZERO) <= 0) {
|
if (chargingDegree.compareTo(BigDecimal.ZERO) <= 0) {
|
||||||
// 只统计用电量大于0的
|
// 只统计用电量大于0的
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 充电度数
|
// 充电度数累计
|
||||||
useElectricity = useElectricity.add(chargingDegree);
|
useElectricity = useElectricity.add(chargingDegree);
|
||||||
// 充电次数
|
// 充电次数
|
||||||
chargeNum += 1;
|
chargeNum += 1;
|
||||||
// 充电时间
|
|
||||||
|
// 充电时间累计
|
||||||
|
if (StringUtils.isNotBlank(vo.getChargeStartTime()) && StringUtils.isNotBlank(vo.getChargeEndTime())) {
|
||||||
long l = DateUtils.intervalTime(vo.getChargeStartTime(), vo.getChargeEndTime());
|
long l = DateUtils.intervalTime(vo.getChargeStartTime(), vo.getChargeEndTime());
|
||||||
chargeTime += l;
|
chargeTime += l;
|
||||||
|
}
|
||||||
|
|
||||||
// 电费金额
|
// 电费金额
|
||||||
totalElectricityAmount = totalElectricityAmount.add(vo.getTotalElectricityAmount());
|
totalElectricityAmount = totalElectricityAmount.add(vo.getTotalElectricityAmount());
|
||||||
// 服务费金额
|
// 服务费金额
|
||||||
totalServiceAmount = totalServiceAmount.add(vo.getTotalServiceAmount());
|
totalServiceAmount = totalServiceAmount.add(vo.getTotalServiceAmount());
|
||||||
// 订单金额
|
// 订单金额
|
||||||
totalOrderAmount = totalOrderAmount.add(new BigDecimal(vo.getOrderAmount()));
|
totalOrderAmount = totalOrderAmount.add(new BigDecimal(orderAmount));
|
||||||
// 虚拟金额
|
// 虚拟金额
|
||||||
totalVirtualAmount = totalVirtualAmount.add(new BigDecimal(vo.getVirtualAmount()));
|
totalVirtualAmount = totalVirtualAmount.add(new BigDecimal(vo.getVirtualAmount()));
|
||||||
// 结算金额
|
// 结算金额
|
||||||
|
|||||||
@@ -123,6 +123,11 @@ public class OrderListVO {
|
|||||||
@Excel(name = "支付状态", dictType = "pay_status")
|
@Excel(name = "支付状态", dictType = "pay_status")
|
||||||
private String payStatus;
|
private String payStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private String payTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 起始soc
|
* 起始soc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
t1.pay_mode as payMode,
|
t1.pay_mode as payMode,
|
||||||
t1.pay_status as payStatus,
|
t1.pay_status as payStatus,
|
||||||
t1.pay_amount as payAmount,
|
t1.pay_amount as payAmount,
|
||||||
|
t1.pay_time as payTime,
|
||||||
t1.order_amount as orderAmount,
|
t1.order_amount as orderAmount,
|
||||||
t1.virtual_amount as virtualAmount,
|
t1.virtual_amount as virtualAmount,
|
||||||
t1.settle_amount as settleAmount,
|
t1.settle_amount as settleAmount,
|
||||||
|
|||||||
Reference in New Issue
Block a user