WIP:三方对接逻辑
This commit is contained in:
parent
2d16fbcd47
commit
5405e51bd9
@ -48,16 +48,22 @@ public class QueryEquipAuthController {
|
||||
equipAuthResponse.setFailReason(2);
|
||||
resp.setMsg("auth denied");
|
||||
} else {
|
||||
equipAuthResponse.setSuccStat(0);
|
||||
Map<String, Object> realTimeTerminalData = REDIS.getCacheMap("gun:".concat(connectorId));
|
||||
String terminalStatus = (String) realTimeTerminalData.get("vehicleGunStatus");
|
||||
if ("否".equals(terminalStatus)) {
|
||||
resp.setMsg("gun is not plugging");
|
||||
String status = (String) realTimeTerminalData.get("status");
|
||||
if (!"空闲".equals(status)) {
|
||||
resp.setMsg("终端状态异常:[".concat(status == null ? "未注册" : status).concat("]"));
|
||||
resp.setRet("1");
|
||||
equipAuthResponse.setSuccStat(1);
|
||||
equipAuthResponse.setFailReason(1);
|
||||
} else if ("否".equals(terminalStatus)) {
|
||||
resp.setMsg("未插枪");
|
||||
resp.setRet("1");
|
||||
equipAuthResponse.setSuccStat(1);
|
||||
equipAuthResponse.setFailReason(1);
|
||||
} else {
|
||||
resp.setMsg("success");
|
||||
equipAuthResponse.setSuccStat(0);
|
||||
equipAuthResponse.setFailReason(0);
|
||||
}
|
||||
|
||||
|
||||
@ -395,7 +395,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
} else {
|
||||
if (cacheMap.get("status") == null) {
|
||||
r.setCode(500);
|
||||
r.setMsg("未知的终端状态,请选择其他终端充电");
|
||||
r.setMsg("未知的终端状态");
|
||||
return r;
|
||||
} else {
|
||||
String statusCache = cacheMap.get("status").toString();
|
||||
@ -412,13 +412,13 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
}
|
||||
if (cacheMap.get("vehicleGunStatus") == null) {
|
||||
r.setCode(500);
|
||||
r.setMsg("未知的枪状态,请选择其他终端充电");
|
||||
r.setMsg("未知的枪状态");
|
||||
return r;
|
||||
} else {
|
||||
String vehicleGunStatus = cacheMap.get("vehicleGunStatus").toString();
|
||||
if (!"是".equals(vehicleGunStatus)) {
|
||||
r.setCode(500);
|
||||
r.setMsg("请插好充电枪");
|
||||
r.setMsg("未插枪");
|
||||
return r;
|
||||
}
|
||||
}
|
||||
@ -482,7 +482,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
r.setData(data);
|
||||
} else {
|
||||
r.setCode(500);
|
||||
r.setMsg("基础设施服务器内部错误");
|
||||
r.setMsg("内部服务调用错误");
|
||||
}
|
||||
return r;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user