From d2e6a09ab7c9a33b5f3d28e44b04819197aee841 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Sat, 14 Sep 2024 14:55:19 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=B5=E5=8D=95=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/EBikeSendCommandServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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; } }