|
@@ -163,7 +163,7 @@ public class StationMessageHandler extends ChannelInboundHandlerAdapter {
|
|
|
PerceptionUploadAvailableBatsDto dto = parse(stationMessage, PerceptionUploadAvailableBatsDto.class);
|
|
|
dto.setStationCode(stationCode);
|
|
|
String topic = serverConfig.getServiceCenterName() + "_PERCEPTION_BAT_AVAILABLE";
|
|
|
- log.info("================可用电池数:{}",dto);
|
|
|
+ //log.info("================可用电池数:{}",dto);
|
|
|
kafkaTemplate.send(topic, JSON.toJSONString(dto));
|
|
|
} else if (command.equals(StationMessage.CommandType.PERCEPTION_PLC)) {
|
|
|
//plc感知
|
|
@@ -272,6 +272,17 @@ public class StationMessageHandler extends ChannelInboundHandlerAdapter {
|
|
|
chargeStopReply.setType("stopChargeReply");
|
|
|
String topic = serverConfig.getServiceCenterName() + "_CHARGER_REPLY";
|
|
|
kafkaTemplate.send(topic, JSON.toJSONString(chargeStopReply));
|
|
|
+ }else if (command.equals(StationMessage.CommandType.AUTO_CHARGE_REPLY)) {
|
|
|
+ String stationCode = StationCenter.getStation(ctx.channel());
|
|
|
+ if (StringUtils.isBlank(stationCode)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ AutoChargeReply autoChargeReply = parse(stationMessage, AutoChargeReply.class);
|
|
|
+ log.info("小程自动切枪电回复:{}",autoChargeReply);
|
|
|
+ autoChargeReply.setStationCode(stationCode);
|
|
|
+ autoChargeReply.setType("autoChargeReply");
|
|
|
+ String topic = serverConfig.getServiceCenterName() + "_CHARGER_REPLY";
|
|
|
+ kafkaTemplate.send(topic, JSON.toJSONString(autoChargeReply));
|
|
|
}
|
|
|
}
|
|
|
|