From 692aa17418c3e0eec5fd6a2477b417ebfdf873de Mon Sep 17 00:00:00 2001 From: yuyang <2265829957@qq.com> Date: Mon, 23 Aug 2021 11:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E6=97=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station/service/XhpcChargingPileServiceImpl.java | 4 +--- .../order/service/impl/HxpcChargeOrderServiceImpl.java | 4 ---- .../order/service/impl/XhpcRealTimeOrderServiceImpl.java | 4 ---- .../mapper/XhpcHistoryOrderReconciliationStatusMapper.xml | 8 ++++---- .../mapper/XhpcHistoryOrderSortingStatusMapper.xml | 4 ++-- .../src/main/resources/mapper/XhpcRealTimeOrderMapper.xml | 7 +++---- 6 files changed, 10 insertions(+), 21 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java index b3795e3f..a13ca125 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java @@ -85,8 +85,6 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { HashSet noSet = new HashSet<>(); noSet.add(serialNumber); R r = powerPileService.addPileWhitelist(chargingStationId, noSet); - System.out.println(">>>>>>"+r.getCode()); - System.out.println(">>>>>>"+r.getMsg()); return AjaxResult.success(); } @@ -111,7 +109,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { Long rateModelId = xhpcChargingPile.getRateModelId(); Long chargingStationId = xhpcChargingPile.getChargingStationId(); if (xhpcChargingPile.getGunNumber() > 0) { - for (int i = 0; i < xhpcChargingPile.getGunNumber(); i++) { + for (int i = 1; i <= xhpcChargingPile.getGunNumber(); i++) { XhpcTerminal xhpcTerminal = new XhpcTerminal(); xhpcTerminal.setChargingStationId(chargingStationId); xhpcTerminal.setChargingPileId(chargingPileId); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/HxpcChargeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/HxpcChargeOrderServiceImpl.java index f3cf8acc..aa92843e 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/HxpcChargeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/HxpcChargeOrderServiceImpl.java @@ -6,13 +6,11 @@ import com.xhpc.common.core.domain.R; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.data.down.StartChargingData; import com.xhpc.common.data.redis.SeqUtil; -import com.xhpc.common.domain.XhpcChargingPile; import com.xhpc.common.domain.XhpcTerminal; import com.xhpc.common.redis.service.RedisService; import com.xhpc.order.domain.HxpcChargeOrder; import com.xhpc.order.mapper.HxpcChargeOrderMapper; import com.xhpc.order.service.IHxpcChargeOrderService; -import com.xhpc.order.service.IXhpcHistoryOrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -37,8 +35,6 @@ public class HxpcChargeOrderServiceImpl implements IHxpcChargeOrderService { @Autowired private HxpcChargeOrderMapper hxpcChargeOrderMapper; @Autowired - private IXhpcHistoryOrderService xhpcHistoryOrderService; - @Autowired private PowerPileService powerPileService; @Autowired private RedisService redisService; diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java index 4db95188..1056605a 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java @@ -1,7 +1,6 @@ package com.xhpc.order.service.impl; import com.xhpc.common.core.web.domain.AjaxResult; -import com.xhpc.common.redis.service.RedisService; import com.xhpc.order.domain.XhpcChargeOrderCurrent; import com.xhpc.order.domain.XhpcChargeOrderSoc; import com.xhpc.order.domain.XhpcChargeOrderVoltage; @@ -11,7 +10,6 @@ import com.xhpc.order.service.IXhpcRealTimeOrderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -23,8 +21,6 @@ import java.util.Map; @Service public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService { - @Autowired - private RedisService redisService; @Autowired private XhpcRealTimeOrderMapper xhpcRealTimeOrderMapper; diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderReconciliationStatusMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderReconciliationStatusMapper.xml index ae474b5c..d5829f79 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderReconciliationStatusMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderReconciliationStatusMapper.xml @@ -82,7 +82,7 @@ LEFT JOIN (select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission) waitConfirmed,xho.user_id from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id @@ -99,7 +99,7 @@ LEFT JOIN (select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) confirmed ,xho.user_id from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id @@ -124,7 +124,7 @@ xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status` reconciliationStatus,sdd.dict_label reconciliationStatusName from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value = @@ -168,7 +168,7 @@ reconciliationStatus,sdd.dict_label reconciliationStatusName, xho.end_soc endSoc from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = 'reconciliation_status' and sdd.dict_value = diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderSortingStatusMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderSortingStatusMapper.xml index ccbe9cc4..f3273ce7 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderSortingStatusMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderSortingStatusMapper.xml @@ -151,7 +151,7 @@ xco.source, CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN sys_user su on xo.operator_id = su.operator_id @@ -197,7 +197,7 @@ CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName, xho.end_soc endSoc from xhpc_history_order xho - LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id + LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charge_order_id LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id LEFT JOIN sys_user su on xo.operator_id = su.operator_id diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml index 74d09d1b..b0d2f9bb 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcRealTimeOrderMapper.xml @@ -435,7 +435,6 @@ #{phone}, '%')) - group by charging_order_id order by co.create_time desc @@ -515,14 +514,14 @@ - delete from xhpc_charge_order_current where charging_order_id=#{chargingOrderId} + delete from xhpc_charge_order_current where charge_order_id=#{chargingOrderId} - delete from xhpc_charge_order_soc where charging_order_id=#{chargingOrderId} + delete from xhpc_charge_order_soc where charge_order_id=#{chargingOrderId} - delete from xhpc_charge_order_voltage where charging_order_id=#{chargingOrderId} + delete from xhpc_charge_order_voltage where charge_order_id=#{chargingOrderId} \ No newline at end of file