|
@@ -227,6 +227,7 @@ public class AdmSystemController {
|
|
|
public AdmResponse queryNew(@QueryParam("buildingId") String buildingId,
|
|
|
@QueryParam("floorId") String floorId, @RequestBody AdmQueryCriteria request) throws Exception {
|
|
|
AdmResponse syses = new AdmResponse();
|
|
|
+ List<AdmSystem> admSystemList = new ArrayList<>();
|
|
|
if(StrUtil.isAllEmpty(buildingId,floorId)){
|
|
|
//case one 查询全部系统,级联建筑,建筑级联楼层
|
|
|
AdmQueryCriteria admQueryCriteriaBd = new AdmQueryCriteria();
|
|
@@ -243,7 +244,7 @@ public class AdmSystemController {
|
|
|
syses = service.doQuery(AdmContextUtil.toDmpContext(),request,AdmSystem.class);
|
|
|
//处理数据 BuildingFloorInfo
|
|
|
if(CollUtil.isNotEmpty(syses.getContent())){
|
|
|
- List<AdmSystem> admSystemList = (List<AdmSystem>) syses.getContent();
|
|
|
+ admSystemList = (List<AdmSystem>) syses.getContent();
|
|
|
admSystemList.stream().forEach(admSystem -> {
|
|
|
List<AdmBuildingFloorInfo> buildingFloorInfoList = new ArrayList<>();
|
|
|
List<AdmBuilding> buildingList = admSystem.getBuildingList();
|
|
@@ -281,7 +282,7 @@ public class AdmSystemController {
|
|
|
return AdmResponse.failure("请求参数错误");
|
|
|
}
|
|
|
criteria.put("objType", AdmSystem.OBJ_TYPE);
|
|
|
- List<AdmSystem> admSystemList = new ArrayList<>();
|
|
|
+
|
|
|
if (StrUtil.isAllNotEmpty(buildingId, floorId)) {
|
|
|
if(!"1".equals(floorId)){
|
|
|
//case two 明确建筑、明确楼层的 系统
|
|
@@ -316,7 +317,7 @@ public class AdmSystemController {
|
|
|
if(CollUtil.isNotEmpty(admSystemList)){
|
|
|
//处理数据 BuildingFloorInfo
|
|
|
admSystemList = dealBdFlInfo(null,null, admSystemList);
|
|
|
- syses.setContent(admSystemList);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -324,6 +325,11 @@ public class AdmSystemController {
|
|
|
syses.setTotal(admSystemList.size()*1l);
|
|
|
|
|
|
}
|
|
|
+ if(CollUtil.isNotEmpty(admSystemList)){
|
|
|
+ syses.setContent(admSystemList);
|
|
|
+ }else{
|
|
|
+ syses.setContent(new ArrayList<>(1));
|
|
|
+ }
|
|
|
return syses;
|
|
|
}
|
|
|
|