mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-04 18:09:54 +08:00
!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:
@@ -88,4 +88,9 @@ public interface PileProtocolService {
|
||||
* 充电桩与 BMS 参数配置阶段报文
|
||||
*/
|
||||
void onBmsParamConfigReport(UplinkQueueMessage uplinkQueueMsg, Callback callback);
|
||||
|
||||
/**
|
||||
* 充电过程BMS信息
|
||||
*/
|
||||
void onBmsCharingInfo(UplinkQueueMessage uplinkQueueMessage, Callback callback);
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user