mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 20:15:06 +08:00
update 预约充电响应
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user