三方订单启动前检查
This commit is contained in:
parent
c4a66a63f1
commit
4e8d126a6b
@ -42,7 +42,6 @@ public class QueryStartChargeController {
|
|||||||
String startChargeSeq = startChargeRequest.getStartChargeSeq();
|
String startChargeSeq = startChargeRequest.getStartChargeSeq();
|
||||||
String connectorID = startChargeRequest.getConnectorId();
|
String connectorID = startChargeRequest.getConnectorId();
|
||||||
String operatorId = startChargeSeq.substring(0, 9);
|
String operatorId = startChargeSeq.substring(0, 9);
|
||||||
//Checking the operator whether it has its token.
|
|
||||||
Optional<AuthSecretToken> authSecretTokenIn =
|
Optional<AuthSecretToken> authSecretTokenIn =
|
||||||
authSecretTokenRepository.findByOperatorId3irdptyAndSecretTokenType(operatorId, "IN");
|
authSecretTokenRepository.findByOperatorId3irdptyAndSecretTokenType(operatorId, "IN");
|
||||||
if (!authSecretTokenIn.isPresent()) {
|
if (!authSecretTokenIn.isPresent()) {
|
||||||
@ -51,7 +50,16 @@ public class QueryStartChargeController {
|
|||||||
startChargeResponse.setStartChargeSeqStat(5);
|
startChargeResponse.setStartChargeSeqStat(5);
|
||||||
resp.setMsg("This 3rd has no token");
|
resp.setMsg("This 3rd has no token");
|
||||||
} else {
|
} else {
|
||||||
// invoke an order making interface(finished);
|
Map<String, Object> cacheGun = REDIS.getCacheMap("gun:".concat(connectorID));
|
||||||
|
String terminalStatus = (String) cacheGun.get("vehicleGunStatus");
|
||||||
|
String status = (String) cacheGun.get("status");
|
||||||
|
if (!"空闲".equals(status)) {
|
||||||
|
resp.setMsg("终端状态异常:[".concat(status == null ? "未注册" : status).concat("]"));
|
||||||
|
resp.setRet("500");
|
||||||
|
} else if ("否".equals(terminalStatus)) {
|
||||||
|
resp.setMsg("未插枪");
|
||||||
|
resp.setRet("500");
|
||||||
|
} else {
|
||||||
String plateNum = startChargeRequest.getPlateNum();
|
String plateNum = startChargeRequest.getPlateNum();
|
||||||
plateNum = plateNum == null ? startChargeRequest.getPlateNum2() : plateNum;
|
plateNum = plateNum == null ? startChargeRequest.getPlateNum2() : plateNum;
|
||||||
R res = pileOrderService.pileStartUpBy3rd(startChargeSeq, startChargeRequest.getDriverId(),
|
R res = pileOrderService.pileStartUpBy3rd(startChargeSeq, startChargeRequest.getDriverId(),
|
||||||
@ -97,6 +105,7 @@ public class QueryStartChargeController {
|
|||||||
}
|
}
|
||||||
resp.setMsg(res.getMsg());
|
resp.setMsg(res.getMsg());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
resp.setData(JSONUtil.toJSONString(startChargeResponse));
|
resp.setData(JSONUtil.toJSONString(startChargeResponse));
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user