浏览代码

fix bug:/dict/query接口返回信息点的path键的判断逻辑问题

lijie 3 年之前
父节点
当前提交
eda674a820

+ 39 - 18
src/main/java/com/persagy/proxy/dictionary/service/impl/AbstractAdmDictBaseServiceImpl.java

@@ -44,9 +44,15 @@ import java.util.Set;
 @Slf4j
 public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T> {
 
-    private static final Set<String> TABLE_INFOS=CollUtil.newHashSet("id","code","localId",
-            "localName","groupCode","projectId","objType","classCode","grouping","virtualCodes","createApp","updateApp",
-            "creator","creationTime","modifier","modifiedTime","valid","floorSequenceID");
+    private static final Set<String> TABLE_INFOS=CollUtil.newHashSet("id","name","localId","localName",
+            "qRCodePic","defaultQRCode","rFID","cADID","bimId","bimTypeId","bimLocation","bimFamilyName",
+            "bimFamilySymbol","equipSerial","modelId","note","introduction","businessFloorNum","officeFloorNum",
+            "shaftSequenceId","outline","buildQRCode","bimIdPre","floorSequenceId","floorSequenceID",
+            "permanentPeopleNum","floorIdentity","depth","width","buildArea","netArea","height","intro",
+            "ratedCoolingP","ratedHeatingP","acType","zoneOrientation","roomFuncType","roomSerial",
+            "projRoomFuncType","ratedLightP","zoneType","tenantType","tenant","elecCap","pollutionDegree",
+            "groupCode","projectId","objType","classCode","grouping","virtualCodes","createApp","updateApp",
+            "creator","creationTime","modifier","modifiedTime","valid");
 
     @Autowired
     private DmpRwdClient rwdClient;
@@ -207,27 +213,42 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
             admVO.setSort(admVO.getShowOrder());
 
             //path路径处理
-//            if(StringUtils.isEmpty(admVO.getFirstName())
-//                    || AdmDictConstant.FIRST_BASE_TAG.equals(admVO.getFirstName())
-//                    || AdmDictConstant.HIS_FIRST_BASE_TAG.equals(admVO.getFirstName())
-//                    || AdmDictConstant.HIS_FIRST_BASE_TAG_TWO.equals(admVO.getFirstName())){
-//                admVO.setPath(admVO.getCode());
-//            }else{
-//                admVO.setPath(AdmDictConstant.INFOS_EX+admVO.getCode());
-//            }
-            if (TABLE_INFOS.contains(admVO.getCode())){
-                admVO.setPath(admVO.getCode());
-            }else {
-                admVO.setPath(AdmDictConstant.INFOS_EX+admVO.getCode());
-            }
-
+            handleObjectInfoPath(admVO);
             //信息点是否可见设置默认值
             if(admVO.getVisible() == null){
                 admVO.setVisible(false);
             }
         }
     }
-
+    /***
+     * Description: 处理信息点的path
+     * @param admVO : 信息点对象
+     * @return : void
+     * @author : lijie
+     * @date :2021/11/3 13:29
+     * Update By lijie 2021/11/3 13:29
+     */
+    private void handleObjectInfoPath(AdmObjectInfo admVO) {
+        if(StrUtil.isNotBlank(admVO.getClassCode())
+                && StrUtil.isNotBlank(admVO.getCode())
+                && "height".equals(admVO.getCode())){
+            // 特殊处理height信息点
+            admVO.setPath(AdmDictConstant.INFOS_EX+admVO.getCode());
+            return;
+        }
+        if (TABLE_INFOS.contains(admVO.getCode())
+                || ((AdmDictConstant.FIRST_BASE_TAG.equals(admVO.getFirstName())
+                || AdmDictConstant.HIS_FIRST_BASE_TAG.equals(admVO.getFirstName())
+                || AdmDictConstant.HIS_FIRST_BASE_TAG_TWO.equals(admVO.getFirstName()))
+                && "pic".equals(admVO.getCode()))){
+            // 1)表字段信息中包含的
+            // 2)第一个名称为基本参数并且信息点为pic的
+            admVO.setPath(admVO.getCode());
+            return;
+        }
+        // 其余信息点带info.
+        admVO.setPath(AdmDictConstant.INFOS_EX+admVO.getCode());
+    }
 
 
     /**