mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
update 显示已充电量
This commit is contained in:
@@ -625,7 +625,11 @@ public class OrderService {
|
|||||||
BeanUtils.copyBeanProp(billingDetails, orderDetail);
|
BeanUtils.copyBeanProp(billingDetails, orderDetail);
|
||||||
vo.setBillingDetails(billingDetails);
|
vo.setBillingDetails(billingDetails);
|
||||||
if (StringUtils.equals(OrderStatusEnum.ORDER_COMPLETE.getValue(), orderStatus)) {
|
if (StringUtils.equals(OrderStatusEnum.ORDER_COMPLETE.getValue(), orderStatus)) {
|
||||||
vo.setChargingDegree(String.valueOf(orderDetail.getTotalUsedElectricity()));
|
BigDecimal totalUsedElectricity = orderDetail.getTotalUsedElectricity();
|
||||||
|
if (totalUsedElectricity != null && StringUtils.isNotBlank(vo.getChargingAmount())
|
||||||
|
&& totalUsedElectricity.compareTo(new BigDecimal(vo.getChargingAmount())) > 0) {
|
||||||
|
vo.setChargingDegree(String.valueOf(totalUsedElectricity));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user