1修改电站BUG

This commit is contained in:
fengjundan 2021-08-05 17:40:57 +08:00
parent 7bb3490364
commit 9bf07cc18c
3 changed files with 9 additions and 7 deletions

View File

@ -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<String, Object> 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();
//判断桩编号是否重复

View File

@ -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;

View File

@ -296,8 +296,8 @@
<if test="type != null">type = #{type},</if>
<if test="programVersion != null">program_version = #{programVersion},</if>
<if test="networkLinkType != null">network_link_type = #{networkLinkType},</if>
<if test="gunNumber != null">network_link_type = #{gunNumber},</if>
<if test="networkLinkType != null">gun_number = #{networkLinkType},</if>
<if test="gunNumber != null">gun_number = #{gunNumber},</if>
<if test="networkLinkType != null">network_link_type = #{networkLinkType},</if>
<if test="communicationProtocolVersion != null">communication_protocol_version =
#{communicationProtocolVersion},
</if>