From fcc90c421d6d117e238bd9936f4acf7afbd18e8c Mon Sep 17 00:00:00 2001 From: yuyang <2265829957@qq.com> Date: Wed, 28 Jul 2021 20:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XhpcChargingPileController.java | 4 +- .../mapper/XhpcChargingPileMapper.java | 2 +- .../service/IXhpcChargingPileService.java | 2 +- .../service/XhpcChargingPileServiceImpl.java | 13 ++--- .../mapper/XhpcChargingPileMapper.xml | 6 +-- .../api/dto/ChargingPileWhitelistDto.java | 13 ++--- .../common/data/down/StartChargingData.java | 2 +- .../common/data/redis/CacheRateModel.java | 54 +++++++++---------- 8 files changed, 47 insertions(+), 49 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java index 09b9078c..2a766a86 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java @@ -3,8 +3,8 @@ package com.xhpc.charging.station.controller; import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; -import com.xhpc.common.domain.XhpcChargingPile; import com.xhpc.charging.station.service.IXhpcChargingPileService; +import com.xhpc.common.domain.XhpcChargingPile; import org.springframework.beans.factory.annotation.Autowired; 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) { startPage(); - List> list = xhpcChargingPileService.selectXhpcChargingStationList(name,type,serialNumber,chargingStationId); + List> list = xhpcChargingPileService.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId); return getDataTable(list); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java index 6ef86925..3433acc0 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java @@ -21,7 +21,7 @@ public interface XhpcChargingPileMapper { * @param name 桩名称 * @return */ - List> selectXhpcChargingStationList(@Param("name") String name, @Param("type")Integer type,@Param("serialNumber") String serialNumber,@Param("chargingStationId")Long chargingStationId); + List> selectXhpcChargingPileList(@Param("name") String name, @Param("type")Integer type,@Param("serialNumber") String serialNumber,@Param("chargingStationId")Long chargingStationId); /** * 终端 diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java index 4f3ff47b..424be665 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java @@ -19,7 +19,7 @@ public interface IXhpcChargingPileService { * @param name 桩名称 * @return */ - List> selectXhpcChargingStationList(String name, Integer type, String serialNumber,Long chargingStationId); + List> selectXhpcChargingPileList(String name, Integer type, String serialNumber,Long chargingStationId); /** 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 ea28157e..087e59ef 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,5 +1,6 @@ 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.domain.XhpcChargingPile; import com.xhpc.common.domain.XhpcTerminal; @@ -36,8 +37,8 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{ * @return */ @Override - public List> selectXhpcChargingStationList(String name, Integer type, String serialNumber, Long chargingStationId) { - return xhpcChargingPileMapper.selectXhpcChargingStationList(name,type,serialNumber,chargingStationId); + public List> selectXhpcChargingPileList(String name, Integer type, String serialNumber, Long chargingStationId) { + return xhpcChargingPileMapper.selectXhpcChargingPileList(name,type,serialNumber,chargingStationId); } @Override @@ -67,10 +68,10 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService{ } //插入redis 桩的编号 - - - - + ChargingPileWhitelistDto charging = new ChargingPileWhitelistDto(); + charging.setStationId(chargingStationId); + charging.setPileNo(serialNumber); + powerPileService.addPileWhitelist(charging); return AjaxResult.success(); } 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 1e48e3d0..216e74b7 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 @@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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 cp.charging_pile_id as chargingPileId, cp.charging_station_id as chargingStationId, @@ -248,7 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where charging_pile_id = #{chargingPileId} - + update xhpc_charging_pile charging_station_id = #{chargingStationId}, @@ -278,7 +278,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_by = #{createBy}, update_time = #{updateTime}, update_by = #{updateBy}, - remark = #{remark}, + remark = #{remark} where charging_pile_id = #{chargingPileId} diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/dto/ChargingPileWhitelistDto.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/dto/ChargingPileWhitelistDto.java index c3a5fa52..bd1f9a4e 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/dto/ChargingPileWhitelistDto.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/api/dto/ChargingPileWhitelistDto.java @@ -1,15 +1,12 @@ package com.xhpc.common.api.dto; -import java.math.BigDecimal; -import java.util.List; - /** * 费率 */ public class ChargingPileWhitelistDto { private Long stationId; - private List pileNoWhitelist; + private String pileNo; public Long getStationId() { @@ -21,14 +18,14 @@ public class ChargingPileWhitelistDto { this.stationId = stationId; } - public List getPileNoWhitelist() { + public String getPileNo() { - return pileNoWhitelist; + return pileNo; } - public void setPileNoWhitelist(List pileNoWhitelist) { + public void setPileNo(String pileNo) { - this.pileNoWhitelist = pileNoWhitelist; + this.pileNo = pileNo; } } diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/down/StartChargingData.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/down/StartChargingData.java index f9c30dcc..520d1fb8 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/down/StartChargingData.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/down/StartChargingData.java @@ -15,7 +15,7 @@ public class StartChargingData { private Integer balance; //账户余额(精度:小数点后2位)=实际金额(元)×100 private String logicCardNo = "0000000000000000"; //逻辑卡号 private String physicCardNo = "0000000000000000"; //物理卡号 - private String version; //协议版本号 + private String version; //协议版本号(0A) public String getOrderNo() { diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheRateModel.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheRateModel.java index f107755f..f1f015ff 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheRateModel.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheRateModel.java @@ -2,103 +2,103 @@ package com.xhpc.common.data.redis; public class CacheRateModel { - private String t1Price; //尖电价 所有价格精度 - private String t1SvcPrice; //尖服务费价格 - private String t2Price; //峰电价 - private String t2SvcPrice; //峰服务费价格 - private String t3Price; //平电价 - private String t3SvcPrice; //平服务费价格 - private String t4Price; //谷电价 - private String t4SvcPrice; //谷服务费价格 - private String lossRate; //计损比例 + private Integer t1Price; //尖电价 所有价格精度 + private Integer t1SvcPrice; //尖服务费价格 + private Integer t2Price; //峰电价 + private Integer t2SvcPrice; //峰服务费价格 + private Integer t3Price; //平电价 + private Integer t3SvcPrice; //平服务费价格 + private Integer t4Price; //谷电价 + private Integer t4SvcPrice; //谷服务费价格 + private Integer lossRate; //计损比例 private String[] tfPricesSeq; //48个字符串48个时段,每个时段的值为4个值之一 → 00: 尖费率 01: 峰费率 02: 平费率 03: 谷费率 - public String getT1Price() { + public Integer getT1Price() { return t1Price; } - public void setT1Price(String t1Price) { + public void setT1Price(Integer t1Price) { this.t1Price = t1Price; } - public String getT1SvcPrice() { + public Integer getT1SvcPrice() { return t1SvcPrice; } - public void setT1SvcPrice(String t1SvcPrice) { + public void setT1SvcPrice(Integer t1SvcPrice) { this.t1SvcPrice = t1SvcPrice; } - public String getT2Price() { + public Integer getT2Price() { return t2Price; } - public void setT2Price(String t2Price) { + public void setT2Price(Integer t2Price) { this.t2Price = t2Price; } - public String getT2SvcPrice() { + public Integer getT2SvcPrice() { return t2SvcPrice; } - public void setT2SvcPrice(String t2SvcPrice) { + public void setT2SvcPrice(Integer t2SvcPrice) { this.t2SvcPrice = t2SvcPrice; } - public String getT3Price() { + public Integer getT3Price() { return t3Price; } - public void setT3Price(String t3Price) { + public void setT3Price(Integer t3Price) { this.t3Price = t3Price; } - public String getT3SvcPrice() { + public Integer getT3SvcPrice() { return t3SvcPrice; } - public void setT3SvcPrice(String t3SvcPrice) { + public void setT3SvcPrice(Integer t3SvcPrice) { this.t3SvcPrice = t3SvcPrice; } - public String getT4Price() { + public Integer getT4Price() { return t4Price; } - public void setT4Price(String t4Price) { + public void setT4Price(Integer t4Price) { this.t4Price = t4Price; } - public String getT4SvcPrice() { + public Integer getT4SvcPrice() { return t4SvcPrice; } - public void setT4SvcPrice(String t4SvcPrice) { + public void setT4SvcPrice(Integer t4SvcPrice) { this.t4SvcPrice = t4SvcPrice; } - public String getLossRate() { + public Integer getLossRate() { return lossRate; } - public void setLossRate(String lossRate) { + public void setLossRate(Integer lossRate) { this.lossRate = lossRate; }