From a07b4b6ff1c98dcf81338bb45d59308db7c058a9 Mon Sep 17 00:00:00 2001 From: 李旭东 <woaiguo66@sina.com> Date: 星期五, 03 十一月 2023 17:18:56 +0800 Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe --- hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java index 707b5d1..a5ef6e8 100644 --- a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java @@ -12,6 +12,7 @@ import com.thhy.staff.modules.biz.face.mapper.FaceDeviceMapper; import com.thhy.staff.modules.biz.face.service.FaceServer; import com.thhy.staff.modules.biz.platuser.entity.DoorLis; +import com.thhy.staff.modules.biz.platuser.entity.PlatUser; import com.thhy.staff.modules.biz.platuser.mapper.PlatUserMapper; import com.thhy.staff.utils.MqUtils; import org.checkerframework.checker.units.qual.A; @@ -172,6 +173,23 @@ return userMapper.queryOriStrById(id); } + @Override + public void allPerson(String mess) { + JSONObject jsonObject = JSONObject.parseObject(mess); + JSONArray jsonArray = jsonObject.getJSONArray("person_list"); + for(Object obj : jsonArray){ + JSONObject personJson = JSON.parseObject(obj.toString()); + String faceId = personJson.getString("person_id"); + int count = userMapper.countByFaceId(faceId); + if(count>0)continue; + PlatUser platUser = new PlatUser(); + platUser.setFaceId(faceId); + platUser.setIdNo(personJson.getString("id_card")); + platUser.setRealName(personJson.getString("name")); + userMapper.insertSamplePlatUser(platUser); + } + } + public static void main(String[] args) { JSONObject jsonObject = new JSONObject(); jsonObject.put("method","delete_person"); -- Gitblit v1.9.3