mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
新增协议0x65预约充电启动结果上传
This commit is contained in:
@@ -8,8 +8,11 @@ import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.dto.ReservationChargingStartupResult;
|
||||
import com.jsowell.pile.service.PileBasicInfoService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -21,6 +24,9 @@ public class ReservationChargingStartupResultHandler extends AbstractHandler{
|
||||
|
||||
private final String type = YKCUtils.frameType2Str(YKCFrameTypeCode.RESERVATION_CHARGING_STARTUP_RESULT_CODE.getBytes());
|
||||
|
||||
@Autowired
|
||||
private PileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
YKCOperateFactory.register(type, this);
|
||||
@@ -76,6 +82,15 @@ public class ReservationChargingStartupResultHandler extends AbstractHandler{
|
||||
transactionCode, pileSn, connectorCode, vinCode, startupResult, failReason);
|
||||
|
||||
|
||||
ReservationChargingStartupResult chargingStartupResult = ReservationChargingStartupResult.builder()
|
||||
.transactionCode(transactionCode)
|
||||
.pileSn(pileSn)
|
||||
.connectorCode(connectorCode)
|
||||
.vinCode(vinCode)
|
||||
.startupResult(startupResult)
|
||||
.failReason(failReason)
|
||||
.build();
|
||||
pileBasicInfoService.startupResult(chargingStartupResult);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user