# health **Repository Path**: i3cloud/health ## Basic Information - **Project Name**: health - **Description**: No description available - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-19 - **Last Updated**: 2021-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 健康码协议 # ## 1.3.安卓设备通讯 ### 1.3.1上线报到:(不能使用门禁协议FE指令) 设备->服务器: ```json { "action":"v_device_reg", "device_type":"yfv02", "serialno":"12345678", "mac":"12345678", "to":"0", "data": [ { "door_type":1, //设备类型 "door_ip":"192.168.1.115", "door_port":"5680", "door_app_version":"V1.0.1", "door_os_version":"EMUI 10.2.1", "sim_ccid":"89860041191883442026" } ] } ``` 服务器->设备: ```json { "code":"0", "action":"v_device_reg", "device_type":"yfv02", "serialno":"12345678", "mac":"12345678", "to":"0", "data": [ { "msg_info":"device registered successfully" } ] } ``` ### 1.3.2参数同步申请事件 设备->服务器: ```json { "action":"v_get_parameters", "device_type":"yfh01", "serialno":"12345678", "mac":"12345678", "to":"0", "data": [ { "msg_info":"" } ] } ``` 服务器->设备: ```json { "code": 0, "action": "v_get_parameters", "device_type": "yfh01", "serialno": "12345678", "mac": "0", "to": "12345678", "data": [ { "door_id": 161, "door_type": 1, "age_id": 10, "account_id": 1, "community_id": 0, "unit_id": 0, "floor_id": 0, "room_id": 0, "door_addr": 0, "door_name": "xxxxxxx", "door_mac": "12345678", "door_ip": "192.168.1.115", "door_port": 5680, "door_app_version": "V1.0.1", "door_os_version": "EMUI 10.2.1", "door_qr_code": null, "door_status": 0, "face_enable": 0, "iccard_enable": 1, "common_psw_enable": 0, "user_psw_enable": 0, "open_delay": 5, "common_psw": "123456", "body_temperature_enable": 0, "body_temperature_value": "37", "mask_check": 0, "check_health_code": 0, "check_id_card": 0, "similarity": 80, "similarity_ir": 80, "liveness_detection": 60, "sim_ccid": "89860041191883442026", "take_pic": 0, "record_autoupload": 1, "dual_card_open": 0, "normal_open": null, "is_duty_record": 0, "boxs_parameters": null, "door_last_heart_beat": "2021-10-19 17:40:56", "door_ble_parameters": null, "door_other_parameters": null, "create_time": null, "created_at": "2021-10-02 20:16:38", "updated_at": "2021-10-19 17:40:56" } ] } ``` ### 1.3.3上报记录事件 设备->服务器: ```json { "action":"v_uplaod_record", "device_type":"yfh01", "serialno":"12345678", "mac":"12345678", "to":"0", "data": [ { "record_id":"1256", "temperature":"36.5", "record_pic":"base64JPG" } ] } ``` 服务器->设备: ```json { "code":"0", "action":"v_uplaod_record", "device_type":"yfh01", "serialno":"12345678", "mac":"0", "to":"12345678", "data": [ { "msg_info":"success" } ] } ``` ### 1.3.4上报扫健康码事件 设备->服务器: ```json { "action":"v_up_qrcode", "device_type":"yfh01", "serialno":"12345678", "mac":"12345678", "to":"0", "data":[ { "qrcode":"https://www.xxxx.xxxx?xxxx", "time":"2021-10-02 12:12:12" } ] } ``` 服务器->设备: ```json { "code":"0", "action":"v_up_qrcode", "device_type":"yfh01", "serialno":"12345678", "mac":"0", "to":"12345678", "data":[ { "code_id":"1", "name":"张三丰", "trips":"xxxx", "record_id":"1256" } ] } ``` 字段说明: Code: 接口访问 0. 成功 1.失败 2.其他异常 code_id: 健康码或者形成码结果: 0:未知 1:绿码 2: 黄码 3:红码, 4.行程异常, 5.核算异常, 6.疫苗接种异常.只绿码通行,其他一概拒绝通行 ### 1.3.5上报刷身份证事件 设备->服务器: ```json { "action":"v_up_idcard", "device_type":"yfh01", "serialno":"12345678", "mac":"12345678", "to":"0", "data":[ { "user_card":"450821199909192515", "user_name":"张三丰", "user_temperature":"36.5", "user_sex":"男", "user_addr":"白云天省九阴市白骨洞区神仙村16号", "user_nation":"魔族", "user_birthday":"2021-10-02", "user_valid":"2021-10-02", "user_exp":"2091-10-02", "time":"2021-10-02 12:12:12" } ] } ``` 服务器->设备: ```json { "code":"0", "action":"v_up_qrcode", "device_type":"yfh01", "serialno":"12345678", "mac":"0","to":"12345678", "data":[ { "code_id":"1", "name":"张三丰", "trips":"xxxx", "record_id":"1256" } ] } ``` 字段说明: 同1.3.4