!23 0x61 地锁数据上送

* 0x61  地锁数据上送
* Merge remote-tracking branch 'origin/master'
*  云快充协议上行命令处理类 - 地锁状态/报警信息帧 (V1.5.0版本) 命令码:0x61 (地锁状态/报警信息帧上行命令)
* Merge remote-tracking branch 'origin/master'
* Merge remote-tracking branch 'origin/master'
* Merge remote-tracking branch 'origin/master'
* Merge remote-tracking branch 'origin/master'
* Revert "命令码:0x17 (参数配置帧上行命令)"
* 命令码:0x17 (参数配置帧上行命令)
This commit is contained in:
南风
2025-08-20 11:37:38 +00:00
committed by 三丙
parent ca2610ba93
commit 249d25576f
6 changed files with 157 additions and 2 deletions

View File

@@ -434,6 +434,25 @@ public class DefaultPileProtocolService implements PileProtocolService {
callback.onSuccess();
}
@Override
public void onLockStatus(UplinkQueueMessage uplinkQueueMessage, Callback callback) {
log.info("接收到地锁状态信息 {}", uplinkQueueMessage);
GroundLockStatusProto groundLockStatusProto = uplinkQueueMessage.getGroundLockStatusProto();
String pileCode = groundLockStatusProto.getPileCode();
String gunCode = groundLockStatusProto.getGunCode();
int lockStatus = groundLockStatusProto.getLockStatus();
int parkStatus = groundLockStatusProto.getParkStatus();
int lockBattery = groundLockStatusProto.getLockBattery();
int alarmStatus = groundLockStatusProto.getAlarmStatus();
log.info("地锁状态信息: 桩编码: {}, 枪号: {}, 车位锁状态: {}, 车位状态: {}, 地锁电量: {}%, 报警状态: {}",
pileCode, gunCode, lockStatus, parkStatus, lockBattery, alarmStatus);
// TODO 处理相关业务逻辑,比如保存地锁状态信息到数据库
callback.onSuccess();
}
private static Period createPeriod(int sn, LocalTime beginTime, LocalTime endTime, PricingModelFlag flag) {
Period period = new Period();
period.setSn(sn);