diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/EBikeSendCommandServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/EBikeSendCommandServiceImpl.java index d3788d146..6089aeaf1 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/EBikeSendCommandServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/EBikeSendCommandServiceImpl.java @@ -76,7 +76,8 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService { data.setFullChargePower(0); data.setMaxFullChargePowerCheckTime(0); message.setData(data); - this.send(message); + byte[] send = this.send(message); + log.info("电单车发送启动充电指令response:{}", BytesUtil.binary(send, 16)); } /** @@ -131,10 +132,10 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService { * 公共方法, 发送指令 * @param msg */ - private void send(AbsEBikeMessage msg) throws Exception { - this.send(msg, 3, TimeUnit.SECONDS); + private byte[] send(AbsEBikeMessage msg) throws Exception { + return this.send(msg, 3, TimeUnit.SECONDS); } - private void send(AbsEBikeMessage msg, long timeout, TimeUnit unit) throws Exception { + private byte[] send(AbsEBikeMessage msg, long timeout, TimeUnit unit) throws Exception { String pileSn = msg.getPhysicalId() + ""; byte[] messageBytes = msg.getMessageBytes(); // PileChannelEntity.output(); @@ -181,6 +182,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService { } // 移除容器 RpcUtil.getSyncPromiseMap().remove(msgId); + return rpcResponse; } }