update 电单车

This commit is contained in:
Guoqs
2024-09-14 14:55:19 +08:00
parent 95a49969b4
commit d2e6a09ab7

View File

@@ -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;
}
}