Browse Source

fix 字典类型查询 项目信息点按照需求过滤所需字段

lvxianyun 2 years ago
parent
commit
731e4f7d7a

+ 7 - 10
adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/service/impl/AdmDictServiceImpl.java

@@ -404,11 +404,6 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         //查询类型下的所有信息点信息
         AdmResponse admResponse = doQueryObjectInfo(context, request, AdmDictConstant.CLASS_CODE, clazz);
         List<AdmObjectInfo> admObjectInfos = (List<AdmObjectInfo>) admResponse.getContent();
-        //项目信息点 进行定制过滤
-        if(request.getType().equals(AdmProject.OBJ_TYPE)){
-            admObjectInfos = filterInfosForProject(admObjectInfos);
-            admResponse.setTotal(admObjectInfos.size()*1L);
-        }
         admObjectInfos = sortFuncidForEdit(admObjectInfos);
         //查询平台级信息点采集信息
         List<ObjectInfoCollect> commonObjectInfoCollect = queryObjectInfoCollect(context, "common", request.getType(), clazz);
@@ -451,6 +446,11 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         }else{
             setOnlyQueryObjectInfoVisiable(admObjectInfos,commonObjectInfoCollectMap,dictType);
         }
+        //项目信息点 进行定制过滤
+        if(request.getType().equals(AdmProject.OBJ_TYPE)){
+            admObjectInfos = filterInfosForProject(admObjectInfos);
+            admResponse.setTotal(admObjectInfos.size()*1L);
+        }
         admResponse.setContent(admObjectInfos);
         return admResponse;
     }
@@ -609,6 +609,7 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
             //criteria.setFilters("groupCode = '"+context.getGroupCode()+"' and projectId = '"+context.getProjectId()+"'");
             criteria.setFilters(" projectId = '"+context.getProjectId()+"'");
         }
+        criteria.addFilters(" deliveryType = 0 and is_delivery = 1");
         criteria.setName(classCode);
         AdmResponse admResponse = doQueryObjectInfoCollect(context, criteria, "classCode", clazz);
         return (List<ObjectInfoCollect>) admResponse.getContent();
@@ -635,10 +636,6 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         if(CollUtil.isEmpty(list)){
             return Collections.emptyList();
         }
-        List<String> projectCodes = Arrays.asList("businessOpeningTime","owner","property","designer","constructor","contractor","longitude",
-                "latitude","sFI","address","projUnderfloorNum","fireResistanceLev","projNeighborLocationMap","projLogo","projIntro",
-                "projHeight","projFuncType","projCoverArea","projCityLocationMap","projArea","assetManager");
-
         list.forEach(code -> {
             if(code.getCode().equals("constructor")){
                 code.setCode("contractor");
@@ -646,7 +643,7 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
                 code.setPath("infos.contractor");
             }
         });
-        return list.stream().filter(info -> projectCodes.contains(info.getCode())).collect(Collectors.toList());
+        return list.stream().filter(info -> info.getVisible()==true).collect(Collectors.toList());
     }
     /**
      * 统计类型下的非静态信息点