mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-29 23:50:00 +08:00
update 电单车
This commit is contained in:
@@ -5,6 +5,7 @@ import com.jsowell.common.protocol.SyncPromise;
|
||||
import com.jsowell.common.util.*;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import com.jsowell.pile.domain.ebike.deviceupload.ChargingOperationResponse;
|
||||
import com.jsowell.pile.domain.ebike.serversend.EBikeMessageCmd82;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.StopChargingCommand;
|
||||
@@ -31,7 +32,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
* 电单车发送启动充电指令
|
||||
*/
|
||||
@Override
|
||||
public void sendStartChargingCommand(StartChargingCommand command) throws Exception {
|
||||
public ChargingOperationResponse sendStartChargingCommand(StartChargingCommand command) throws Exception {
|
||||
String pileSn = command.getPileSn();
|
||||
String connectorCode = command.getConnectorCode();
|
||||
String transactionCode = command.getTransactionCode();
|
||||
@@ -75,8 +76,9 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
data.setFullChargePower(0);
|
||||
data.setMaxFullChargePowerCheckTime(0);
|
||||
message.setData(data);
|
||||
byte[] send = this.send(message);
|
||||
log.info("电单车发送启动充电指令response:{}", BytesUtil.binary(send, 16));
|
||||
byte[] response = this.send(message);
|
||||
log.info("电单车发送启动充电指令response:{}", BytesUtil.binary(response, 16));
|
||||
return new ChargingOperationResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +86,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
* @param command
|
||||
*/
|
||||
@Override
|
||||
public void sendStopChargingCommand(StopChargingCommand command) throws Exception {
|
||||
public ChargingOperationResponse sendStopChargingCommand(StopChargingCommand command) throws Exception {
|
||||
String pileSn = command.getPileSn();
|
||||
String connectorCode = command.getConnectorCode();
|
||||
String transactionCode = command.getTransactionCode();
|
||||
@@ -124,8 +126,9 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
data.setFullChargePower(0);
|
||||
data.setMaxFullChargePowerCheckTime(0);
|
||||
message.setData(data);
|
||||
byte[] send = this.send(message);
|
||||
log.info("电单车发送停止充电指令response:{}", BytesUtil.binary(send, 16));
|
||||
byte[] response = this.send(message);
|
||||
log.info("电单车发送停止充电指令response:{}", BytesUtil.binary(response, 16));
|
||||
return new ChargingOperationResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user