魏熙美 hace 6 años
padre
commit
23ed413217

+ 12
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/FaceServicelimpl.java Ver fichero

@@ -105,7 +105,7 @@ public class FaceServicelimpl implements FaceServiceI {
105 105
          * 删除的时候,将所有的海康设备的关联关系删除了,需要重新下发一次
106 106
          */
107 107
         // 下发门禁
108
-        ihkService.pushPerson(activeUser + "", taUserVerify.getId());
108
+        ihkService.pushPerson(activeUser + "", userVerifyId);
109 109
 
110 110
         TaUser user = taUserMapper.selectByPrimaryKey(activeUser);
111 111
         TaFace taFace = new TaFace();
@@ -142,6 +142,12 @@ public class FaceServicelimpl implements FaceServiceI {
142 142
 
143 143
         Integer activeUser = otherUserId == null ? userElement.getId() : otherUserId;
144 144
 
145
+        // 如果家属不为空,获取家属/租客 的房产审核id
146
+        if (null != otherUserId) {
147
+            TaUserVerify otherUserVerify = getTaFaceParentId(userElement, otherUserId);
148
+            userVerifyId = otherUserVerify.getId();
149
+        }
150
+
145 151
         /**
146 152
          * 删除的时候,将所有的海康设备的关联关系删除了,需要重新下发一次
147 153
          */
@@ -205,7 +211,8 @@ public class FaceServicelimpl implements FaceServiceI {
205 211
             /*boolean isA为true进行添加,为false进行修改*/
206 212
             if (0 == type && 1 == faceNum) {
207 213
                 if (null == data) {
208
-                    throw new RuntimeException("海康人脸推送失敗!");
214
+                    log.error("海康人脸推送失败!");
215
+                    throw new RuntimeException("人脸推送失败!");
209 216
                 }
210 217
                 if (isA) {
211 218
                     taFaceMapper.insertSelective(taFace);
@@ -219,6 +226,9 @@ public class FaceServicelimpl implements FaceServiceI {
219 226
                 // 所有设备
220 227
                 // List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(communityId, unitId, 4);
221 228
                 List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitIdAndFace(communityId, unitId, 4);
229
+                if (CollectionUtils.isEmpty(tpEquipments)) {
230
+                    throw new WisdomException("未配置设备!");
231
+                }
222 232
                 List<Map<String, Object>> equipmentUUID = getEquipmentUUID(tpEquipments);
223 233
                 StringBuilder doorUuids = new StringBuilder();
224 234
                 StringBuilder deviceUuids = new StringBuilder();

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Ver fichero

@@ -392,6 +392,13 @@ public class TaUserServiceImpl implements ITaUserService {
392 392
         TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
393 393
         List<TaUser> userList = taUserMapper.selectHouseUserList(userElement.getCommunityId(), userVerify.getPhaseId(), userVerify.getBuildingId(), userVerify.getUnitId(), userVerify.getLevelId(), userVerify.getRoomNoId(), userElement.getId());
394 394
 
395
+        userList.stream().forEach(e-> {
396
+            // 如果有人脸图片,则显示人脸图片信息
397
+            if (StringUtils.isNotBlank(e.getFaceImg())) {
398
+                e.setHeadPortrait(e.getFaceImg());
399
+            }
400
+        });
401
+
395 402
         responseBean.addSuccess(userList);
396 403
         return responseBean;
397 404
     }

+ 3
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Ver fichero

@@ -360,9 +360,11 @@
360 360
     tu.face_status as faceStatus,
361 361
     tuv.verify_status as userVerifyStatus,
362 362
     tuv.id as userVerifyId,
363
-    tsr.role_name as roleName
363
+    tsr.role_name as roleName,
364
+    tf.face_img as faceImg
364 365
     FROM ta_user tu INNER JOIN ta_user_verify tuv ON tu.id = tuv.user_id
365 366
     INNER JOIN ta_sys_role tsr ON tuv.role_id = tsr.id
367
+    LEFT JOIN ta_face tf ON tf.ta_user_verify_id = tuv.id
366 368
     WHERE
367 369
 	tuv.community_id = #{communityId}
368 370
 	AND tuv.phase_id = #{phaseId}