update 交易流水号

This commit is contained in:
2023-03-13 15:51:41 +08:00
parent 27608923cb
commit 9a0692a0f6
4 changed files with 8 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ public class StartChargingCommand {
/**
* 交易流水号
*/
private String orderCode;
private String transactionCode;
/**
* 充电桩编号

View File

@@ -138,12 +138,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
public void pushStartChargingCommand(StartChargingCommand command) {
String pileSn = command.getPileSn();
String connectorCode = command.getConnectorCode();
String orderCode = command.getOrderCode();
String transactionCode = command.getTransactionCode();
if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode) ) {
log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
return;
}
if (StringUtils.isEmpty(orderCode)) {
if (StringUtils.isEmpty(transactionCode)) {
log.warn("远程启动充电, 交易流水号不能为空");
return;
}
@@ -156,7 +156,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
byte[] connectorCodeByteArr = BytesUtil.str2Bcd(connectorCode);
// 交易流水号
byte[] orderIdByteArr = BytesUtil.str2Bcd(orderCode);
byte[] orderIdByteArr = BytesUtil.str2Bcd(transactionCode);
// 桩编号
byte[] pileSnByteArr = BytesUtil.str2Bcd(pileSn);
@@ -180,7 +180,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
byte[] msgBody = Bytes.concat(orderIdByteArr, pileSnByteArr, connectorCodeByteArr, logicCardNumByteArr, physicsCardNumByteArr, accountBalanceByteArr);
this.push(msgBody, pileSn, YKCFrameTypeCode.REMOTE_CONTROL_START_CODE);
log.info("【=====平台下发充电指令=====】:订单id:{}, 桩号:{}, 枪口号:{}, 逻辑卡号:{}, 物理卡号:{}, 账户余额:{}",
orderCode, pileSn, BytesUtil.bcd2Str(connectorCodeByteArr), logicCardNum, physicsCardNum, chargeAmount);
transactionCode, pileSn, BytesUtil.bcd2Str(connectorCodeByteArr), logicCardNum, physicsCardNum, chargeAmount);
}
@Override