mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-25 21:45:08 +08:00
Merge branch 'dev' of http://192.168.2.46:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -340,7 +340,7 @@ public class PileRemoteService {
|
||||
String failedReason = BytesUtil.bcd2Str(failedReasonByteArr);
|
||||
String failedReasonMsg = ChargingFailedReasonEnum.getMsgByCode(Integer.parseInt(failedReason, 16));
|
||||
|
||||
log.info("0x59预约充电响应sync, 交易流水号:{}, 桩SN:{}, 枪口号:{}, 结果:{}, 失败原因:{}",
|
||||
log.info("0x59预约充电响应sync, 交易流水号:{}, 桩SN:{}, 枪口号:{}, 结果(00-失败; 01成功):{}, 失败原因:{}",
|
||||
transactionCode, pileSn, connectorCode, resultCode, failedReasonMsg);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.enums.ykc.PileChannelEntity;
|
||||
import com.jsowell.pile.domain.ebike.AbsEBikeMessage;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 电单车发送指令service
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class EBikeSendCommandService {
|
||||
|
||||
/**
|
||||
* 公共方法发送指令
|
||||
* @param pileSn 装编号
|
||||
* @param msg 消息
|
||||
* @param timeout 超时时间
|
||||
* @param unit 时间单位
|
||||
*/
|
||||
private void sendCommand(String pileSn, Class<? extends AbsEBikeMessage> msg, long timeout, TimeUnit unit) {
|
||||
// 通过桩编号获取channel
|
||||
ChannelHandlerContext ctx = PileChannelEntity.getChannelByPileSn(pileSn);
|
||||
if (Objects.isNull(ctx)) {
|
||||
log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", "value", pileSn);
|
||||
throw new NullPointerException("channel");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3826,8 +3826,36 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
.reason(chargingStartupResult.getFailReason())
|
||||
.build();
|
||||
|
||||
BigDecimal sharpElectricityPrice = BigDecimal.ZERO;
|
||||
BigDecimal sharpServicePrice = BigDecimal.ZERO;
|
||||
BigDecimal sharpPrice = BigDecimal.ZERO;
|
||||
|
||||
BigDecimal peakElectricityPrice = BigDecimal.ZERO;
|
||||
BigDecimal peakServicePrice = BigDecimal.ZERO;
|
||||
BigDecimal peakPrice = BigDecimal.ZERO;
|
||||
|
||||
BigDecimal flatElectricityPrice = BigDecimal.ZERO;
|
||||
BigDecimal flatServicePrice = BigDecimal.ZERO;
|
||||
BigDecimal flatPrice = BigDecimal.ZERO;
|
||||
|
||||
BigDecimal valleyElectricityPrice = BigDecimal.ZERO;
|
||||
BigDecimal valleyServicePrice = BigDecimal.ZERO;
|
||||
BigDecimal valleyPrice = BigDecimal.ZERO;
|
||||
|
||||
OrderDetail orderDetail = OrderDetail.builder()
|
||||
.orderCode(orderCode)
|
||||
.sharpElectricityPrice(sharpElectricityPrice)
|
||||
.sharpServicePrice(sharpServicePrice)
|
||||
.sharpPrice(sharpPrice)
|
||||
.peakElectricityPrice(peakElectricityPrice)
|
||||
.peakServicePrice(peakServicePrice)
|
||||
.peakPrice(peakPrice)
|
||||
.flatElectricityPrice(flatElectricityPrice)
|
||||
.flatServicePrice(flatServicePrice)
|
||||
.flatPrice(flatPrice)
|
||||
.valleyElectricityPrice(valleyElectricityPrice)
|
||||
.valleyServicePrice(valleyServicePrice)
|
||||
.valleyPrice(valleyPrice)
|
||||
.delFlag(DelFlagEnum.NORMAL.getValue())
|
||||
.build();
|
||||
|
||||
|
||||
@@ -688,7 +688,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
response = null;
|
||||
}
|
||||
|
||||
log.info("【=====平台下发指令=====】: 预约充电指令, 交易流水号:{}, 桩编号:{}, 枪口号:{}, 操作:{}, 身份验证:{}, 开始时间:{}, 结束时间:{}, 启动金额:{}",
|
||||
log.info("【=====平台下发指令=====】: 预约充电指令, 交易流水号:{}, 桩编号:{}, 枪口号:{}, 操作(01-启动; 02-取消; 03-修改):{}, 身份验证:{}, 开始时间:{}, 结束时间:{}, 启动金额:{}",
|
||||
transactionCode, pileSn, connectorCode, operation, verifyIdentity, DateUtils.formatDateTime(reservedStartTime), DateUtils.formatDateTime(reservedEndTime), amount);
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user