- 新增 isRecognizing 标记防止识别过程重复进入 - 在识别开始时设置标记,结束时释放标记 - 多处识别终止和异常处理处均释放识别锁 - 在重量回调中增加去重逻辑,避免同一重量重复触发回调 - 更新 lastCallbackWeight,确保仅在重量变化时触发回调
{ "info": { "_postman_id": "adfceb8d-2c35-41bf-82d9-40b87e10524d", "name": "档口机", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "751386" }, "item": [{ "name": "device获取token", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [], "url": { " raw": "http://device.shuziweidao.com:8889/sys/getEquipmentToken?qrcodeId=3ea47dc0-3cf0-3c2f-909c-265a9a65572e", "protocol": "http", "host": [ "device", "shuziweidao", "com" ], "port": "8889", "path": [ "sys", "getEquipmentToken" ], "query": [{ "key": "qrcodeId", "value": "3ea47dc0-3cf0-3c2f-909c-265a9a65572e" } ] } }, "response": [] }, { "name": "获取配置信息", "request": { "method": "GET", "header": [{ "key": "X-Access-Token", "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NTM4NDIzNDEsInVzZXJuYW1lIjoiYWRtaW4ifQ.gcKT7BeMWNve8NydRmTTrdXW8wdS7W_Ot9kVdtllyuc", "type": "text" } ], "url": { " raw": "http://device.shuziweidao.com:8889/equipment/stEquipment/queryByEquipmentCode?equipmentCode=3ea47dc0-3cf0-3c2f-909c-265a9a65572e", "protocol": "http", "host": [ "device", "shuziweidao", "com" ], "port": "8889", "path": [ "equipment", "stEquipment", "queryByEquipmentCode" ], "query": [{ "key": "equipmentCode", "value": "3ea47dc0-3cf0-3c2f-909c-265a9a65572e" } ] } }, "response": [] }, { "name": "获取业务服务器token", "request": { "method": "GET", "header": [], "url": { " raw": "http://192.168.1.207/gateway/local/sys/getEquipmentToken?qrcodeId=3ea47dc0-3cf0-3c2f-909c-265a9a65572e", "protocol": "http", "host": [ "192", "168", "1", "207" ], "path": [ "gateway", "local", "sys", "getEquipmentToken" ], "query": [{ "key": "qrcodeId", "value": "3ea47dc0-3cf0-3c2f-909c-265a9a65572e" } ] } }, "response": [] }, { "name": "获取人脸数据", "request": { "method": "GET", "header": [{ "key": "X-Access-Token", "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjYW50ZWVuSWQiOiIyOCIsInR5cGUiOiI0IiwidXNlcklkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMSJ9.Jy7Dc2k5FlqUAmGReRn-uEg3Du5gtlyUhXKUMZLlO-E", "type": "text" } ], "url": { "raw": "http://192.168.1.207/gateway/local/stapi/cquser/getUserFaceCache/v2?pageIndex=0", "protocol": "http", "host": [ "192", "168", "1", "207" ], "path": [ "gateway", "local", "stapi", "cquser", "getUserFaceCache", "v2" ], "query": [{ "key": "pageIndex", "value": "0" } ] } }, "response": [] }, { "name": "获取档口菜品信息", "request": { "method": "GET", "header": [{ "key": "X-Access-Token", "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjYW50ZWVuSWQiOiIyOCIsInR5cGUiOiI0IiwidXNlcklkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMSJ9.Jy7Dc2k5FlqUAmGReRn-uEg3Du5gtlyUhXKUMZLlO-E", "type": "text" } ], "url": { " raw": "http://192.168.1.207/gateway/local/zhstapi/zhst/getRestInfoFoodsByType/stall?restId=1678234139391512577&type=0&foodName=西红柿", "protocol": "http", "host": [ "192", "168", "1", "207" ], "path": [ "gateway", "local", "zhstapi", "zhst", "getRestInfoFoodsByType", "stall" ], "query": [{ "key": "restId", "value": "1678234139391512577" }, { "key": "type", "value": "0", "description": "0全部 1餐次" }, { "key": "foodName", "value": "西红柿" } ] } }, "response": [] }, { "name": "通过用户信息获取就餐数据", "request": { "method": "GET", "header": [{ "key": "X-Access-Token", "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjYW50ZWVuSWQiOiIyOCIsInR5cGUiOiI0IiwidXNlcklkIjoiMDAwMDAwMDAwMDAwMDAwMDAwMSJ9.Jy7Dc2k5FlqUAmGReRn-uEg3Du5gtlyUhXKUMZLlO-E", "type": "text" } ], "url": { " raw": "http://192.168.1.207/gateway/local/zhstapi/zhst/getUserNutritionData/face?restId=1678234139391512577&userId=4958698b725b4e89a514fa8552aa5fa3&foodId=1701417944860119041", "protocol": "http", "host": [ "192", "168", "1", "207" ], "path": [ "gateway", "local", "zhstapi", "zhst", "getUserNutritionData", "face" ], "query": [{ "key": "restId", "value": "1678234139391512577" }, { "key": "userId", "value": "4958698b725b4e89a514fa8552aa5fa3" }, { "key": "foodId", "value": "1701417944860119041" } ] } }, "response": [] }, { "name": "提交就餐数据", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { " raw": "http://192.168.1.207/gateway/local/zhstapi/zhst/userEatFood/doubleBalance/face/stall?restId=1678234139391512577&userId=4958698b725b4e89a514fa8552aa5fa3&foodId=1701417944860119041&faceTime&faceEndTime&eatWeight&foodWeight&deviceId", "protocol": "http", "host": [ "192", "168", "1", "207" ], "path": [ "gateway", "local", "zhstapi", "zhst", "userEatFood", "doubleBalance", "face", "stall" ], "body": [{ "appVersion": "1", "deviceId": "abe60247-99d1-3c2a-9f10-c0b76f4b3f3b", "eatWeight": 0.278, "faceEndTime": 1754385701611, "faceTime": 1754385694475, "foodId": "1701417944860119041", "foodWeight": 0.278, "restId": "1678234139391512577", "userId": "1937692681894932481" } ] } }, "response": [] } ] }
灯规则
默认 红 识别到菜 黄 识别到人 绿