From 824fc5b01d9c80494644c491ea0c426aaa48d7d9 Mon Sep 17 00:00:00 2001
From: 张晓波 <bingbo1993@126.com>
Date: 星期四, 19 十月 2023 13:54:39 +0800
Subject: [PATCH] 苏州配置文件简 化

---
 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorLis.java |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorLis.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorLis.java
index 75a641e..8f345db 100644
--- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorLis.java
+++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/entity/DoorLis.java
@@ -1,5 +1,7 @@
 package com.thhy.staff.modules.biz.platuser.entity;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.thhy.general.annotations.Idkey;
 import lombok.Data;
 
@@ -28,6 +30,10 @@
 
     private String oriStr;
 
+    private Integer cmpType;
+
+    private String captureScore;
+
 
     public DoorLis() {
     }
@@ -35,4 +41,35 @@
     public DoorLis(String oriStr) {
         this.oriStr = oriStr;
     }
+
+    public DoorLis(JSONObject jsonObject) {
+        this.macAddress = jsonObject.getString("dev_sno");
+        long time = jsonObject.getLong("capture_time");
+        this.dateTime = new Date(time);
+        this.employeeNoString = jsonObject.getString("person_id");
+        this.oriStr = jsonObject.getString("capture_img");
+        this.cmpType = jsonObject.getInteger("cmp_type");
+        this.verify = jsonObject.getInteger("capture_status");
+        this.captureScore = jsonObject.getString("capture_score");
+    }
+
+    public static void main(String[] args) {
+        String mess = "{\n" +
+                "    \"dev_sno\": \" 04:12:53:FA:21:DA\",\n" +
+                "    \"token\": \"f9k4l8ds3e92w02d9c82013na0s9\",\n" +
+                "    \"person_id\": 12306,\n" +
+                "    \"person_name\": \"张三\",\n" +
+                "    \"person_temperature\": 36.7,\n" +
+                "    \"person_type\": \"1\",\n" +
+                "    \"id_card\": \"\",\n" +
+                "    \"ic_card\": \"\",\n" +
+                "    \"capture_img\": \"/9i/4aVBORw\",\n" +
+                "    \"capture_score\": \"85.64\",\n" +
+                "    \"capture_time\": \"1610967016235\",\n" +
+                "    \"capture_status\": 1\n" +
+                "}";
+        JSONObject jsonObject = JSON.parseObject(mess);
+        DoorLis doorLis = new DoorLis(jsonObject);
+        System.out.println(doorLis.getName());
+    }
 }

--
Gitblit v1.9.3