|
@@ -15,6 +15,7 @@ import com.community.huiju.service.IHKService;
|
15
|
15
|
import com.community.huiju.service.ImageServiceI;
|
16
|
16
|
import com.google.common.collect.Maps;
|
17
|
17
|
import lombok.extern.slf4j.Slf4j;
|
|
18
|
+import org.apache.commons.collections.CollectionUtils;
|
18
|
19
|
import org.springframework.beans.factory.annotation.Autowired;
|
19
|
20
|
import org.springframework.http.HttpEntity;
|
20
|
21
|
import org.springframework.http.HttpHeaders;
|
|
@@ -216,7 +217,8 @@ public class FaceServicelimpl implements FaceServiceI {
|
216
|
217
|
// 设备树
|
217
|
218
|
TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(communityId);
|
218
|
219
|
// 所有设备
|
219
|
|
- List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(communityId, unitId, 4);
|
|
220
|
+ // List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(communityId, unitId, 4);
|
|
221
|
+ List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitIdAndFace(communityId, unitId, 4);
|
220
|
222
|
List<Map<String, Object>> equipmentUUID = getEquipmentUUID(tpEquipments);
|
221
|
223
|
StringBuilder doorUuids = new StringBuilder();
|
222
|
224
|
StringBuilder deviceUuids = new StringBuilder();
|
|
@@ -243,12 +245,14 @@ public class FaceServicelimpl implements FaceServiceI {
|
243
|
245
|
|
244
|
246
|
// 单元门口机
|
245
|
247
|
List<TpEquipment> visualEquipments = tpEquipmentMapper.selectByCommunityIdAndUnitId(communityId, unitId, 3);
|
246
|
|
- List<String> visualList = visualEquipments.stream()
|
247
|
|
- .map(e-> tpConfigurationMapper.selectByPrimaryKey(e.getUuidId()).getConfigurationValue())
|
248
|
|
- .collect(Collectors.toList());
|
|
248
|
+ if (CollectionUtils.isNotEmpty(visualEquipments)) {
|
|
249
|
+ List<String> visualList = visualEquipments.stream()
|
|
250
|
+ .map(e-> tpConfigurationMapper.selectByPrimaryKey(e.getUuidId()).getConfigurationValue())
|
|
251
|
+ .collect(Collectors.toList());
|
249
|
252
|
// List<String> visualList = new ArrayList<>();
|
250
|
253
|
// visualList.add("10010100000");
|
251
|
|
- HKOpenApi.visualIntercom(tpEquipmentTree.getOpUserUuid(), 1, userIdList, visualList, tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
|
|
254
|
+ HKOpenApi.visualIntercom(tpEquipmentTree.getOpUserUuid(), 1, userIdList, visualList, tpEquipmentTree.getAppkey(), tpEquipmentTree.getSecret(), tpEquipmentTree.getHttpServer());
|
|
255
|
+ }
|
252
|
256
|
} else {
|
253
|
257
|
responseBean.addError("请录入正确图片");
|
254
|
258
|
}
|