update 预约充电响应

This commit is contained in:
Guoqs
2024-05-21 10:05:57 +08:00
parent b91f6689a6
commit 8c7a341fca
6 changed files with 17 additions and 63 deletions

View File

@@ -22,6 +22,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.List;
@@ -218,9 +220,16 @@ public class PileRemoteService {
if (pileFirmwareInfo == null) {
throw new BusinessException(ReturnCodeEnum.CODE_FIRMWARE_NOT_FOUND_ERROR);
}
String ip;
try {
ip = InetAddress.getByName(serverAddress).getHostAddress();
} catch (UnknownHostException e) {
throw new BusinessException("", "无法解析出IP");
}
UpdateFirmwareCommand command = UpdateFirmwareCommand.builder()
.pileSnList(dto.getPileSns())
.serverAddress(serverAddress)
.serverAddress(ip)
.port(port)
.username(username)
.password(password)
@@ -252,7 +261,7 @@ public class PileRemoteService {
/**
* 预约充电指令
*/
public void reserveCharging(ReserveChargingCommand command) {
ykcPushCommandService.pushReserveChargingCommand(command);
public void reservedCharging(ReservedChargingCommand command) {
ykcPushCommandService.pushReservedChargingCommand(command);
}
}