充电桩协议数据:0x17充电配置
This commit is contained in:
parent
6cb639f839
commit
22794224a6
@ -0,0 +1,160 @@
|
|||||||
|
package com.xhpc.common.pilemsg;
|
||||||
|
|
||||||
|
public class ChargingConfigData extends BaseData {
|
||||||
|
|
||||||
|
private String orderNo; //交易流水号
|
||||||
|
private String pileNo; //桩号
|
||||||
|
private String gunId; //枪号
|
||||||
|
private String bmsBatteryMonoMaximumVoltage; //BMS单体电池最高允许充电电压V
|
||||||
|
private String bmsBatteryMaximumCurrent; //BMS最高允许充电电流A
|
||||||
|
private String bmsBatteryNominalEnergy; //BMS动力蓄电池标称总能量kWh
|
||||||
|
private String bmsBatteryMaximumTotalVoltage; //BMS最高允许充电总电压V
|
||||||
|
private String bmsBatteryMaximumTemperature; //BMS最高允许温度°
|
||||||
|
private String soc; //SOC
|
||||||
|
private String bmsBatteryViechleVoltage; //BMS整车动力蓄电池当前电池电压V
|
||||||
|
private String pileMaximumVoltage; //电桩最高输出电压
|
||||||
|
private String pileMinimumVoltage; //电桩最低输出电压
|
||||||
|
private String pileMaximumCurrent; //电桩最大输出电流
|
||||||
|
private String pileMinimumCurrent; //电桩最小输出电流
|
||||||
|
|
||||||
|
public String getOrderNo() {
|
||||||
|
|
||||||
|
return orderNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderNo(String orderNo) {
|
||||||
|
|
||||||
|
this.orderNo = orderNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPileNo() {
|
||||||
|
|
||||||
|
return pileNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPileNo(String pileNo) {
|
||||||
|
|
||||||
|
this.pileNo = pileNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGunId() {
|
||||||
|
|
||||||
|
return gunId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGunId(String gunId) {
|
||||||
|
|
||||||
|
this.gunId = gunId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryMonoMaximumVoltage() {
|
||||||
|
|
||||||
|
return bmsBatteryMonoMaximumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryMonoMaximumVoltage(String bmsBatteryMonoMaximumVoltage) {
|
||||||
|
|
||||||
|
this.bmsBatteryMonoMaximumVoltage = bmsBatteryMonoMaximumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryMaximumCurrent() {
|
||||||
|
|
||||||
|
return bmsBatteryMaximumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryMaximumCurrent(String bmsBatteryMaximumCurrent) {
|
||||||
|
|
||||||
|
this.bmsBatteryMaximumCurrent = bmsBatteryMaximumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryNominalEnergy() {
|
||||||
|
|
||||||
|
return bmsBatteryNominalEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryNominalEnergy(String bmsBatteryNominalEnergy) {
|
||||||
|
|
||||||
|
this.bmsBatteryNominalEnergy = bmsBatteryNominalEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryMaximumTotalVoltage() {
|
||||||
|
|
||||||
|
return bmsBatteryMaximumTotalVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryMaximumTotalVoltage(String bmsBatteryMaximumTotalVoltage) {
|
||||||
|
|
||||||
|
this.bmsBatteryMaximumTotalVoltage = bmsBatteryMaximumTotalVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryMaximumTemperature() {
|
||||||
|
|
||||||
|
return bmsBatteryMaximumTemperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryMaximumTemperature(String bmsBatteryMaximumTemperature) {
|
||||||
|
|
||||||
|
this.bmsBatteryMaximumTemperature = bmsBatteryMaximumTemperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSoc() {
|
||||||
|
|
||||||
|
return soc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSoc(String soc) {
|
||||||
|
|
||||||
|
this.soc = soc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBmsBatteryViechleVoltage() {
|
||||||
|
|
||||||
|
return bmsBatteryViechleVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBmsBatteryViechleVoltage(String bmsBatteryViechleVoltage) {
|
||||||
|
|
||||||
|
this.bmsBatteryViechleVoltage = bmsBatteryViechleVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPileMaximumVoltage() {
|
||||||
|
|
||||||
|
return pileMaximumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPileMaximumVoltage(String pileMaximumVoltage) {
|
||||||
|
|
||||||
|
this.pileMaximumVoltage = pileMaximumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPileMinimumVoltage() {
|
||||||
|
|
||||||
|
return pileMinimumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPileMinimumVoltage(String pileMinimumVoltage) {
|
||||||
|
|
||||||
|
this.pileMinimumVoltage = pileMinimumVoltage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPileMaximumCurrent() {
|
||||||
|
|
||||||
|
return pileMaximumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPileMaximumCurrent(String pileMaximumCurrent) {
|
||||||
|
|
||||||
|
this.pileMaximumCurrent = pileMaximumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPileMinimumCurrent() {
|
||||||
|
|
||||||
|
return pileMinimumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPileMinimumCurrent(String pileMinimumCurrent) {
|
||||||
|
|
||||||
|
this.pileMinimumCurrent = pileMinimumCurrent;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package com.xhpc.pp.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.xhpc.common.pilemsg.ChargingConfigData;
|
||||||
|
import com.xhpc.pp.tx.ServiceParameter;
|
||||||
|
import com.xhpc.pp.tx.ServiceResult;
|
||||||
|
import com.xhpc.pp.tx.logic.ServiceLogic;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Component("ChargingConfigDataLogic")
|
||||||
|
public class ChargingConfigDataLogic implements ServiceLogic {
|
||||||
|
|
||||||
|
private static Logger log = LoggerFactory.getLogger(ChargingConfigDataLogic.class);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||||
|
|
||||||
|
Map<String, Object> req = sp.getParameters();
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
ChargingConfigData chargingConfigData = objectMapper.convertValue(req, ChargingConfigData.class);
|
||||||
|
String orderNo = chargingConfigData.getOrderNo();
|
||||||
|
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||||
|
cacheOrder.put("config", chargingConfigData);
|
||||||
|
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||||
|
return new ServiceResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -37,6 +37,7 @@ public class RealtimeDataLogic implements ServiceLogic {
|
|||||||
String pileGun = pileNo.concat(gunId);
|
String pileGun = pileNo.concat(gunId);
|
||||||
Map<String, Object> cacheGun = REDIS.getCacheMap(pileGun);
|
Map<String, Object> cacheGun = REDIS.getCacheMap(pileGun);
|
||||||
cacheGun.put("status", status);
|
cacheGun.put("status", status);
|
||||||
|
cacheGun.put("soc", realtimeData.getSoc());
|
||||||
REDIS.setCacheMap(pileGun, cacheGun);
|
REDIS.setCacheMap(pileGun, cacheGun);
|
||||||
String orderNo = realtimeData.getOrderNo();
|
String orderNo = realtimeData.getOrderNo();
|
||||||
Map<String, Object> order = REDIS.getCacheMap(orderNo);
|
Map<String, Object> order = REDIS.getCacheMap(orderNo);
|
||||||
|
|||||||
@ -14,5 +14,6 @@
|
|||||||
<entry key="09" value-ref="RateModelRequestLogic"/>
|
<entry key="09" value-ref="RateModelRequestLogic"/>
|
||||||
<entry key="13" value-ref="RealtimeDataLogic"/>
|
<entry key="13" value-ref="RealtimeDataLogic"/>
|
||||||
<entry key="15" value-ref="ChargingHandshakeDataLogic"/>
|
<entry key="15" value-ref="ChargingHandshakeDataLogic"/>
|
||||||
|
<entry key="17" value-ref="ChargingConfigDataLogic"/>
|
||||||
</util:map>
|
</util:map>
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user