update 预约启动

This commit is contained in:
Guoqs
2024-07-08 11:06:11 +08:00
parent 8ad38bd2ac
commit c0516b6daf
3 changed files with 22 additions and 18 deletions

View File

@@ -184,7 +184,7 @@ public class PileReservationInfoServiceImpl implements PileReservationInfoServic
}
// 如果 vinCodes 的数量少于 3用 "0" 补足
while (vinCodes.size() < 3) {
vinCodes.add("0");
vinCodes.add("");
}
String type = StringUtils.equals(pileReservationInfo.getReservationType(), "single") ? "00" : "01";

View File

@@ -508,24 +508,14 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
// VIN1
String vin1 = command.getVin1();
if (StringUtils.isBlank(vin1)) {
vin1 = Constants.ZERO;
}
// byte[] vin1ByteArr = BytesUtil.str2Bcd(vin1);
byte[] vin1ByteArr = BytesUtil.str2Asc(vin1);
vin1ByteArr = BytesUtil.ensureLength(vin1ByteArr, 17);
String vin2 = command.getVin2();
if (StringUtils.isBlank(vin2)) {
vin2 = Constants.ZERO;
}
byte[] vin2ByteArr = BytesUtil.str2Asc(vin2);
vin2ByteArr = BytesUtil.ensureLength(vin2ByteArr, 17);
String vin3 = command.getVin3();
if (StringUtils.isBlank(vin3)) {
vin3 = Constants.ZERO;
}
byte[] vin3ByteArr = BytesUtil.str2Asc(vin3);
vin3ByteArr = BytesUtil.ensureLength(vin3ByteArr, 17);