mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 预约充电
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package com.jsowell.pile.domain.ykcCommond;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -40,11 +42,15 @@ public class ReservedChargingCommand {
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date reservedStartTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date reservedEndTime;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3114,7 +3114,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
ReservedChargingCommand command = ReservedChargingCommand.builder()
|
||||
.transactionCode(orderInfo.getTransactionCode())
|
||||
.pileSn(orderInfo.getPileSn())
|
||||
.connectorCode(orderInfo.getPileConnectorCode())
|
||||
.connectorCode(orderInfo.getConnectorCode())
|
||||
.operation(BytesUtil.bcd2Str(new byte[]{0x01}))
|
||||
.reservedStartTime(orderInfo.getReservedStartTime())
|
||||
.reservedEndTime(orderInfo.getReservedEndTime())
|
||||
|
||||
@@ -56,7 +56,8 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
private final List<String> frameTypeList = Lists.newArrayList(
|
||||
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_RESTART_CODE.getBytes()),
|
||||
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_CONTROL_START_CODE.getBytes()),
|
||||
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_STOP_CHARGING_CODE.getBytes())
|
||||
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_STOP_CHARGING_CODE.getBytes()),
|
||||
YKCUtils.frameType2Str(YKCFrameTypeCode.RESERVE_CHARGING_CODE.getBytes())
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -108,12 +109,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
channelFuture.addListener((ChannelFutureListener) channelFutureListener -> {
|
||||
// 检查操作的状态
|
||||
if (channelFutureListener.isSuccess()) {
|
||||
log.info("push结果【成功】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
log.info("【push结果===>成功】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
pileSn, channel.remoteAddress(), channel.id(), value, wholeMsg);
|
||||
} else {
|
||||
// 如果发生错误,则访问描述原因的Throwable
|
||||
Throwable cause = channelFutureListener.cause();
|
||||
log.info("push结果【失败】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
log.info("【push结果===>失败】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}",
|
||||
pileSn, channel.remoteAddress(), channel.id(), value, wholeMsg);
|
||||
log.error("push发送命令失败, pileSn:{}", pileSn, cause);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user