mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
新增 相机主动发送订阅消息处理方法
This commit is contained in:
@@ -73,16 +73,16 @@ public class CameraService {
|
||||
public void receiveIdentifyResults(JSONObject jsonObject) throws InterruptedException {
|
||||
// 区分入场和出场
|
||||
Integer parking_state = jsonObject.getJSONObject("parking").getInteger("parking_state");
|
||||
if (parking_state == 1) {
|
||||
if (parking_state == Constants.one) {
|
||||
// 入场
|
||||
String parkingState = "ENTRY";
|
||||
String result = vehicleEntry(jsonObject, parkingState);
|
||||
logger.info("车辆入场处理 result:{}", result);
|
||||
}
|
||||
if (parking_state == 2) {
|
||||
if (parking_state == Constants.two) {
|
||||
// 在场
|
||||
}
|
||||
if (parking_state == 4) {
|
||||
if (parking_state == Constants.four) {
|
||||
// 出场
|
||||
vehicleLeave(jsonObject);
|
||||
}
|
||||
@@ -346,13 +346,13 @@ public class CameraService {
|
||||
|
||||
// 判断降锁是否成功
|
||||
// 将此降锁指令存入缓存, 在 nettyServer 收到新消息时判断是否是此消息的回复
|
||||
String redisKey = "plate_number_occupy_order:" + msgId;
|
||||
String redisKey = CacheConstants.SEND_DROP_LOCK_COMMOND + msgId;
|
||||
redisCache.setCacheObject(redisKey, command, 5, TimeUnit.MINUTES);
|
||||
|
||||
// 延时 3 秒钟, 再查询缓存中是否有此降锁信息的回复
|
||||
Thread.sleep(3);
|
||||
|
||||
String responseRedisKey = "plate_number_occupy_order_response:" + msgId;
|
||||
String responseRedisKey = CacheConstants.GROUND_LOCK_DEVICE_REPORT + msgId;
|
||||
Object cacheObject = redisCache.getCacheObject(responseRedisKey);
|
||||
return cacheObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user