From 9bf07cc18cc7894386bf08d576b83850e9ac4a20 Mon Sep 17 00:00:00 2001 From: fengjundan <1436525664@qq.com> Date: Thu, 5 Aug 2021 17:40:57 +0800 Subject: [PATCH] =?UTF-8?q?1=E4=BF=AE=E6=94=B9=E7=94=B5=E7=AB=99BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station/service/XhpcChargingPileServiceImpl.java | 9 +++++---- .../station/service/XhpcTerminalServiceImpl.java | 3 ++- .../src/main/resources/mapper/XhpcChargingPileMapper.xml | 4 ++-- 3 files changed, 9 insertions(+), 7 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 c01f5d9c..01ec0ed3 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 @@ -1,11 +1,12 @@ package com.xhpc.charging.station.service; -import com.xhpc.common.core.web.domain.AjaxResult; -import com.xhpc.common.domain.XhpcChargingPile; -import com.xhpc.common.domain.XhpcTerminal; import com.xhpc.charging.station.mapper.XhpcChargingPileMapper; import com.xhpc.charging.station.mapper.XhpcTerminalMapper; import com.xhpc.common.api.PowerPileService; +import com.xhpc.common.core.utils.StringUtils; +import com.xhpc.common.core.web.domain.AjaxResult; +import com.xhpc.common.domain.XhpcChargingPile; +import com.xhpc.common.domain.XhpcTerminal; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,7 +49,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { Long chargingStationId = xhpcChargingPile.getChargingStationId(); //获取计费模型id Map stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId); - Long rateModelId = Long.parseLong(stringObjectMap.get("rateModelId").toString()); + Long rateModelId = Long.parseLong(StringUtils.valueOf(stringObjectMap.get("rateModelId"))); xhpcChargingPile.setRateModelId(rateModelId); String serialNumber = xhpcChargingPile.getSerialNumber(); //判断桩编号是否重复 diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java index 48bfc15b..75e15a2e 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcTerminalServiceImpl.java @@ -1,9 +1,9 @@ package com.xhpc.charging.station.service; import cn.hutool.core.date.DateUtil; +import com.xhpc.charging.station.mapper.XhpcTerminalMapper; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.domain.XhpcTerminal; -import com.xhpc.charging.station.mapper.XhpcTerminalMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,6 +20,7 @@ public class XhpcTerminalServiceImpl implements IXhpcTerminalService { @Autowired private XhpcTerminalMapper xhpcTerminalMapper; + @Autowired private IXhpcRateTimeService xhpcRateTimeService; diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml index 39424620..4494068b 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml @@ -296,8 +296,8 @@ type = #{type}, program_version = #{programVersion}, network_link_type = #{networkLinkType}, - network_link_type = #{gunNumber}, - gun_number = #{networkLinkType}, + gun_number = #{gunNumber}, + network_link_type = #{networkLinkType}, communication_protocol_version = #{communicationProtocolVersion},