修改场站添加接口

This commit is contained in:
yuyang 2021-08-04 17:12:59 +08:00
parent bd654c03d4
commit 8e93590b73
3 changed files with 25 additions and 16 deletions

View File

@ -59,8 +59,8 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
XhpcTerminal xhpcTerminal =new XhpcTerminal(); XhpcTerminal xhpcTerminal =new XhpcTerminal();
xhpcTerminal.setChargingStationId(chargingStationId); xhpcTerminal.setChargingStationId(chargingStationId);
xhpcTerminal.setChargingPileId(chargingPileId); xhpcTerminal.setChargingPileId(chargingPileId);
xhpcTerminal.setName(serialNumber + "-" + (i + 1)); xhpcTerminal.setName(serialNumber + "-" + (i));
xhpcTerminal.setPileSerialNumber(serialNumber); xhpcTerminal.setPileSerialNumber(serialNumber+ "0" + i);
xhpcTerminal.setWorkStatus(2); xhpcTerminal.setWorkStatus(2);
xhpcTerminal.setStatus(0); xhpcTerminal.setStatus(0);
xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal); xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal);

View File

@ -1,10 +1,13 @@
package com.xhpc.charging.station.service; package com.xhpc.charging.station.service;
import cn.hutool.core.date.BetweenFormatter;
import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.xhpc.charging.station.mapper.XhpcChargingStationMapper;
import com.xhpc.common.api.PowerPileService; import com.xhpc.common.api.PowerPileService;
import com.xhpc.common.api.dto.ChargingPileDto; import com.xhpc.common.api.dto.XhpcChargingStationDto;
import com.xhpc.common.api.dto.XhpcRateDto;
import com.xhpc.common.api.dto.XhpcRateTimeDto;
import com.xhpc.common.core.domain.R; import com.xhpc.common.core.domain.R;
import com.xhpc.common.core.utils.DateUtils; import com.xhpc.common.core.utils.DateUtils;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
@ -13,14 +16,8 @@ import com.xhpc.common.domain.XhpcChargingStation;
import com.xhpc.common.domain.XhpcRate; import com.xhpc.common.domain.XhpcRate;
import com.xhpc.common.domain.XhpcRateModel; import com.xhpc.common.domain.XhpcRateModel;
import com.xhpc.common.domain.XhpcRateTime; import com.xhpc.common.domain.XhpcRateTime;
import com.xhpc.common.api.dto.XhpcChargingStationDto;
import com.xhpc.common.api.dto.XhpcRateDto;
import com.xhpc.common.api.dto.XhpcRateTimeDto;
import com.xhpc.charging.station.mapper.XhpcChargingStationMapper;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Version;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -543,7 +543,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by, update_by,
</if> </if>
<if test="null != remark and '' != remark"> <if test="null != remark and '' != remark">
remark remark,
</if>
<if test="null != rateValue">
rate_value
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -578,7 +581,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateBy}, #{updateBy},
</if> </if>
<if test="null != remark and '' != remark"> <if test="null != remark and '' != remark">
#{remark} #{remark},
</if>
<if test="null != rateValue">
#{rateValue}
</if> </if>
</trim> </trim>
</insert> </insert>
@ -625,10 +631,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_by, update_by,
</if> </if>
<if test="null != remark and '' != remark"> <if test="null != remark and '' != remark">
remark remark,
</if> </if>
<if test="null != type "> <if test="null != type ">
type type,
</if>
<if test="null != rateValue ">
rate_value
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -669,10 +678,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{updateBy}, #{updateBy},
</if> </if>
<if test="null != remark and '' != remark"> <if test="null != remark and '' != remark">
#{remark} #{remark},
</if> </if>
<if test="null != type "> <if test="null != type ">
#{type} #{type},
</if>
<if test="null != rateValue ">
#{rateValue}
</if> </if>
</trim> </trim>
</insert> </insert>