From aa43ef7e3ac52dd223268711a92264e133290552 Mon Sep 17 00:00:00 2001 From: yuyang Date: Mon, 14 Feb 2022 14:33:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=86=E5=8F=B2=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/XhpcHistoryOrderServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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); //获取费率时间段