diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcHistoryOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcHistoryOrderServiceImpl.java index 47e5fdfa..1934d69e 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcHistoryOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcHistoryOrderServiceImpl.java @@ -767,7 +767,7 @@ public class XhpcHistoryOrderServiceImpl extends BaseService implements IXhpcHis if(chargingDegree.compareTo(new BigDecimal(0))==0){ Map map1 = new HashMap<>(); map1.put("time", 0); - map1.put("powerPrice", 0); + map1.put("powerPrice", actPrice); map1.put("servicePrice", 0); map1.put("chargingDegree", chargeOrder.getChargingDegree()); map1.put("actPrice", actPrice); @@ -778,6 +778,18 @@ public class XhpcHistoryOrderServiceImpl extends BaseService implements IXhpcHis //算出相差时间,分 BigDecimal decimal = new BigDecimal((updateTime2.getTime() - startTime2.getTime()) / 60000).setScale(2); + + if(decimal.compareTo(new BigDecimal(0))==0){ + Map map1 = new HashMap<>(); + map1.put("time", 0); + map1.put("powerPrice", actPrice); + map1.put("servicePrice", 0); + map1.put("chargingDegree", chargeOrder.getChargingDegree()); + map1.put("actPrice", actPrice); + list.add(map1); + map.put("list", list);//数据列表 + return map; + } //每分钟多少度 BigDecimal degree = chargingDegree.divide(decimal, 2, BigDecimal.ROUND_DOWN); //获取费率时间段