Browse Source

FVO-45 台账管理--系统台账--建筑楼层按全部查询无效问题修复

linhuili 3 years ago
parent
commit
3349357da4

+ 26 - 1
src/main/java/com/persagy/proxy/adm/controller/AdmSystemController.java

@@ -285,7 +285,7 @@ public class AdmSystemController {
             if(JSONUtil.isNull(criteria)){
                 return AdmResponse.failure("请求参数错误");
             }
-            if (StrUtil.isAllNotEmpty(buildingId, floorId)) {
+            if (StrUtil.isNotEmpty(floorId)) {
                 if(!"1".equals(floorId)){
                     //case two 明确建筑、明确楼层的 系统
                     JSONObject relationFrom = new JSONObject();
@@ -310,6 +310,31 @@ public class AdmSystemController {
                     admSystemList = dealBdFlInfo(floorId,buildingId,admSystemList);
                     syses.setContent(admSystemList);
                 }
+            }else if(StrUtil.isEmpty(floorId) && StrUtil.isNotEmpty(buildingId)){
+                if(!"1".equals(buildingId)){
+                    //case two 明确建筑、明确楼层的 系统
+                    JSONObject relationFrom = new JSONObject();
+                    relationFrom.put("relCode", "Sy2Bd");
+                    relationFrom.put("graphCode", "MechInArch");
+                    relationFrom.put("objTo", buildingId);
+                    criteria.putPOJO("relationFrom",relationFrom);
+                    rwdQueryCriteria.setCriteria(criteria);
+                    syses = service.doQuery(AdmContextUtil.toDmpContext(), rwdQueryCriteria, AdmSystem.class);
+                    if (CollUtil.isNotEmpty(syses.getContent())) {
+                        admSystemList = (List<AdmSystem>) syses.getContent();
+                    }
+
+                }else if("1".equals(buildingId)){
+                    //case three 明确建筑 不明确楼层
+                    admSystemList = queryNotSureObj(buildingId, rwdQueryCriteria);
+                    //处理通用返回结果
+                    dealRespose(syses, request);
+                }
+                if(CollUtil.isNotEmpty(admSystemList)){
+                    //处理数据 BuildingFloorInfo
+                    admSystemList = dealBdFlInfo(floorId,buildingId,admSystemList);
+                    syses.setContent(admSystemList);
+                }
             }else{
                 //处理通用返回结果
                 dealRespose(syses, request);