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},