添加查询充电枪状态接口

This commit is contained in:
三丙
2025-09-27 18:04:00 +08:00
parent 7a03cc98a7
commit a1e0a09320
74 changed files with 1727 additions and 259 deletions

View File

@@ -68,7 +68,7 @@ public class YunKuaiChongV150BmsAbortULCmd extends YunKuaiChongUplinkCmdExe {
BmsAbortProto proto = BmsAbortProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setAdditionalInfo(additionalInfo.toString())
.build();

View File

@@ -117,7 +117,7 @@ public class YunKuaiChongV150BmsChargingErrorULCmd extends YunKuaiChongUplinkCmd
BmsChargingErrorProto bmsChargingErrorProto = BmsChargingErrorProto.newBuilder()
.setPileCode(pileCode)
.setTradeNo(tradeNo)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setAdditionalInfo(additionalInfo.toString())
.build();
UplinkQueueMessage uplinkQueueMessage = uplinkMessageBuilder(bmsChargingErrorProto.getPileCode(), tcpSession, yunKuaiChongUplinkMessage)

View File

@@ -78,7 +78,7 @@ public class YunKuaiChongV150BmsChargingInfoULCmd extends YunKuaiChongUplinkCmdE
BmsChargingInfoProto bmsCharingInfoProto = BmsChargingInfoProto.newBuilder()
.setPileCode(pileCode)
.setTradeNo(tradeNo)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setAdditionalInfo(additionalInfo.toString())
.build();
UplinkQueueMessage uplinkQueueMessage = uplinkMessageBuilder(bmsCharingInfoProto.getPileCode(), tcpSession, yunKuaiChongUplinkMessage)

View File

@@ -95,7 +95,7 @@ public class YunKuaiChongV150BmsDemandChargerOutputULCmd extends YunKuaiChongUpl
BmsDemandChargerOutputProto proto = BmsDemandChargerOutputProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setAdditionalInfo(additionalInfo.toString())
.build();

View File

@@ -105,7 +105,7 @@ public class YunKuaiChongV150BmsHandshakeULCmd extends YunKuaiChongUplinkCmdExe
// 构建BmsHandshakeProto对象
BmsHandshakeProto bmsHandshakeProto = BmsHandshakeProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setBmsProtocolVersion(HexUtil.encodeHexStr(bmsConnectVersionBytes))
.setBmsBatteryType(bmsBatteryType)

View File

@@ -93,7 +93,7 @@ public class YunKuaiChongV150BmsParamConfigReportULCmd extends YunKuaiChongUplin
BmsParamConfigReportProto bmsParamConfigReportProto = BmsParamConfigReportProto.newBuilder()
.setPileCode(pileCode)
.setTradeNo(tradeNo)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setMaxSingleCellVoltage(maxSingleCellVoltage.toPlainString())
.setMaxChargeCurrent(maxChargeCurrent.toPlainString())
.setRatedEnergy(ratedEnergy.toPlainString())

View File

@@ -71,7 +71,7 @@ public class YunKuaiChongV150LockStatusULCmd extends YunKuaiChongUplinkCmdExe {
// 构建转发消息
GroundLockStatusProto groundLockStatusProto = GroundLockStatusProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setLockStatus(lockStatus)
.setParkStatus(parkStatus)
.setLockBattery(lockBattery)

View File

@@ -9,7 +9,6 @@ package sanbing.jcpp.protocol.yunkuaichong.v150.cmd;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import lombok.extern.slf4j.Slf4j;
import sanbing.jcpp.infrastructure.util.codec.BCDUtil;
import sanbing.jcpp.proto.gen.DownlinkProto.OfflineCardBalanceUpdateRequest;
import sanbing.jcpp.protocol.ProtocolContext;
import sanbing.jcpp.protocol.annotation.ProtocolCmd;
@@ -44,7 +43,7 @@ public class YunKuaiChongV150OfflineCardBalanceUpdateRequestDLCmd extends YunKua
ByteBuf msgBody = Unpooled.buffer(20);
OfflineCardBalanceUpdateRequest request = message.getMsg().getOfflineCardBalanceUpdateRequest();
msgBody.writeBytes(encodePileCode(request.getPileCode()));
msgBody.writeBytes(encodeGunCode(request.getGunCode()));
msgBody.writeBytes(encodeGunCode(request.getGunNo()));
msgBody.writeBytes(encodeCardNo(request.getCardNo()));
msgBody.writeIntLE(new BigDecimal(request.getLimitYuan()).movePointRight(2).intValue());

View File

@@ -135,7 +135,7 @@ public class YunKuaiChongV150RealTimeDataULCmd extends YunKuaiChongUplinkCmdExe
GunRunStatus gunRunStatus = parseGunRunStatus(gunStatus, gunInsert, tradeNo);
GunRunStatusProto.Builder gunRunStatusProtoBuilder = GunRunStatusProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setGunRunStatus(gunRunStatus)
.addAllFaultMessages(faults)
.setAdditionalInfo(additionalInfo.toString());
@@ -152,7 +152,7 @@ public class YunKuaiChongV150RealTimeDataULCmd extends YunKuaiChongUplinkCmdExe
// 充电进度
ChargingProgressProto.Builder chargingProgressProtoBuilder = ChargingProgressProto.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setOutputVoltage(outputVoltage.toPlainString())
.setOutputCurrent(outputCurrent.toPlainString())

View File

@@ -40,7 +40,7 @@ public class YunKuaiChongV150RemoteStartDLCmd extends YunKuaiChongDownlinkCmdExe
RemoteStartChargingRequest remoteStartChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStartChargingRequest();
String pileCode = remoteStartChargingRequest.getPileCode();
String gunCode = remoteStartChargingRequest.getGunCode();
String gunCode = remoteStartChargingRequest.getGunNo();
String tradeNo = remoteStartChargingRequest.getTradeNo();
String limitYuan = remoteStartChargingRequest.getLimitYuan();

View File

@@ -61,7 +61,7 @@ public class YunKuaiChongV150RemoteStartResultULCmd extends YunKuaiChongUplinkCm
RemoteStartChargingResponse remoteStartChargingResponse = RemoteStartChargingResponse.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setSuccess(isSuccess)
.setFailReason(failReason)

View File

@@ -37,7 +37,7 @@ public class YunKuaiChongV150RemoteStopDLCmd extends YunKuaiChongDownlinkCmdExe
RemoteStopChargingRequest remoteStopChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStopChargingRequest();
String pileCode = remoteStopChargingRequest.getPileCode();
String gunCode = remoteStopChargingRequest.getGunCode();
String gunCode = remoteStopChargingRequest.getGunNo();
ByteBuf msgBody = Unpooled.buffer(44);
// 桩编码

View File

@@ -55,7 +55,7 @@ public class YunKuaiChongV150RemoteStopResultULCmd extends YunKuaiChongUplinkCmd
RemoteStopChargingResponse remoteStopChargingResponse = RemoteStopChargingResponse.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setSuccess(isSuccess)
.setFailReason(failReason)
.setAdditionalInfo(additionalInfo.toString())

View File

@@ -46,7 +46,7 @@ public class YunKuaiChongV150StartChargeAckDLCmd extends YunKuaiChongDownlinkCmd
DownlinkProto.StartChargeResponse startChargeResponse = yunKuaiChongDwonlinkMessage.getMsg().getStartChargeResponse();
String tradeNo = startChargeResponse.getTradeNo();
String pileCode = startChargeResponse.getPileCode();
String gunCode = startChargeResponse.getGunCode();
String gunCode = startChargeResponse.getGunNo();
String logicalCardNo = startChargeResponse.getLogicalCardNo();
String limitYuan = startChargeResponse.getLimitYuan();
String failReasonValue = startChargeResponse.getFailReason();

View File

@@ -85,7 +85,7 @@ public class YunKuaiChongV150StartChargeULCmd extends YunKuaiChongUplinkCmdExe {
UplinkProto.StartChargeRequest startChargingRequest = UplinkProto.StartChargeRequest.newBuilder()
.setTs(ts)
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setStartType(startType)
.setNeedPassword(needPassword)
.setCardNo(cardNo)

View File

@@ -177,7 +177,7 @@ public class YunKuaiChongV150TransactionRecordULCmd extends YunKuaiChongUplinkCm
// 构建交易记录
TransactionRecordRequest transactionRecordRequest = TransactionRecordRequest.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setStartTs(startTime.toEpochMilli())
.setEndTs(endTime.toEpochMilli())

View File

@@ -47,7 +47,7 @@ public class YunKuaiChongV160RemoteParallelStartDLCmd extends YunKuaiChongDownli
DownlinkProto.RemoteStartChargingRequest remoteStartChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStartChargingRequest();
String pileCode = remoteStartChargingRequest.getPileCode();
String gunCode = remoteStartChargingRequest.getGunCode();
String gunCode = remoteStartChargingRequest.getGunNo();
String tradeNo = remoteStartChargingRequest.getTradeNo();
String limitYuan = remoteStartChargingRequest.getLimitYuan();

View File

@@ -72,7 +72,7 @@ public class YunKuaiChongV160RemoteParallelStartResultULCmd extends YunKuaiChong
RemoteStartChargingResponse remoteStartChargingResponse = RemoteStartChargingResponse.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setSuccess(isSuccess)
.setFailReason(failReason)

View File

@@ -201,7 +201,7 @@ public class YunKuaiChongV170TransactionRecordULCmd extends YunKuaiChongUplinkCm
// 构建交易记录
TransactionRecordRequest transactionRecordRequest = TransactionRecordRequest.newBuilder()
.setPileCode(pileCode)
.setGunCode(gunCode)
.setGunNo(gunCode)
.setTradeNo(tradeNo)
.setStartTs(startTime.toEpochMilli())
.setEndTs(endTime.toEpochMilli())