mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-28 06:55:09 +08:00
update 电单车协议
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.pile.service;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.ebike.EBikeChargeResponseEnum;
|
||||
@@ -162,14 +163,44 @@ public class PileRemoteService {
|
||||
log.info("发送远程停止充电指令-充电桩枪口编号:{}, 获取到正在充电中的交易流水号:{}, 与入参交易流水号:{}不一致, function return", pileSn + connectorCode, redisResult, transactionCode);
|
||||
return;
|
||||
}
|
||||
|
||||
// 查询桩信息
|
||||
PileDetailVO pileDetailVO = pileBasicInfoService.selectPileDetailByPileSn(pileSn);
|
||||
if (pileDetailVO == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
StopChargingCommand command = StopChargingCommand.builder()
|
||||
.pileSn(pileSn)
|
||||
.connectorCode(connectorCode)
|
||||
.transactionCode(transactionCode)
|
||||
.build();
|
||||
ykcPushCommandService.pushStopChargingCommand(command);
|
||||
|
||||
String chargePortType = pileDetailVO.getChargePortType();
|
||||
if (StringUtils.equals(chargePortType, Constants.THREE)) {
|
||||
// 发送电动自行车桩停止充电指令
|
||||
eBikeSendCommandService.sendStopChargingCommand(command);
|
||||
} else {
|
||||
// 发送电动汽车桩停止充电指令
|
||||
ykcPushCommandService.pushStopChargingCommand(command);
|
||||
}
|
||||
log.info("remoteStopCharging success, pileConnectorCode:{}, transactionCode:{}", pileSn + connectorCode, transactionCode);
|
||||
}
|
||||
|
||||
public void remoteStopChargingForEBike(String pileSn, String connectorCode, String transactionCode) {
|
||||
StopChargingCommand command = StopChargingCommand.builder()
|
||||
.pileSn(pileSn)
|
||||
.connectorCode(connectorCode)
|
||||
.transactionCode(transactionCode)
|
||||
.build();
|
||||
try {
|
||||
eBikeSendCommandService.sendStopChargingCommand(command);
|
||||
} catch (Exception e) {
|
||||
log.error("remoteStopChargingForEBike error, pileSn:{}, connectorCode:{}, transactionCode:{}"
|
||||
,pileSn, connectorCode, transactionCode, e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发充电桩二维码
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user