From 153f2187046f2b5d640cb937e0a385def8dd4648 Mon Sep 17 00:00:00 2001 From: 许鹏程 <1821349743@qq.com> Date: 星期四, 28 十一月 2024 17:37:15 +0800 Subject: [PATCH] 故障上报 设备台账 --- src/main/java/com/product/mobile/core/service/FaceMobileService.java | 28 +++++++++++++++++++++++----- 1 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/product/mobile/core/service/FaceMobileService.java b/src/main/java/com/product/mobile/core/service/FaceMobileService.java index 317aebc..8570b5f 100644 --- a/src/main/java/com/product/mobile/core/service/FaceMobileService.java +++ b/src/main/java/com/product/mobile/core/service/FaceMobileService.java @@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject; import com.drew.metadata.Face; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.product.common.lang.StringUtils; import com.product.core.cache.DataPoolCacheImpl; @@ -312,7 +313,7 @@ if (CollectionUtil.isEmpty(groupMap)) { throw new BaseException(MobileCoreCode.GET_FACE_CONFIG_FAIL); } - + Map<String, Map<String, Object>> group = new HashMap<>(); List<FaceFieldEntity> result = new ArrayList<>(); Map<String, List<FieldSetEntity>> subTableFieldMap = new HashMap<>(); for (FieldSetEntity fs : tagFieldSetEntityList) { @@ -322,11 +323,28 @@ continue; } List<FieldSetEntity> fieldSetEntity = productSysFaceControlProperty.getFieldSetEntity(parentUuid); - if (CollectionUtil.isEmpty(fieldSetEntity)) { - continue; - } - + int i = result.size(); to(groupMap, fieldSetEntity, subTableFieldMap, result, parentMap); + String parentUuid1 = fieldSetEntity.get(0).getString("parent_uuid"); + if (!CollectionUtil.isEmpty(fieldSetEntity) && !StringUtils.isEmpty(parentUuid1)) { + if (i + 1 == result.size()) { + Map<String, Object> o = group.get(parentUuid1); + if (o == null) { + List<FieldSetEntity> fieldSetEntity1 = productSysFaceControlProperty.getFieldSetEntity(parentUuid1); + List<FieldSetEntity> fieldSetEntity2 = productSysFaceControlProperty.getFieldSetEntity(fieldSetEntity1.get(0).getString("parent_uuid")); + List<FieldSetEntity> fieldSetEntities = groupMap.get(fieldSetEntity2.get(0).getString("group_uuid")); + //list杞琺ap + Map<String, Object> map = new HashMap<>(); + for (FieldSetEntity fieldSetEntity3 : fieldSetEntities) { + map.put(fieldSetEntity3.getString("property_name"), fieldSetEntity3.getString("property_value")); + } + group.put(parentUuid1, map); + o = map; + } + result.get(i).putOtherParam("parentContainerName", BaseUtil.ifNull(o.get("title"), o.get("label"))); + result.get(i).putOtherParam("parentContainer", parentUuid1); + } + } } //鏍规嵁group_uuid 灏嗗瓙琛ㄥ瓧娈靛垎缁�5 if (!CollectionUtil.isEmpty(subTableFieldMap)) { -- Gitblit v1.9.2