mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-16 05:10:04 +08:00
vin码加日志
This commit is contained in:
@@ -109,6 +109,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
length = 17;
|
length = 17;
|
||||||
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
||||||
|
log.info("桩号:{}申请充电VIN码:{}", pileSn, vinCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷卡启动充电
|
* 刷卡启动充电
|
||||||
@@ -154,32 +155,38 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
log.error("刷卡启动充电鉴权 error", e);
|
log.error("刷卡启动充电鉴权 error", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
try {
|
||||||
* TODO VIN码启动充电
|
/**
|
||||||
*/
|
* TODO VIN码启动充电
|
||||||
if (StringUtils.equals("03", startMode)) {
|
*/
|
||||||
// 通过vin码查询数据库绑定用户信息
|
if (StringUtils.equals("03", startMode)) {
|
||||||
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
// 通过vin码查询数据库绑定用户信息
|
||||||
if (plateInfo == null) {
|
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
||||||
throw new BusinessException("", "");
|
if (plateInfo == null) {
|
||||||
}
|
throw new BusinessException("", "未查到绑定用户信息");
|
||||||
if (!StringUtils.equals("1", plateInfo.getVinStatus())) {
|
}
|
||||||
// 1- 正常使用
|
if (!StringUtils.equals("1", plateInfo.getVinStatus())) {
|
||||||
throw new BusinessException("", "");
|
// 1- 正常使用
|
||||||
}
|
throw new BusinessException("", "状态不正确");
|
||||||
// vin码生成订单 vin启动充电
|
}
|
||||||
GenerateOrderDTO dto = new GenerateOrderDTO();
|
// vin码生成订单 vin启动充电
|
||||||
dto.setMemberPlateNumberRelation(plateInfo);
|
GenerateOrderDTO dto = new GenerateOrderDTO();
|
||||||
dto.setPileSn(pileSn);
|
dto.setMemberPlateNumberRelation(plateInfo);
|
||||||
dto.setConnectorCode(connectorCode);
|
dto.setPileSn(pileSn);
|
||||||
dto.setStartMode(StartModeEnum.VIN_CODE.getValue());
|
dto.setConnectorCode(connectorCode);
|
||||||
Map<String, Object> map = orderBasicInfoService.generateOrderByCard(dto);
|
dto.setStartMode(StartModeEnum.VIN_CODE.getValue());
|
||||||
if (map != null) {
|
Map<String, Object> map = orderBasicInfoService.generateOrderByCard(dto);
|
||||||
transactionCode = (String) map.get("transactionCode");
|
if (map != null) {
|
||||||
accountBalanceByteArr = YKCUtils.getPriceByte(String.valueOf(map.get("accountBalance")), 2);
|
transactionCode = (String) map.get("transactionCode");
|
||||||
// 鉴权成功标识 0x00 失败 0x01 成功
|
accountBalanceByteArr = YKCUtils.getPriceByte(String.valueOf(map.get("accountBalance")), 2);
|
||||||
authenticationFlagByteArr = Constants.oneByteArray;
|
// 鉴权成功标识 0x00 失败 0x01 成功
|
||||||
|
authenticationFlagByteArr = Constants.oneByteArray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}catch (BusinessException e){
|
||||||
|
log.error("VIN码启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.error("VIN码启动充电鉴权 error", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 应答
|
// 应答
|
||||||
|
|||||||
Reference in New Issue
Block a user