!12 充电过程BMS信息

* Merge branch 'master' into Feat_BMS_Charging_Info
* 修改实体名称
* Merge branch 'master' into Feat_BMS_Charging_Info
* 充电过程BMS信息
* 充电过程BMS信息
* 充电过程BMS信息
This commit is contained in:
increment
2025-08-01 07:20:12 +00:00
committed by 三丙
parent 48d7209ed4
commit 6c439fb4a0
6 changed files with 130 additions and 1 deletions

View File

@@ -88,4 +88,9 @@ public interface PileProtocolService {
* 充电桩与 BMS 参数配置阶段报文
*/
void onBmsParamConfigReport(UplinkQueueMessage uplinkQueueMsg, Callback callback);
/**
* 充电过程BMS信息
*/
void onBmsCharingInfo(UplinkQueueMessage uplinkQueueMessage, Callback callback);
}

View File

@@ -331,6 +331,19 @@ public class DefaultPileProtocolService implements PileProtocolService {
}
@Override
public void onBmsCharingInfo(UplinkQueueMessage uplinkQueueMessage, Callback callback) {
log.info("接收到充电桩上报BMS充电信息 {}", uplinkQueueMessage);
BmsChargingInfoProto bmsCharingInfoProto = uplinkQueueMessage.getBmsChargingInfoProto();
String tradeNo = bmsCharingInfoProto.getTradeNo();
String pileCode = bmsCharingInfoProto.getPileCode();
String gunCode = bmsCharingInfoProto.getGunCode();
String additionalInfo = bmsCharingInfoProto.getAdditionalInfo();
log.info("BMS充电信息: 交易流水号: {}, 桩编码: {}, 枪号: {}, 附加信息: {}", tradeNo, pileCode, gunCode, additionalInfo);
// TODO 处理相关业务逻辑
callback.onSuccess();
}
private static Period createPeriod(int sn, LocalTime beginTime, LocalTime endTime, PricingModelFlag flag) {
Period period = new Period();
period.setSn(sn);

View File

@@ -200,6 +200,10 @@ public class ProtocolUplinkConsumerService extends AbstractConsumerService imple
pileProtocolService.onBmsParamConfigReport(uplinkQueueMsg, callback);
} else if (uplinkQueueMsg.hasBmsChargingInfoProto()) {
pileProtocolService.onBmsCharingInfo(uplinkQueueMsg, callback);
} else {
callback.onSuccess();