Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ab63a30276
@ -2,23 +2,30 @@ package com.ruoyi.common.core.constant;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class ServiceNameConstants
|
||||
{
|
||||
|
||||
/**
|
||||
* 认证服务的serviceid
|
||||
* 认证服务service id
|
||||
*/
|
||||
public static final String AUTH_SERVICE = "ruoyi-auth";
|
||||
|
||||
/**
|
||||
* 系统模块的serviceid
|
||||
* 系统模块service id
|
||||
*/
|
||||
public static final String SYSTEM_SERVICE = "ruoyi-system";
|
||||
|
||||
/**
|
||||
* 文件服务的serviceid
|
||||
* 文件服务service id
|
||||
*/
|
||||
public static final String FILE_SERVICE = "ruoyi-file";
|
||||
|
||||
/**
|
||||
* 充电桩服务service id
|
||||
*/
|
||||
public static final String PILE_SERVICE = "xhpc-power-pile";
|
||||
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ public class XhpcChargingStationController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情(站点详情)
|
||||
* 电站详情+站点详情
|
||||
* @param chargingStationId 站点id
|
||||
* @param longitude 经度
|
||||
* @param latitude 维度
|
||||
@ -182,9 +182,26 @@ public class XhpcChargingStationController extends BaseController {
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcChargingStationMassage(chargingStationId,longitude,latitude));
|
||||
}
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
* @param chargingStationId 站点id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getXhpcRateTimeMassage")
|
||||
public AjaxResult getXhpcRateTimeMassage(@Param("chargingStationId") Long chargingStationId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcRateTimeMassage(chargingStationId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
* @param chargingStationId 站点id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getXhpcTerminalMassage")
|
||||
public AjaxResult getXhpcTerminalMassage(@Param("chargingStationId") Long chargingStationId)
|
||||
{
|
||||
return AjaxResult.success(xhpcChargingStationService.getXhpcTerminalMassage(chargingStationId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -38,8 +38,8 @@ public class XhpcRateTime extends BaseEntity {
|
||||
/** 计费模型id */
|
||||
private Long rateModelId;
|
||||
|
||||
/** 0 全部时间排列完 1 有剩余时间 */
|
||||
private Integer type;
|
||||
/** 时间排序有小到大 */
|
||||
private Integer sort;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
|
||||
@ -126,14 +126,14 @@ public class XhpcRateTime extends BaseEntity {
|
||||
this.rateModelId = rateModelId;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
public Integer getSort() {
|
||||
|
||||
return type;
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
public void setSort(Integer sort) {
|
||||
|
||||
this.type = type;
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -119,6 +119,26 @@ public interface XhpcChargingStationMapper {
|
||||
Map<String,Object> getXhpcChargingStationMassage(@Param("chargingStationId")Long chargingStationId,@Param("longitude")String longitude,@Param("latitude")String latitude);
|
||||
|
||||
|
||||
/**
|
||||
* 获取图片信息
|
||||
* @param imgIds
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getImageList(@Param("imgIds")List<String> imgIds);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeMassage(@Param("chargingStationId")Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcTerminalMassage(@Param("chargingStationId")Long chargingStationId);
|
||||
}
|
||||
|
||||
@ -121,6 +121,19 @@ public interface IXhpcChargingStationService {
|
||||
Map<String,Object> getXhpcChargingStationMassage(Long chargingStationId,String longitude,String latitude);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---价格详情
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeMassage(Long chargingStationId);
|
||||
|
||||
|
||||
/**
|
||||
* 电站详情---终端列表
|
||||
* @param chargingStationId 电站ID
|
||||
* @return 电站
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcTerminalMassage(Long chargingStationId);
|
||||
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
//检查格式是否正确
|
||||
//冒泡排序(结束时间小于开始时间)
|
||||
//每个时间段都要存
|
||||
|
||||
//返回计费模型 24:00 转成 00:00
|
||||
|
||||
|
||||
|
||||
@ -287,4 +287,29 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> getXhpcRateTimeMassage(Long chargingStationId) {
|
||||
return xhpcChargingStationMapper.getXhpcRateTimeMassage(chargingStationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getXhpcTerminalMassage(Long chargingStationId) {
|
||||
|
||||
List<Map<String, Object>> list = xhpcChargingStationMapper.getXhpcTerminalMassage(chargingStationId);
|
||||
|
||||
if(list !=null && list.size()>0){
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Map<String, Object> map = list.get(i);
|
||||
//终端状态用 redis数据
|
||||
//终端状态
|
||||
map.put("status","1");
|
||||
//soc
|
||||
map.put("soc","18%");
|
||||
//剩余时间
|
||||
map.put("remainingTime","16分钟");
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ public class XhpcRateTimeServiceImpl implements IXhpcRateTimeService{
|
||||
//该判断防止某个时间段费率没有录入
|
||||
if(hpcRateTimeMap ==null){
|
||||
//获取剩余时间费率
|
||||
return xhpcRateTimeMapper.getXhpcRateTimeType(datchargingStationIde);
|
||||
return new HashMap<>();
|
||||
}
|
||||
Map<String,Object> map =new HashMap<>();
|
||||
Long rateId = Long.valueOf(hpcRateTimeMap.get("rateId").toString());
|
||||
|
||||
@ -241,4 +241,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeMassage" resultType="map">
|
||||
select
|
||||
xrt.start_time as startTime,
|
||||
xrt.end_time as endTime,
|
||||
xr.power_fee as powerFee,
|
||||
xr.service_fee as serviceFee
|
||||
from xhpc_rate_time as xrt
|
||||
left join xhpc_rate as xr on xr.rate_id = xrt.rate_id
|
||||
where xrt.charging_station_id =#{chargingStationId} and xrt.status=0 and xrt.del_flag=0
|
||||
order by xrt.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getXhpcTerminalMassage" resultType="map">
|
||||
select
|
||||
te.name as name,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.input_voltage as inputVoltage
|
||||
from xhpc_terminal as te
|
||||
left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id
|
||||
where te.charging_station_id =#{chargingStationId} and te.status=0 and te.del_flag=0
|
||||
</select>
|
||||
</mapper>
|
||||
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sort" column="sort" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getXhpcRateTime" resultType="map">
|
||||
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
rate_id as rateId,
|
||||
start_time as startTime,
|
||||
end_time as endTime
|
||||
from xhpc_rate_time where charging_station_id =#{datchargingStationId} and start_time <=#{date} and end_time >=#{date} and status=0 and del_flag=0 and type=0
|
||||
from xhpc_rate_time where charging_station_id =#{datchargingStationId} and start_time <=#{date} and end_time >=#{date} and status=0 and del_flag=0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcTimeType" resultType="map">
|
||||
@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ra.power_fee as powerFee,
|
||||
ra.service_fee as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=(select rate_id from xhpc_rate_time where status=0 and del_flag=0 and type=1 and charging_station_id =#{datchargingStationId} LIMIT 1)
|
||||
where ra.charging_station_id =#{datchargingStationId} and ra.status=0 and ra.del_flag=0 and ra.rate_id=(select rate_id from xhpc_rate_time where status=0 and del_flag=0 and charging_station_id =#{datchargingStationId} LIMIT 1)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.xhpc.common.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xhpc.common.api.factory.PowerPileFallbackFactory;
|
||||
import com.xhpc.common.data.down.StartChargingData;
|
||||
import com.xhpc.common.data.up.OrderData;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@FeignClient(contextId = "powerPileService", value = ServiceNameConstants.PILE_SERVICE, fallbackFactory = PowerPileFallbackFactory.class)
|
||||
public interface PowerPileService {
|
||||
|
||||
@PostMapping(value = "/pile/charging/order")
|
||||
R<OrderData> startCharging(@Validated @RequestBody StartChargingData startChargingData);
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.xhpc.common.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xhpc.common.api.PowerPileService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class PowerPileFallbackFactory implements FallbackFactory<PowerPileService> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(PowerPileFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public PowerPileService create(Throwable cause) {
|
||||
|
||||
logger.error("充电订单服务调用失败:{} //fallback", cause.getMessage());
|
||||
return startChargingData -> R.fail("启动充电失败:" + cause.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.xhpc.common.data.down;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
public class StartChargingData {
|
||||
|
||||
@NotBlank(message = "订单流水号不能为空")
|
||||
private String orderNo; //交易流水号
|
||||
@NotBlank(message = "桩号不能为空")
|
||||
private String pileNo; //桩号
|
||||
@NotBlank(message = "枪号不能为空")
|
||||
private String gunId; //枪号
|
||||
@Min(value = 5, message = "账户余额不能小于5")
|
||||
private Double balance; //账户余额
|
||||
private String logicCardNo; //逻辑卡号
|
||||
private String physicCardNo; //物理卡号
|
||||
|
||||
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 Double getBalance() {
|
||||
|
||||
return balance;
|
||||
}
|
||||
|
||||
public void setBalance(Double balance) {
|
||||
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
public String getLogicCardNo() {
|
||||
|
||||
return logicCardNo;
|
||||
}
|
||||
|
||||
public void setLogicCardNo(String logicCardNo) {
|
||||
|
||||
this.logicCardNo = logicCardNo;
|
||||
}
|
||||
|
||||
public String getPhysicCardNo() {
|
||||
|
||||
return physicCardNo;
|
||||
}
|
||||
|
||||
public void setPhysicCardNo(String physicCardNo) {
|
||||
|
||||
this.physicCardNo = physicCardNo;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class BalanceUpdateReplyData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String cardNo; //物理卡号
|
||||
private String modifyResult; //修改结果
|
||||
|
||||
public String getPileNo() {
|
||||
|
||||
return pileNo;
|
||||
}
|
||||
|
||||
public void setPileNo(String pileNo) {
|
||||
|
||||
this.pileNo = pileNo;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
|
||||
return cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getModifyResult() {
|
||||
|
||||
return modifyResult;
|
||||
}
|
||||
|
||||
public void setModifyResult(String modifyResult) {
|
||||
|
||||
this.modifyResult = modifyResult;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.common.pilemsg;
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
@ -0,0 +1,171 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class BmsChargingData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String maxMonoBatVoltId; //BMS 最高单体动力蓄电池电压所在编号
|
||||
private String maxBatTemperature; //BMS 最高动力蓄电池温度
|
||||
private String maxTempCheckPntId; //BMS 最高温度检测点编号
|
||||
private String miniBatTemperature; //最低动力蓄电池温度
|
||||
private String miniBatTempCheckPntId; //最低动力蓄电池温度检测点编号
|
||||
private String monoBatVoltExtreme; //BMS 单体动力蓄电池电压过高/过低
|
||||
private String vehicleBatSocExtreme; //BMS 整车动力蓄电池荷电状态SOC 过高/过低
|
||||
private String batChargeCurrentExtreme; //BMS 动力蓄电池充电过电流
|
||||
private String batTemperatureExtreme; //BMS 动力蓄电池温度过高
|
||||
private String batInsulation; //BMS 动力蓄电池绝缘状态
|
||||
private String batPackOutConnStatus; //BMS 动力蓄电池组输出连接器连接状态
|
||||
private String chargingForbidden; //充电禁止
|
||||
|
||||
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 getMaxMonoBatVoltId() {
|
||||
|
||||
return maxMonoBatVoltId;
|
||||
}
|
||||
|
||||
public void setMaxMonoBatVoltId(String maxMonoBatVoltId) {
|
||||
|
||||
this.maxMonoBatVoltId = maxMonoBatVoltId;
|
||||
}
|
||||
|
||||
public String getMaxBatTemperature() {
|
||||
|
||||
return maxBatTemperature;
|
||||
}
|
||||
|
||||
public void setMaxBatTemperature(String maxBatTemperature) {
|
||||
|
||||
this.maxBatTemperature = maxBatTemperature;
|
||||
}
|
||||
|
||||
public String getMaxTempCheckPntId() {
|
||||
|
||||
return maxTempCheckPntId;
|
||||
}
|
||||
|
||||
public void setMaxTempCheckPntId(String maxTempCheckPntId) {
|
||||
|
||||
this.maxTempCheckPntId = maxTempCheckPntId;
|
||||
}
|
||||
|
||||
public String getMiniBatTemperature() {
|
||||
|
||||
return miniBatTemperature;
|
||||
}
|
||||
|
||||
public void setMiniBatTemperature(String miniBatTemperature) {
|
||||
|
||||
this.miniBatTemperature = miniBatTemperature;
|
||||
}
|
||||
|
||||
public String getMiniBatTempCheckPntId() {
|
||||
|
||||
return miniBatTempCheckPntId;
|
||||
}
|
||||
|
||||
public void setMiniBatTempCheckPntId(String miniBatTempCheckPntId) {
|
||||
|
||||
this.miniBatTempCheckPntId = miniBatTempCheckPntId;
|
||||
}
|
||||
|
||||
public String getMonoBatVoltExtreme() {
|
||||
|
||||
return monoBatVoltExtreme;
|
||||
}
|
||||
|
||||
public void setMonoBatVoltExtreme(String monoBatVoltExtreme) {
|
||||
|
||||
this.monoBatVoltExtreme = monoBatVoltExtreme;
|
||||
}
|
||||
|
||||
public String getVehicleBatSocExtreme() {
|
||||
|
||||
return vehicleBatSocExtreme;
|
||||
}
|
||||
|
||||
public void setVehicleBatSocExtreme(String vehicleBatSocExtreme) {
|
||||
|
||||
this.vehicleBatSocExtreme = vehicleBatSocExtreme;
|
||||
}
|
||||
|
||||
public String getBatChargeCurrentExtreme() {
|
||||
|
||||
return batChargeCurrentExtreme;
|
||||
}
|
||||
|
||||
public void setBatChargeCurrentExtreme(String batChargeCurrentExtreme) {
|
||||
|
||||
this.batChargeCurrentExtreme = batChargeCurrentExtreme;
|
||||
}
|
||||
|
||||
public String getBatTemperatureExtreme() {
|
||||
|
||||
return batTemperatureExtreme;
|
||||
}
|
||||
|
||||
public void setBatTemperatureExtreme(String batTemperatureExtreme) {
|
||||
|
||||
this.batTemperatureExtreme = batTemperatureExtreme;
|
||||
}
|
||||
|
||||
public String getBatInsulation() {
|
||||
|
||||
return batInsulation;
|
||||
}
|
||||
|
||||
public void setBatInsulation(String batInsulation) {
|
||||
|
||||
this.batInsulation = batInsulation;
|
||||
}
|
||||
|
||||
public String getBatPackOutConnStatus() {
|
||||
|
||||
return batPackOutConnStatus;
|
||||
}
|
||||
|
||||
public void setBatPackOutConnStatus(String batPackOutConnStatus) {
|
||||
|
||||
this.batPackOutConnStatus = batPackOutConnStatus;
|
||||
}
|
||||
|
||||
public String getChargingForbidden() {
|
||||
|
||||
return chargingForbidden;
|
||||
}
|
||||
|
||||
public void setChargingForbidden(String chargingForbidden) {
|
||||
|
||||
this.chargingForbidden = chargingForbidden;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,281 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class BmsErrorData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String SPN25600x00; //接收 SPN2560=0x00 的充电机辨识报文超时 <00>:=正常;<01>:=超时;<10>:=不可信状态
|
||||
private String SPN25600xAA; //接收 SPN2560=0xAA 的充电机辨识报文超时
|
||||
private String reserved; //预留位
|
||||
private String timeSyncAndMaxOutputMsgOt; //接收充电机的时间同步和充电机最大输出能力报文超时
|
||||
private String chargeCompleteMsgOt; //接收充电机完成充电准备报文超时
|
||||
private String reserved1; //预留位
|
||||
private String chargeStatusMsgOt; //接收充电机充电状态报文超时
|
||||
private String chargeStopMsgOt; //接收充电机中止充电报文超时
|
||||
private String reserved2; //预留位
|
||||
private String chargerSummaryMsgOt; //接收充电机充电统计报文超时
|
||||
private String bmsOther; //其他
|
||||
private String bmsAndVehicleIdentMsgOt; //接收 BMS 和车辆的辨识报文超时
|
||||
private String reserved3; //预留位
|
||||
private String batteryChargeParamMsgOt; //接收电池充电参数报文超时
|
||||
private String bmsChargingPreparedMsgOt; //接收 BMS 完成充电准备报文超时
|
||||
private String reserved4; //预留位
|
||||
private String batteryChargeStatusSummaryMsgOt; //接收电池充电总状态报文超时
|
||||
private String batteryChargingRequestMsgOt; //接收电池充电要求报文超时
|
||||
private String bmsStopMsgOt; //接收 BMS 中止充电报文超时
|
||||
private String reserved5; //预留位
|
||||
private String bmsChargingSummaryMsgOt; //接收 BMS 充电统计报文超时
|
||||
private String chargerOther; //充电机其他
|
||||
|
||||
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 getSPN25600x00() {
|
||||
|
||||
return SPN25600x00;
|
||||
}
|
||||
|
||||
public void setSPN25600x00(String SPN25600x00) {
|
||||
|
||||
this.SPN25600x00 = SPN25600x00;
|
||||
}
|
||||
|
||||
public String getSPN25600xAA() {
|
||||
|
||||
return SPN25600xAA;
|
||||
}
|
||||
|
||||
public void setSPN25600xAA(String SPN25600xAA) {
|
||||
|
||||
this.SPN25600xAA = SPN25600xAA;
|
||||
}
|
||||
|
||||
public String getReserved() {
|
||||
|
||||
return reserved;
|
||||
}
|
||||
|
||||
public void setReserved(String reserved) {
|
||||
|
||||
this.reserved = reserved;
|
||||
}
|
||||
|
||||
public String getTimeSyncAndMaxOutputMsgOt() {
|
||||
|
||||
return timeSyncAndMaxOutputMsgOt;
|
||||
}
|
||||
|
||||
public void setTimeSyncAndMaxOutputMsgOt(String timeSyncAndMaxOutputMsgOt) {
|
||||
|
||||
this.timeSyncAndMaxOutputMsgOt = timeSyncAndMaxOutputMsgOt;
|
||||
}
|
||||
|
||||
public String getChargeCompleteMsgOt() {
|
||||
|
||||
return chargeCompleteMsgOt;
|
||||
}
|
||||
|
||||
public void setChargeCompleteMsgOt(String chargeCompleteMsgOt) {
|
||||
|
||||
this.chargeCompleteMsgOt = chargeCompleteMsgOt;
|
||||
}
|
||||
|
||||
public String getReserved1() {
|
||||
|
||||
return reserved1;
|
||||
}
|
||||
|
||||
public void setReserved1(String reserved1) {
|
||||
|
||||
this.reserved1 = reserved1;
|
||||
}
|
||||
|
||||
public String getChargeStatusMsgOt() {
|
||||
|
||||
return chargeStatusMsgOt;
|
||||
}
|
||||
|
||||
public void setChargeStatusMsgOt(String chargeStatusMsgOt) {
|
||||
|
||||
this.chargeStatusMsgOt = chargeStatusMsgOt;
|
||||
}
|
||||
|
||||
public String getChargeStopMsgOt() {
|
||||
|
||||
return chargeStopMsgOt;
|
||||
}
|
||||
|
||||
public void setChargeStopMsgOt(String chargeStopMsgOt) {
|
||||
|
||||
this.chargeStopMsgOt = chargeStopMsgOt;
|
||||
}
|
||||
|
||||
public String getReserved2() {
|
||||
|
||||
return reserved2;
|
||||
}
|
||||
|
||||
public void setReserved2(String reserved2) {
|
||||
|
||||
this.reserved2 = reserved2;
|
||||
}
|
||||
|
||||
public String getChargerSummaryMsgOt() {
|
||||
|
||||
return chargerSummaryMsgOt;
|
||||
}
|
||||
|
||||
public void setChargerSummaryMsgOt(String chargerSummaryMsgOt) {
|
||||
|
||||
this.chargerSummaryMsgOt = chargerSummaryMsgOt;
|
||||
}
|
||||
|
||||
public String getBmsOther() {
|
||||
|
||||
return bmsOther;
|
||||
}
|
||||
|
||||
public void setBmsOther(String bmsOther) {
|
||||
|
||||
this.bmsOther = bmsOther;
|
||||
}
|
||||
|
||||
public String getBmsAndVehicleIdentMsgOt() {
|
||||
|
||||
return bmsAndVehicleIdentMsgOt;
|
||||
}
|
||||
|
||||
public void setBmsAndVehicleIdentMsgOt(String bmsAndVehicleIdentMsgOt) {
|
||||
|
||||
this.bmsAndVehicleIdentMsgOt = bmsAndVehicleIdentMsgOt;
|
||||
}
|
||||
|
||||
public String getReserved3() {
|
||||
|
||||
return reserved3;
|
||||
}
|
||||
|
||||
public void setReserved3(String reserved3) {
|
||||
|
||||
this.reserved3 = reserved3;
|
||||
}
|
||||
|
||||
public String getBatteryChargeParamMsgOt() {
|
||||
|
||||
return batteryChargeParamMsgOt;
|
||||
}
|
||||
|
||||
public void setBatteryChargeParamMsgOt(String batteryChargeParamMsgOt) {
|
||||
|
||||
this.batteryChargeParamMsgOt = batteryChargeParamMsgOt;
|
||||
}
|
||||
|
||||
public String getBmsChargingPreparedMsgOt() {
|
||||
|
||||
return bmsChargingPreparedMsgOt;
|
||||
}
|
||||
|
||||
public void setBmsChargingPreparedMsgOt(String bmsChargingPreparedMsgOt) {
|
||||
|
||||
this.bmsChargingPreparedMsgOt = bmsChargingPreparedMsgOt;
|
||||
}
|
||||
|
||||
public String getReserved4() {
|
||||
|
||||
return reserved4;
|
||||
}
|
||||
|
||||
public void setReserved4(String reserved4) {
|
||||
|
||||
this.reserved4 = reserved4;
|
||||
}
|
||||
|
||||
public String getBatteryChargeStatusSummaryMsgOt() {
|
||||
|
||||
return batteryChargeStatusSummaryMsgOt;
|
||||
}
|
||||
|
||||
public void setBatteryChargeStatusSummaryMsgOt(String batteryChargeStatusSummaryMsgOt) {
|
||||
|
||||
this.batteryChargeStatusSummaryMsgOt = batteryChargeStatusSummaryMsgOt;
|
||||
}
|
||||
|
||||
public String getBatteryChargingRequestMsgOt() {
|
||||
|
||||
return batteryChargingRequestMsgOt;
|
||||
}
|
||||
|
||||
public void setBatteryChargingRequestMsgOt(String batteryChargingRequestMsgOt) {
|
||||
|
||||
this.batteryChargingRequestMsgOt = batteryChargingRequestMsgOt;
|
||||
}
|
||||
|
||||
public String getBmsStopMsgOt() {
|
||||
|
||||
return bmsStopMsgOt;
|
||||
}
|
||||
|
||||
public void setBmsStopMsgOt(String bmsStopMsgOt) {
|
||||
|
||||
this.bmsStopMsgOt = bmsStopMsgOt;
|
||||
}
|
||||
|
||||
public String getReserved5() {
|
||||
|
||||
return reserved5;
|
||||
}
|
||||
|
||||
public void setReserved5(String reserved5) {
|
||||
|
||||
this.reserved5 = reserved5;
|
||||
}
|
||||
|
||||
public String getBmsChargingSummaryMsgOt() {
|
||||
|
||||
return bmsChargingSummaryMsgOt;
|
||||
}
|
||||
|
||||
public void setBmsChargingSummaryMsgOt(String bmsChargingSummaryMsgOt) {
|
||||
|
||||
this.bmsChargingSummaryMsgOt = bmsChargingSummaryMsgOt;
|
||||
}
|
||||
|
||||
public String getChargerOther() {
|
||||
|
||||
return chargerOther;
|
||||
}
|
||||
|
||||
public void setChargerOther(String chargerOther) {
|
||||
|
||||
this.chargerOther = chargerOther;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class BmsInterruptData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String bmsStopReason; //BMS 中止充电原因
|
||||
private String bmsStopFaultReason; //BMS 中止充电故障原因
|
||||
private String bmsStopErrorReason; //BMS 中止充电错误原因
|
||||
|
||||
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 getBmsStopReason() {
|
||||
|
||||
return bmsStopReason;
|
||||
}
|
||||
|
||||
public void setBmsStopReason(String bmsStopReason) {
|
||||
|
||||
this.bmsStopReason = bmsStopReason;
|
||||
}
|
||||
|
||||
public String getBmsStopFaultReason() {
|
||||
|
||||
return bmsStopFaultReason;
|
||||
}
|
||||
|
||||
public void setBmsStopFaultReason(String bmsStopFaultReason) {
|
||||
|
||||
this.bmsStopFaultReason = bmsStopFaultReason;
|
||||
}
|
||||
|
||||
public String getBmsStopErrorReason() {
|
||||
|
||||
return bmsStopErrorReason;
|
||||
}
|
||||
|
||||
public void setBmsStopErrorReason(String bmsStopErrorReason) {
|
||||
|
||||
this.bmsStopErrorReason = bmsStopErrorReason;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,160 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class BmsReqChargerOutputData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String bmsVoltageRequest; //BMS 电压需求
|
||||
private String bmsCurrentRequest; //BMS 电流需求
|
||||
private String bmsChargingMod; //BMS 充电模式
|
||||
private String bmsChargingVolt; //BMS 充电电压测量值
|
||||
private String bmsChargingCurrent; //BMS 充电电流测量值
|
||||
private String monoBatteryVoltGroupId; //BMS 最高单体动力蓄电池电压及组号
|
||||
private String soc; //BMS 当前荷电状态 SOC( %)
|
||||
private String bmsEstRemainingTime; //BMS 估算剩余充电时间
|
||||
private String pileVoltageOutput; //电桩电压输出值
|
||||
private String pileCurrentOutput; //电桩电流输出值
|
||||
private String chargingTimeSummary; //累计充电时间
|
||||
|
||||
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 getBmsVoltageRequest() {
|
||||
|
||||
return bmsVoltageRequest;
|
||||
}
|
||||
|
||||
public void setBmsVoltageRequest(String bmsVoltageRequest) {
|
||||
|
||||
this.bmsVoltageRequest = bmsVoltageRequest;
|
||||
}
|
||||
|
||||
public String getBmsCurrentRequest() {
|
||||
|
||||
return bmsCurrentRequest;
|
||||
}
|
||||
|
||||
public void setBmsCurrentRequest(String bmsCurrentRequest) {
|
||||
|
||||
this.bmsCurrentRequest = bmsCurrentRequest;
|
||||
}
|
||||
|
||||
public String getBmsChargingMod() {
|
||||
|
||||
return bmsChargingMod;
|
||||
}
|
||||
|
||||
public void setBmsChargingMod(String bmsChargingMod) {
|
||||
|
||||
this.bmsChargingMod = bmsChargingMod;
|
||||
}
|
||||
|
||||
public String getBmsChargingVolt() {
|
||||
|
||||
return bmsChargingVolt;
|
||||
}
|
||||
|
||||
public void setBmsChargingVolt(String bmsChargingVolt) {
|
||||
|
||||
this.bmsChargingVolt = bmsChargingVolt;
|
||||
}
|
||||
|
||||
public String getBmsChargingCurrent() {
|
||||
|
||||
return bmsChargingCurrent;
|
||||
}
|
||||
|
||||
public void setBmsChargingCurrent(String bmsChargingCurrent) {
|
||||
|
||||
this.bmsChargingCurrent = bmsChargingCurrent;
|
||||
}
|
||||
|
||||
public String getMonoBatteryVoltGroupId() {
|
||||
|
||||
return monoBatteryVoltGroupId;
|
||||
}
|
||||
|
||||
public void setMonoBatteryVoltGroupId(String monoBatteryVoltGroupId) {
|
||||
|
||||
this.monoBatteryVoltGroupId = monoBatteryVoltGroupId;
|
||||
}
|
||||
|
||||
public String getSoc() {
|
||||
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoc(String soc) {
|
||||
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public String getBmsEstRemainingTime() {
|
||||
|
||||
return bmsEstRemainingTime;
|
||||
}
|
||||
|
||||
public void setBmsEstRemainingTime(String bmsEstRemainingTime) {
|
||||
|
||||
this.bmsEstRemainingTime = bmsEstRemainingTime;
|
||||
}
|
||||
|
||||
public String getPileVoltageOutput() {
|
||||
|
||||
return pileVoltageOutput;
|
||||
}
|
||||
|
||||
public void setPileVoltageOutput(String pileVoltageOutput) {
|
||||
|
||||
this.pileVoltageOutput = pileVoltageOutput;
|
||||
}
|
||||
|
||||
public String getPileCurrentOutput() {
|
||||
|
||||
return pileCurrentOutput;
|
||||
}
|
||||
|
||||
public void setPileCurrentOutput(String pileCurrentOutput) {
|
||||
|
||||
this.pileCurrentOutput = pileCurrentOutput;
|
||||
}
|
||||
|
||||
public String getChargingTimeSummary() {
|
||||
|
||||
return chargingTimeSummary;
|
||||
}
|
||||
|
||||
public void setChargingTimeSummary(String chargingTimeSummary) {
|
||||
|
||||
this.chargingTimeSummary = chargingTimeSummary;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class ChargerInterruptData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String chargerStopReason; //充电机 中止充电原因
|
||||
private String chargerStopFaultReason; //充电机 中止充电故障原因
|
||||
private String chargerStopErrorReason; //充电机 中止充电错误原因
|
||||
|
||||
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 getChargerStopReason() {
|
||||
|
||||
return chargerStopReason;
|
||||
}
|
||||
|
||||
public void setChargerStopReason(String chargerStopReason) {
|
||||
|
||||
this.chargerStopReason = chargerStopReason;
|
||||
}
|
||||
|
||||
public String getChargerStopFaultReason() {
|
||||
|
||||
return chargerStopFaultReason;
|
||||
}
|
||||
|
||||
public void setChargerStopFaultReason(String chargerStopFaultReason) {
|
||||
|
||||
this.chargerStopFaultReason = chargerStopFaultReason;
|
||||
}
|
||||
|
||||
public String getChargerStopErrorReason() {
|
||||
|
||||
return chargerStopErrorReason;
|
||||
}
|
||||
|
||||
public void setChargerStopErrorReason(String chargerStopErrorReason) {
|
||||
|
||||
this.chargerStopErrorReason = chargerStopErrorReason;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class ChargingCompletedData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String soc; //结束SOC
|
||||
private String bmsBatteryMonoMinimumVoltage; //BMS单体电池最低电压V
|
||||
private String bmsBatteryMonoMaximumVoltage; //BMS单体电池最高电压V
|
||||
private String bmsBatteryMinimumTemperature; //BMS电池最低温度°
|
||||
private String bmsBatteryMaximumTemperature; //BMS电池最高温度°
|
||||
private String totalChargingTime; //累计充电时间min
|
||||
private String outputEnergy; //电桩输出能量kWh
|
||||
private String chargerSn; //电桩充电机编号
|
||||
|
||||
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 getSoc() {
|
||||
|
||||
return soc;
|
||||
}
|
||||
|
||||
public void setSoc(String soc) {
|
||||
|
||||
this.soc = soc;
|
||||
}
|
||||
|
||||
public String getBmsBatteryMonoMinimumVoltage() {
|
||||
|
||||
return bmsBatteryMonoMinimumVoltage;
|
||||
}
|
||||
|
||||
public void setBmsBatteryMonoMinimumVoltage(String bmsBatteryMonoMinimumVoltage) {
|
||||
|
||||
this.bmsBatteryMonoMinimumVoltage = bmsBatteryMonoMinimumVoltage;
|
||||
}
|
||||
|
||||
public String getBmsBatteryMonoMaximumVoltage() {
|
||||
|
||||
return bmsBatteryMonoMaximumVoltage;
|
||||
}
|
||||
|
||||
public void setBmsBatteryMonoMaximumVoltage(String bmsBatteryMonoMaximumVoltage) {
|
||||
|
||||
this.bmsBatteryMonoMaximumVoltage = bmsBatteryMonoMaximumVoltage;
|
||||
}
|
||||
|
||||
public String getBmsBatteryMinimumTemperature() {
|
||||
|
||||
return bmsBatteryMinimumTemperature;
|
||||
}
|
||||
|
||||
public void setBmsBatteryMinimumTemperature(String bmsBatteryMinimumTemperature) {
|
||||
|
||||
this.bmsBatteryMinimumTemperature = bmsBatteryMinimumTemperature;
|
||||
}
|
||||
|
||||
public String getBmsBatteryMaximumTemperature() {
|
||||
|
||||
return bmsBatteryMaximumTemperature;
|
||||
}
|
||||
|
||||
public void setBmsBatteryMaximumTemperature(String bmsBatteryMaximumTemperature) {
|
||||
|
||||
this.bmsBatteryMaximumTemperature = bmsBatteryMaximumTemperature;
|
||||
}
|
||||
|
||||
public String getTotalChargingTime() {
|
||||
|
||||
return totalChargingTime;
|
||||
}
|
||||
|
||||
public void setTotalChargingTime(String totalChargingTime) {
|
||||
|
||||
this.totalChargingTime = totalChargingTime;
|
||||
}
|
||||
|
||||
public String getOutputEnergy() {
|
||||
|
||||
return outputEnergy;
|
||||
}
|
||||
|
||||
public void setOutputEnergy(String outputEnergy) {
|
||||
|
||||
this.outputEnergy = outputEnergy;
|
||||
}
|
||||
|
||||
public String getChargerSn() {
|
||||
|
||||
return chargerSn;
|
||||
}
|
||||
|
||||
public void setChargerSn(String chargerSn) {
|
||||
|
||||
this.chargerSn = chargerSn;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.common.pilemsg;
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class ChargingConfigData extends BaseData {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.common.pilemsg;
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class ChargingHandshakeData extends BaseData {
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class OfflineCardSyncReplyData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String writeResult; //保存结果
|
||||
private String failResult; //失败原因
|
||||
|
||||
public String getPileNo() {
|
||||
|
||||
return pileNo;
|
||||
}
|
||||
|
||||
public void setPileNo(String pileNo) {
|
||||
|
||||
this.pileNo = pileNo;
|
||||
}
|
||||
|
||||
public String getWriteResult() {
|
||||
|
||||
return writeResult;
|
||||
}
|
||||
|
||||
public void setWriteResult(String writeResult) {
|
||||
|
||||
this.writeResult = writeResult;
|
||||
}
|
||||
|
||||
public String getFailResult() {
|
||||
|
||||
return failResult;
|
||||
}
|
||||
|
||||
public void setFailResult(String failResult) {
|
||||
|
||||
this.failResult = failResult;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,347 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class OrderData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String startTime; //开始时间CP56Time2a格式
|
||||
private String endTime; //结束时间CP56Time2a格式
|
||||
private String t1Price; //尖单价
|
||||
private String t1PowerQuantity; //尖电量
|
||||
private String t1LossQuantity; //计损尖电量
|
||||
private String t1Cost; //尖金额
|
||||
private String t2Price; //峰单价
|
||||
private String t2PowerQuantity; //峰电量
|
||||
private String t2LossQuantity; //计损峰电量
|
||||
private String t2Cost; //峰金额
|
||||
private String t3Price; //平单价
|
||||
private String t3PowerQuantity; //平电量
|
||||
private String t3LossQuantity; //计损平电量
|
||||
private String t3Cost; //平金额
|
||||
private String t4Price; //谷单价
|
||||
private String t4PowerQuantity; //谷电量
|
||||
private String t4LossQuantity; //计损谷电量
|
||||
private String t4Cost; //谷金额
|
||||
private String electricMeterStart; //电表总起值
|
||||
private String electricMeterEnd; //电表总止值
|
||||
private String totalPowerQuantity; //总电量
|
||||
private String totalLossPowerQuantity; //计损总电量
|
||||
private String cost; //消费金额
|
||||
private String vinNormal; //VIN 码,此处 VIN 码和充电时 VIN码不同,正序直接上传,无需补0和反序
|
||||
private String transactionFlag; //交易标识
|
||||
private String transactionDatetime; //交易日期、时间CP56Time2a格式
|
||||
private String stopReason; //停止原因
|
||||
private String cardNo; //物理卡号
|
||||
|
||||
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 getStartTime() {
|
||||
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getT1Price() {
|
||||
|
||||
return t1Price;
|
||||
}
|
||||
|
||||
public void setT1Price(String t1Price) {
|
||||
|
||||
this.t1Price = t1Price;
|
||||
}
|
||||
|
||||
public String getT1PowerQuantity() {
|
||||
|
||||
return t1PowerQuantity;
|
||||
}
|
||||
|
||||
public void setT1PowerQuantity(String t1PowerQuantity) {
|
||||
|
||||
this.t1PowerQuantity = t1PowerQuantity;
|
||||
}
|
||||
|
||||
public String getT1LossQuantity() {
|
||||
|
||||
return t1LossQuantity;
|
||||
}
|
||||
|
||||
public void setT1LossQuantity(String t1LossQuantity) {
|
||||
|
||||
this.t1LossQuantity = t1LossQuantity;
|
||||
}
|
||||
|
||||
public String getT1Cost() {
|
||||
|
||||
return t1Cost;
|
||||
}
|
||||
|
||||
public void setT1Cost(String t1Cost) {
|
||||
|
||||
this.t1Cost = t1Cost;
|
||||
}
|
||||
|
||||
public String getT2Price() {
|
||||
|
||||
return t2Price;
|
||||
}
|
||||
|
||||
public void setT2Price(String t2Price) {
|
||||
|
||||
this.t2Price = t2Price;
|
||||
}
|
||||
|
||||
public String getT2PowerQuantity() {
|
||||
|
||||
return t2PowerQuantity;
|
||||
}
|
||||
|
||||
public void setT2PowerQuantity(String t2PowerQuantity) {
|
||||
|
||||
this.t2PowerQuantity = t2PowerQuantity;
|
||||
}
|
||||
|
||||
public String getT2LossQuantity() {
|
||||
|
||||
return t2LossQuantity;
|
||||
}
|
||||
|
||||
public void setT2LossQuantity(String t2LossQuantity) {
|
||||
|
||||
this.t2LossQuantity = t2LossQuantity;
|
||||
}
|
||||
|
||||
public String getT2Cost() {
|
||||
|
||||
return t2Cost;
|
||||
}
|
||||
|
||||
public void setT2Cost(String t2Cost) {
|
||||
|
||||
this.t2Cost = t2Cost;
|
||||
}
|
||||
|
||||
public String getT3Price() {
|
||||
|
||||
return t3Price;
|
||||
}
|
||||
|
||||
public void setT3Price(String t3Price) {
|
||||
|
||||
this.t3Price = t3Price;
|
||||
}
|
||||
|
||||
public String getT3PowerQuantity() {
|
||||
|
||||
return t3PowerQuantity;
|
||||
}
|
||||
|
||||
public void setT3PowerQuantity(String t3PowerQuantity) {
|
||||
|
||||
this.t3PowerQuantity = t3PowerQuantity;
|
||||
}
|
||||
|
||||
public String getT3LossQuantity() {
|
||||
|
||||
return t3LossQuantity;
|
||||
}
|
||||
|
||||
public void setT3LossQuantity(String t3LossQuantity) {
|
||||
|
||||
this.t3LossQuantity = t3LossQuantity;
|
||||
}
|
||||
|
||||
public String getT3Cost() {
|
||||
|
||||
return t3Cost;
|
||||
}
|
||||
|
||||
public void setT3Cost(String t3Cost) {
|
||||
|
||||
this.t3Cost = t3Cost;
|
||||
}
|
||||
|
||||
public String getT4Price() {
|
||||
|
||||
return t4Price;
|
||||
}
|
||||
|
||||
public void setT4Price(String t4Price) {
|
||||
|
||||
this.t4Price = t4Price;
|
||||
}
|
||||
|
||||
public String getT4PowerQuantity() {
|
||||
|
||||
return t4PowerQuantity;
|
||||
}
|
||||
|
||||
public void setT4PowerQuantity(String t4PowerQuantity) {
|
||||
|
||||
this.t4PowerQuantity = t4PowerQuantity;
|
||||
}
|
||||
|
||||
public String getT4LossQuantity() {
|
||||
|
||||
return t4LossQuantity;
|
||||
}
|
||||
|
||||
public void setT4LossQuantity(String t4LossQuantity) {
|
||||
|
||||
this.t4LossQuantity = t4LossQuantity;
|
||||
}
|
||||
|
||||
public String getT4Cost() {
|
||||
|
||||
return t4Cost;
|
||||
}
|
||||
|
||||
public void setT4Cost(String t4Cost) {
|
||||
|
||||
this.t4Cost = t4Cost;
|
||||
}
|
||||
|
||||
public String getElectricMeterStart() {
|
||||
|
||||
return electricMeterStart;
|
||||
}
|
||||
|
||||
public void setElectricMeterStart(String electricMeterStart) {
|
||||
|
||||
this.electricMeterStart = electricMeterStart;
|
||||
}
|
||||
|
||||
public String getElectricMeterEnd() {
|
||||
|
||||
return electricMeterEnd;
|
||||
}
|
||||
|
||||
public void setElectricMeterEnd(String electricMeterEnd) {
|
||||
|
||||
this.electricMeterEnd = electricMeterEnd;
|
||||
}
|
||||
|
||||
public String getTotalPowerQuantity() {
|
||||
|
||||
return totalPowerQuantity;
|
||||
}
|
||||
|
||||
public void setTotalPowerQuantity(String totalPowerQuantity) {
|
||||
|
||||
this.totalPowerQuantity = totalPowerQuantity;
|
||||
}
|
||||
|
||||
public String getTotalLossPowerQuantity() {
|
||||
|
||||
return totalLossPowerQuantity;
|
||||
}
|
||||
|
||||
public void setTotalLossPowerQuantity(String totalLossPowerQuantity) {
|
||||
|
||||
this.totalLossPowerQuantity = totalLossPowerQuantity;
|
||||
}
|
||||
|
||||
public String getCost() {
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(String cost) {
|
||||
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
public String getVinNormal() {
|
||||
|
||||
return vinNormal;
|
||||
}
|
||||
|
||||
public void setVinNormal(String vinNormal) {
|
||||
|
||||
this.vinNormal = vinNormal;
|
||||
}
|
||||
|
||||
public String getTransactionFlag() {
|
||||
|
||||
return transactionFlag;
|
||||
}
|
||||
|
||||
public void setTransactionFlag(String transactionFlag) {
|
||||
|
||||
this.transactionFlag = transactionFlag;
|
||||
}
|
||||
|
||||
public String getTransactionDatetime() {
|
||||
|
||||
return transactionDatetime;
|
||||
}
|
||||
|
||||
public void setTransactionDatetime(String transactionDatetime) {
|
||||
|
||||
this.transactionDatetime = transactionDatetime;
|
||||
}
|
||||
|
||||
public String getStopReason() {
|
||||
|
||||
return stopReason;
|
||||
}
|
||||
|
||||
public void setStopReason(String stopReason) {
|
||||
|
||||
this.stopReason = stopReason;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
|
||||
return cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class PileConfigReplyData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String configResult; //设置结果
|
||||
|
||||
public String getPileNo() {
|
||||
|
||||
return pileNo;
|
||||
}
|
||||
|
||||
public void setPileNo(String pileNo) {
|
||||
|
||||
this.pileNo = pileNo;
|
||||
}
|
||||
|
||||
public String getConfigResult() {
|
||||
|
||||
return configResult;
|
||||
}
|
||||
|
||||
public void setConfigResult(String configResult) {
|
||||
|
||||
this.configResult = configResult;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class PileStartChargingData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String startType; //启动方式
|
||||
private String passwordRequired; //是否需要密码
|
||||
private String accountOrCardNo; //账号或者物理卡号
|
||||
private String password; //密码
|
||||
private String vin; //VIN
|
||||
|
||||
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 getStartType() {
|
||||
|
||||
return startType;
|
||||
}
|
||||
|
||||
public void setStartType(String startType) {
|
||||
|
||||
this.startType = startType;
|
||||
}
|
||||
|
||||
public String getPasswordRequired() {
|
||||
|
||||
return passwordRequired;
|
||||
}
|
||||
|
||||
public void setPasswordRequired(String passwordRequired) {
|
||||
|
||||
this.passwordRequired = passwordRequired;
|
||||
}
|
||||
|
||||
public String getAccountOrCardNo() {
|
||||
|
||||
return accountOrCardNo;
|
||||
}
|
||||
|
||||
public void setAccountOrCardNo(String accountOrCardNo) {
|
||||
|
||||
this.accountOrCardNo = accountOrCardNo;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getVin() {
|
||||
|
||||
return vin;
|
||||
}
|
||||
|
||||
public void setVin(String vin) {
|
||||
|
||||
this.vin = vin;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class PileTimeConfigReplyData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String setTime; //当前时间CP56Time2a格式
|
||||
|
||||
public String getPileNo() {
|
||||
|
||||
return pileNo;
|
||||
}
|
||||
|
||||
public void setPileNo(String pileNo) {
|
||||
|
||||
this.pileNo = pileNo;
|
||||
}
|
||||
|
||||
public String getSetTime() {
|
||||
|
||||
return setTime;
|
||||
}
|
||||
|
||||
public void setSetTime(String setTime) {
|
||||
|
||||
this.setTime = setTime;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.common.pilemsg;
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class RealtimeData extends BaseData {
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class RemoteStartReplyData extends BaseData {
|
||||
|
||||
private String orderNo; //交易流水号
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String startResult; //启动结果
|
||||
private String failReason; //失败原因
|
||||
|
||||
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 getStartResult() {
|
||||
|
||||
return startResult;
|
||||
}
|
||||
|
||||
public void setStartResult(String startResult) {
|
||||
|
||||
this.startResult = startResult;
|
||||
}
|
||||
|
||||
public String getFailReason() {
|
||||
|
||||
return failReason;
|
||||
}
|
||||
|
||||
public void setFailReason(String failReason) {
|
||||
|
||||
this.failReason = failReason;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.xhpc.common.data.up;
|
||||
|
||||
public class RemoteStopReplyData extends BaseData {
|
||||
|
||||
private String pileNo; //桩号
|
||||
private String gunId; //枪号
|
||||
private String stopResult; //停止结果
|
||||
private String failReason; //失败原因
|
||||
|
||||
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 getStopResult() {
|
||||
|
||||
return stopResult;
|
||||
}
|
||||
|
||||
public void setStopResult(String stopResult) {
|
||||
|
||||
this.stopResult = stopResult;
|
||||
}
|
||||
|
||||
public String getFailReason() {
|
||||
|
||||
return failReason;
|
||||
}
|
||||
|
||||
public void setFailReason(String failReason) {
|
||||
|
||||
this.failReason = failReason;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.xhpc.common.api.factory.PowerPileFallbackFactory
|
||||
@ -63,6 +63,12 @@
|
||||
<artifactId>ruoyi-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Core -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.quickserver</groupId>
|
||||
<artifactId>quickserver</artifactId>
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package com.xhpc.pp;
|
||||
package com.xhpc;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
/**
|
||||
@ -10,6 +11,7 @@ import org.springframework.context.annotation.ImportResource;
|
||||
*
|
||||
* @author zz
|
||||
*/
|
||||
@EnableFeignClients
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@ImportResource(locations = {"classpath:svcmainlogic.xml"})
|
||||
public class XhpcPPApplication {
|
||||
@ -0,0 +1,32 @@
|
||||
package com.xhpc.pp.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.xhpc.common.api.PowerPileService;
|
||||
import com.xhpc.common.data.down.StartChargingData;
|
||||
import com.xhpc.common.data.up.OrderData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class ChargingController {
|
||||
|
||||
@Autowired
|
||||
private PowerPileService powerPileService;
|
||||
|
||||
@PostMapping("test/pile/charging/order")
|
||||
public Object test(@Validated @RequestBody StartChargingData startChargingData) {
|
||||
|
||||
R<OrderData> r = powerPileService.startCharging(startChargingData);
|
||||
return r;
|
||||
}
|
||||
|
||||
@PostMapping("pile/charging/order")
|
||||
public Object startCharging(@Validated @RequestBody StartChargingData startChargingData) {
|
||||
|
||||
return new OrderData();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.BalanceUpdateReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("BalanceUpdateReplyDataLogic")
|
||||
public class BalanceUpdateReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(BalanceUpdateReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BalanceUpdateReplyData balanceUpdateReplyData = objectMapper.convertValue(req, BalanceUpdateReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.BmsChargingData;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||
|
||||
@Lazy
|
||||
@Component("BmsChargingDataLogic")
|
||||
public class BmsChargingDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(BmsChargingDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BmsChargingData bmsChargingData = objectMapper.convertValue(req, BmsChargingData.class);
|
||||
String orderNo = bmsChargingData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
List<BmsChargingData> bmsChargingDataList = (List<BmsChargingData>) cacheOrder.getOrDefault("bmsChargings", new ArrayList<>());
|
||||
bmsChargingDataList.add(bmsChargingData);
|
||||
cacheOrder.put("bmsChargings", bmsChargingDataList);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.BmsErrorData;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||
|
||||
@Lazy
|
||||
@Component("BmsErrorDataLogic")
|
||||
public class BmsErrorDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(BmsErrorDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BmsErrorData bmsErrorData = objectMapper.convertValue(req, BmsErrorData.class);
|
||||
String orderNo = bmsErrorData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
List<BmsErrorData> bmsErrorDataList = (List<BmsErrorData>) cacheOrder.getOrDefault("bmsErrors", new ArrayList<>());
|
||||
bmsErrorDataList.add(bmsErrorData);
|
||||
cacheOrder.put("bmsErrors", bmsErrorDataList);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.BmsInterruptData;
|
||||
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("BmsInterruptDataLogic")
|
||||
public class BmsInterruptDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(BmsInterruptDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BmsInterruptData bmsInterruptData = objectMapper.convertValue(req, BmsInterruptData.class);
|
||||
String orderNo = bmsInterruptData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
cacheOrder.put("bmsInterrupt", bmsInterruptData);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.BmsReqChargerOutputData;
|
||||
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.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||
|
||||
@Lazy
|
||||
@Component("BmsReqChargerOutputDataLogic")
|
||||
public class BmsReqChargerOutputDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(BmsReqChargerOutputDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
BmsReqChargerOutputData bmsReqChargerOutputData = objectMapper.convertValue(req, BmsReqChargerOutputData.class);
|
||||
String orderNo = bmsReqChargerOutputData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
List<BmsReqChargerOutputData> bmsReqChargerOutputDataList = (List<BmsReqChargerOutputData>) cacheOrder.getOrDefault("bmsErrors", new ArrayList<>());
|
||||
bmsReqChargerOutputDataList.add(bmsReqChargerOutputData);
|
||||
cacheOrder.put("bmsReqChargerOutputs", bmsReqChargerOutputDataList);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.ChargerInterruptData;
|
||||
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("ChargerInterruptDataLogic")
|
||||
public class ChargerInterruptDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(ChargerInterruptDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
ChargerInterruptData chargerInterruptData = objectMapper.convertValue(req, ChargerInterruptData.class);
|
||||
String orderNo = chargerInterruptData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
cacheOrder.put("chargerInterrupt", chargerInterruptData);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.ChargingCompletedData;
|
||||
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("ChargingCompletedDataLogic")
|
||||
public class ChargingCompletedDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(ChargingCompletedDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
ChargingCompletedData chargingCompletedData = objectMapper.convertValue(req, ChargingCompletedData.class);
|
||||
String orderNo = chargingCompletedData.getOrderNo();
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderNo);
|
||||
cacheOrder.put("completed", chargingCompletedData);
|
||||
REDIS.setCacheMap(orderNo, cacheOrder);
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.pilemsg.ChargingConfigData;
|
||||
import com.xhpc.common.data.up.ChargingConfigData;
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
import com.xhpc.pp.tx.logic.ServiceLogic;
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.pilemsg.ChargingHandshakeData;
|
||||
import com.xhpc.common.data.up.ChargingHandshakeData;
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
import com.xhpc.pp.tx.logic.ServiceLogic;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.domain.ServiceField;
|
||||
import com.xhpc.pp.mapper.ServiceFieldMapper;
|
||||
@ -15,18 +15,18 @@ import java.util.Map;
|
||||
|
||||
@Lazy
|
||||
@Component
|
||||
public class FieldService {
|
||||
public class FieldLogic {
|
||||
|
||||
// 版本->协议字段表
|
||||
private static Map<String, Map<String, List<ServiceField>>> versionMapFields;
|
||||
private static ServiceFieldMapper fieldMapper;
|
||||
|
||||
@Autowired
|
||||
public FieldService(ServiceFieldMapper fieldMapper) {
|
||||
public FieldLogic(ServiceFieldMapper fieldMapper) {
|
||||
|
||||
versionMapFields = new HashMap<>();
|
||||
FieldService.fieldMapper = fieldMapper;
|
||||
FieldService.init();
|
||||
FieldLogic.fieldMapper = fieldMapper;
|
||||
FieldLogic.init();
|
||||
}
|
||||
|
||||
public static void refreshCache() {
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
@ -0,0 +1,24 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("OfflineCardEraseReplyDataLogic")
|
||||
public class OfflineCardEraseReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(OfflineCardEraseReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("OfflineCardInquiryReplyDataLogic")
|
||||
public class OfflineCardInquiryReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(OfflineCardInquiryReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.OfflineCardSyncReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("OfflineCardSyncReplyDataLogic")
|
||||
public class OfflineCardSyncReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(OfflineCardSyncReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
OfflineCardSyncReplyData offlineCardSyncReplyData = objectMapper.convertValue(req, OfflineCardSyncReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.OrderData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("OrderDataLogic")
|
||||
public class OrderDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(OrderDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
OrderData orderData = objectMapper.convertValue(req, OrderData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileConfigReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("PileConfigReplyDataLogic")
|
||||
public class PileConfigReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(PileConfigReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileConfigReplyData pileConfigReplyData = objectMapper.convertValue(req, PileConfigReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileConfigReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("PileRateModelConfigReplyDataLogic")
|
||||
public class PileRateModelConfigReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(PileRateModelConfigReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileConfigReplyData pileRateModelConfigReplyData = objectMapper.convertValue(req, PileConfigReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileStartChargingData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("PileStartChargingDataLogic")
|
||||
public class PileStartChargingDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(PileStartChargingDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileStartChargingData pileStartChargingData = objectMapper.convertValue(req, PileStartChargingData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileConfigReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("PileTimeConfigReplyDataLogic")
|
||||
public class PileTimeConfigReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(PileTimeConfigReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileConfigReplyData pileConfigReplyData = objectMapper.convertValue(req, PileConfigReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.pilemsg.RealtimeData;
|
||||
import com.xhpc.common.data.up.RealtimeData;
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
import com.xhpc.pp.tx.logic.ServiceLogic;
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -31,11 +32,23 @@ public class RegisterLogic implements ServiceLogic {
|
||||
String hexCode = ServiceResult.HEX_OK;
|
||||
String pileNo = (String) req.get("pileNo");
|
||||
Set<String> pileSnPool = REDIS.getCacheSet("PILE_SN_POOL");
|
||||
// ? = REDIS.getCacheSet(pileNo); todo
|
||||
//todo set rate model to cache
|
||||
if (!pileSnPool.contains(pileNo)) {
|
||||
hexCode = ServiceResult.HEX_FAIL;
|
||||
resultCode = ServiceResult.FAIL;
|
||||
}
|
||||
int gunNum = Integer.parseInt(req.get("gunNum").toString());
|
||||
for (int gunN = 1; gunN <= gunNum; gunN++) {
|
||||
String gunId = String.format("%02d", (int) gunN);
|
||||
Map<String, Object> cacheGun = REDIS.getCacheMap(pileNo.concat(gunId));
|
||||
if (cacheGun == null) {
|
||||
cacheGun = new HashMap<>();
|
||||
}
|
||||
int seq = (int) cacheGun.getOrDefault("seq", 0);
|
||||
cacheGun.put("seq", seq);
|
||||
REDIS.setCacheMap(pileNo.concat(gunId), cacheGun);
|
||||
}
|
||||
String resultStr = "680C00000002".concat(pileNo).concat(hexCode);
|
||||
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr));
|
||||
return new ServiceResult(HexUtils.toBytes(resultStr), resultCode);
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileConfigReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("RemoteRestartReplyDataLogic")
|
||||
public class RemoteRestartReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(RemoteRestartReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileConfigReplyData pileConfigReplyData = objectMapper.convertValue(req, PileConfigReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileStartChargingData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("RemoteStartReplyDataLogic")
|
||||
public class RemoteStartReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(RemoteStartReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileStartChargingData pileStartChargingData = objectMapper.convertValue(req, PileStartChargingData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.RemoteStopReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("RemoteStopReplyDataLogic")
|
||||
public class RemoteStopReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(RemoteStopReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
RemoteStopReplyData remoteStopReplyData = objectMapper.convertValue(req, RemoteStopReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.xhpc.common.data.up.PileConfigReplyData;
|
||||
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;
|
||||
|
||||
@Lazy
|
||||
@Component("RemoteUpgradeReplyDataLogic")
|
||||
public class RemoteUpgradeReplyDataLogic implements ServiceLogic {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(RemoteUpgradeReplyDataLogic.class);
|
||||
|
||||
@Override
|
||||
public ServiceResult service(ServiceParameter sp) throws Exception {
|
||||
|
||||
Map<String, Object> req = sp.getParameters();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
PileConfigReplyData pileRateModelConfigReplyData = objectMapper.convertValue(req, PileConfigReplyData.class);
|
||||
//todo
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
package com.xhpc.pp.service;
|
||||
package com.xhpc.pp.logic;
|
||||
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
@ -1,8 +1,8 @@
|
||||
package com.xhpc.pp.server;
|
||||
|
||||
import com.xhpc.pp.domain.ServiceField;
|
||||
import com.xhpc.pp.service.FieldService;
|
||||
import com.xhpc.pp.service.ServiceMainLogic;
|
||||
import com.xhpc.pp.logic.FieldLogic;
|
||||
import com.xhpc.pp.logic.ServiceMainLogic;
|
||||
import com.xhpc.pp.tx.ServiceParameter;
|
||||
import com.xhpc.pp.tx.ServiceResult;
|
||||
import com.xhpc.pp.tx.TxException;
|
||||
@ -19,8 +19,8 @@ import java.util.*;
|
||||
|
||||
import static com.ruoyi.common.core.utils.GetIpAndPort.getLocalIP;
|
||||
import static com.xhpc.pp.config.EarlierBeanConf.getLocalIPAndPort;
|
||||
import static com.xhpc.pp.logic.RegisterLogic.REGISTERED;
|
||||
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||
import static com.xhpc.pp.service.RegisterLogic.REGISTERED;
|
||||
import static com.xhpc.pp.tx.ServiceResult.OK;
|
||||
import static com.xhpc.pp.utils.security.CRCCalculator.calcCrc;
|
||||
|
||||
@ -100,8 +100,8 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler {
|
||||
ChargingPileServer.putHandler(pileNo, handler);
|
||||
ChargingPileServer.putVersion(handler.getName(), (String) req.get("version"));
|
||||
Map<String, Object> pileCache = REDIS.getCacheMap(pileNo);
|
||||
pileCache.put("Status", REGISTERED);
|
||||
pileCache.put("Server", getLocalIPAndPort());
|
||||
pileCache.put("status", REGISTERED);
|
||||
pileCache.put("server", getLocalIPAndPort());
|
||||
REDIS.setCacheMap(pileNo, pileCache);
|
||||
Set<String> pilesAtHost = REDIS.getCacheSet(getLocalIP());
|
||||
pilesAtHost.add(pileNo);
|
||||
@ -132,7 +132,7 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler {
|
||||
|
||||
private Map<String, Object> analysis(byte[] data, String service, String ver) throws TxException {
|
||||
|
||||
List<ServiceField> fieldList = FieldService.fieldList(ver, service);
|
||||
List<ServiceField> fieldList = FieldLogic.fieldList(ver, service);
|
||||
if (fieldList == null || fieldList.isEmpty())
|
||||
throw TxException.INNER_ERROR("field mapper not found");
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.xhpc.pp.server;
|
||||
|
||||
import com.ruoyi.common.redis.service.RedisService;
|
||||
import com.xhpc.pp.service.FieldService;
|
||||
import com.xhpc.pp.logic.FieldLogic;
|
||||
import com.xhpc.pp.utils.security.HexUtils;
|
||||
import org.quickserver.net.server.ClientHandler;
|
||||
import org.quickserver.net.server.DataMode;
|
||||
@ -23,7 +23,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.xhpc.pp.service.RegisterLogic.DISCONNECTED;
|
||||
import static com.xhpc.pp.logic.RegisterLogic.DISCONNECTED;
|
||||
|
||||
|
||||
/**
|
||||
@ -42,7 +42,7 @@ public class ChargingPileServer {
|
||||
private QuickServer server;
|
||||
|
||||
@Autowired
|
||||
private FieldService fieldService;
|
||||
private FieldLogic fieldLogic;
|
||||
@Autowired
|
||||
public RedisService redisService;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.xhpc.pp.tx;
|
||||
|
||||
import com.xhpc.pp.service.ServiceMainLogic;
|
||||
import com.xhpc.pp.logic.ServiceMainLogic;
|
||||
import com.xhpc.pp.utils.JSONUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
@ -15,5 +15,24 @@
|
||||
<entry key="13" value-ref="RealtimeDataLogic"/>
|
||||
<entry key="15" value-ref="ChargingHandshakeDataLogic"/>
|
||||
<entry key="17" value-ref="ChargingConfigDataLogic"/>
|
||||
<entry key="19" value-ref="ChargingCompletedDataLogic"/>
|
||||
<entry key="1B" value-ref="BmsErrorDataLogic"/>
|
||||
<entry key="1D" value-ref="BmsInterruptDataLogic"/>
|
||||
<entry key="21" value-ref="ChargerInterruptDataLogic"/>
|
||||
<entry key="23" value-ref="BmsReqChargerOutputDataLogic"/>
|
||||
<entry key="25" value-ref="BmsChargingDataLogic"/>
|
||||
<entry key="31" value-ref="PileStartChargingDataLogic"/>
|
||||
<entry key="33" value-ref="RemoteStartReplyDataLogic"/>
|
||||
<entry key="35" value-ref="RemoteStopReplyDataLogic"/>
|
||||
<entry key="3B" value-ref="OrderDataLogic"/>
|
||||
<entry key="41" value-ref="BalanceUpdateReplyDataLogic"/>
|
||||
<entry key="43" value-ref="OfflineCardSyncReplyDataLogic"/>
|
||||
<entry key="45" value-ref="OfflineCardEraseReplyDataLogic"/>
|
||||
<entry key="47" value-ref="OfflineCardInquiryReplyDataLogic"/>
|
||||
<entry key="51" value-ref="PileConfigReplyDataLogic"/>
|
||||
<entry key="55" value-ref="PileTimeConfigReplyDataLogic"/>
|
||||
<entry key="57" value-ref="PileRateModelConfigReplyDataLogic"/>
|
||||
<entry key="91" value-ref="RemoteRestartReplyDataLogic"/>
|
||||
<entry key="93" value-ref="RemoteUpgradeReplyDataLogic"/>
|
||||
</util:map>
|
||||
</beans>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user