修改方法名

This commit is contained in:
yuyang 2021-07-28 20:15:54 +08:00
parent 9c405291dd
commit fcc90c421d
8 changed files with 47 additions and 49 deletions

View File

@ -3,8 +3,8 @@ package com.xhpc.charging.station.controller;
import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.common.domain.XhpcChargingPile;
import com.xhpc.charging.station.service.IXhpcChargingPileService; import com.xhpc.charging.station.service.IXhpcChargingPileService;
import com.xhpc.common.domain.XhpcChargingPile;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -34,7 +34,7 @@ public class XhpcChargingPileController extends BaseController {
public TableDataInfo list(String name, Integer type, Integer status, String serialNumber,Long chargingStationId) public TableDataInfo list(String name, Integer type, Integer status, String serialNumber,Long chargingStationId)
{ {
startPage(); startPage();
List<Map<String,Object>> list = xhpcChargingPileService.selectXhpcChargingStationList(name,type,serialNumber,chargingStationId); List<Map<String,Object>> list = xhpcChargingPileService.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -21,7 +21,7 @@ public interface XhpcChargingPileMapper {
* @param name 桩名称 * @param name 桩名称
* @return * @return
*/ */
List<Map<String,Object>> selectXhpcChargingStationList(@Param("name") String name, @Param("type")Integer type,@Param("serialNumber") String serialNumber,@Param("chargingStationId")Long chargingStationId); List<Map<String,Object>> selectXhpcChargingPileList(@Param("name") String name, @Param("type")Integer type,@Param("serialNumber") String serialNumber,@Param("chargingStationId")Long chargingStationId);
/** /**
* 终端 * 终端

View File

@ -19,7 +19,7 @@ public interface IXhpcChargingPileService {
* @param name 桩名称 * @param name 桩名称
* @return * @return
*/ */
List<Map<String,Object>> selectXhpcChargingStationList(String name, Integer type, String serialNumber,Long chargingStationId); List<Map<String,Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber,Long chargingStationId);
/** /**

View File

@ -1,5 +1,6 @@
package com.xhpc.charging.station.service; package com.xhpc.charging.station.service;
import com.xhpc.common.api.dto.ChargingPileWhitelistDto;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.domain.XhpcChargingPile; import com.xhpc.common.domain.XhpcChargingPile;
import com.xhpc.common.domain.XhpcTerminal; import com.xhpc.common.domain.XhpcTerminal;
@ -36,8 +37,8 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
* @return * @return
*/ */
@Override @Override
public List<Map<String,Object>> selectXhpcChargingStationList(String name, Integer type, String serialNumber, Long chargingStationId) { public List<Map<String,Object>> selectXhpcChargingPileList(String name, Integer type, String serialNumber, Long chargingStationId) {
return xhpcChargingPileMapper.selectXhpcChargingStationList(name,type,serialNumber,chargingStationId); return xhpcChargingPileMapper.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId);
} }
@Override @Override
@ -67,10 +68,10 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{
} }
//插入redis 桩的编号 //插入redis 桩的编号
ChargingPileWhitelistDto charging = new ChargingPileWhitelistDto();
charging.setStationId(chargingStationId);
charging.setPileNo(serialNumber);
powerPileService.addPileWhitelist(charging);
return AjaxResult.success(); return AjaxResult.success();
} }

View File

@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectXhpcChargingPileVo"> <sql id="selectXhpcChargingPileVo">
select charging_pile_id, charging_station_id, name, national_standard, power, auxiliary_power_supply, input_voltage, max_voltage, min_voltage, max_electric_current, min_electric_current, serial_number, type, program_version, network_link_type, gun_number,communication_protocol_version,communication_operator,sim_card,rate_model_id,charging_pile_number,status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id from xhpc_charging_pile select charging_pile_id, charging_station_id, name, national_standard, power, auxiliary_power_supply, input_voltage, max_voltage, min_voltage, max_electric_current, min_electric_current, serial_number, type, program_version, network_link_type, gun_number,communication_protocol_version,communication_operator,sim_card,rate_model_id,charging_pile_number,status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id from xhpc_charging_pile
</sql> </sql>
<select id="selectXhpcChargingStationList" resultType="map"> <select id="selectXhpcChargingPileList" resultType="map">
select select
cp.charging_pile_id as chargingPileId, cp.charging_pile_id as chargingPileId,
cp.charging_station_id as chargingStationId, cp.charging_station_id as chargingStationId,
@ -248,7 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where charging_pile_id = #{chargingPileId} where charging_pile_id = #{chargingPileId}
</select> </select>
<update id="updaeXhpcChargingPile" > <update id="updaeXhpcChargingPile" parameterType="Long">
update xhpc_charging_pile update xhpc_charging_pile
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="chargingStationId != null">charging_station_id = #{chargingStationId},</if> <if test="chargingStationId != null">charging_station_id = #{chargingStationId},</if>
@ -278,7 +278,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark}</if>
</trim> </trim>
where charging_pile_id = #{chargingPileId} where charging_pile_id = #{chargingPileId}
</update> </update>

View File

@ -1,15 +1,12 @@
package com.xhpc.common.api.dto; package com.xhpc.common.api.dto;
import java.math.BigDecimal;
import java.util.List;
/** /**
* 费率 * 费率
*/ */
public class ChargingPileWhitelistDto { public class ChargingPileWhitelistDto {
private Long stationId; private Long stationId;
private List<String> pileNoWhitelist; private String pileNo;
public Long getStationId() { public Long getStationId() {
@ -21,14 +18,14 @@ public class ChargingPileWhitelistDto {
this.stationId = stationId; this.stationId = stationId;
} }
public List<String> getPileNoWhitelist() { public String getPileNo() {
return pileNoWhitelist; return pileNo;
} }
public void setPileNoWhitelist(List<String> pileNoWhitelist) { public void setPileNo(String pileNo) {
this.pileNoWhitelist = pileNoWhitelist; this.pileNo = pileNo;
} }
} }

View File

@ -15,7 +15,7 @@ public class StartChargingData {
private Integer balance; //账户余额(精度:小数点后2位)=实际金额()×100 private Integer balance; //账户余额(精度:小数点后2位)=实际金额()×100
private String logicCardNo = "0000000000000000"; //逻辑卡号 private String logicCardNo = "0000000000000000"; //逻辑卡号
private String physicCardNo = "0000000000000000"; //物理卡号 private String physicCardNo = "0000000000000000"; //物理卡号
private String version; //协议版本号 private String version; //协议版本号(0A)
public String getOrderNo() { public String getOrderNo() {

View File

@ -2,103 +2,103 @@ package com.xhpc.common.data.redis;
public class CacheRateModel { public class CacheRateModel {
private String t1Price; //尖电价 所有价格精度 private Integer t1Price; //尖电价 所有价格精度
private String t1SvcPrice; //尖服务费价格 private Integer t1SvcPrice; //尖服务费价格
private String t2Price; //峰电价 private Integer t2Price; //峰电价
private String t2SvcPrice; //峰服务费价格 private Integer t2SvcPrice; //峰服务费价格
private String t3Price; //平电价 private Integer t3Price; //平电价
private String t3SvcPrice; //平服务费价格 private Integer t3SvcPrice; //平服务费价格
private String t4Price; //谷电价 private Integer t4Price; //谷电价
private String t4SvcPrice; //谷服务费价格 private Integer t4SvcPrice; //谷服务费价格
private String lossRate; //计损比例 private Integer lossRate; //计损比例
private String[] tfPricesSeq; //48个字符串48个时段,每个时段的值为4个值之一 00: 尖费率 01: 峰费率 02: 平费率 03: 谷费率 private String[] tfPricesSeq; //48个字符串48个时段,每个时段的值为4个值之一 00: 尖费率 01: 峰费率 02: 平费率 03: 谷费率
public String getT1Price() { public Integer getT1Price() {
return t1Price; return t1Price;
} }
public void setT1Price(String t1Price) { public void setT1Price(Integer t1Price) {
this.t1Price = t1Price; this.t1Price = t1Price;
} }
public String getT1SvcPrice() { public Integer getT1SvcPrice() {
return t1SvcPrice; return t1SvcPrice;
} }
public void setT1SvcPrice(String t1SvcPrice) { public void setT1SvcPrice(Integer t1SvcPrice) {
this.t1SvcPrice = t1SvcPrice; this.t1SvcPrice = t1SvcPrice;
} }
public String getT2Price() { public Integer getT2Price() {
return t2Price; return t2Price;
} }
public void setT2Price(String t2Price) { public void setT2Price(Integer t2Price) {
this.t2Price = t2Price; this.t2Price = t2Price;
} }
public String getT2SvcPrice() { public Integer getT2SvcPrice() {
return t2SvcPrice; return t2SvcPrice;
} }
public void setT2SvcPrice(String t2SvcPrice) { public void setT2SvcPrice(Integer t2SvcPrice) {
this.t2SvcPrice = t2SvcPrice; this.t2SvcPrice = t2SvcPrice;
} }
public String getT3Price() { public Integer getT3Price() {
return t3Price; return t3Price;
} }
public void setT3Price(String t3Price) { public void setT3Price(Integer t3Price) {
this.t3Price = t3Price; this.t3Price = t3Price;
} }
public String getT3SvcPrice() { public Integer getT3SvcPrice() {
return t3SvcPrice; return t3SvcPrice;
} }
public void setT3SvcPrice(String t3SvcPrice) { public void setT3SvcPrice(Integer t3SvcPrice) {
this.t3SvcPrice = t3SvcPrice; this.t3SvcPrice = t3SvcPrice;
} }
public String getT4Price() { public Integer getT4Price() {
return t4Price; return t4Price;
} }
public void setT4Price(String t4Price) { public void setT4Price(Integer t4Price) {
this.t4Price = t4Price; this.t4Price = t4Price;
} }
public String getT4SvcPrice() { public Integer getT4SvcPrice() {
return t4SvcPrice; return t4SvcPrice;
} }
public void setT4SvcPrice(String t4SvcPrice) { public void setT4SvcPrice(Integer t4SvcPrice) {
this.t4SvcPrice = t4SvcPrice; this.t4SvcPrice = t4SvcPrice;
} }
public String getLossRate() { public Integer getLossRate() {
return lossRate; return lossRate;
} }
public void setLossRate(String lossRate) { public void setLossRate(Integer lossRate) {
this.lossRate = lossRate; this.lossRate = lossRate;
} }