|
@@ -276,6 +276,12 @@ public class AdmSystemController {
|
|
|
admQueryCriteriaBd.setName("buildingList");
|
|
|
AdmQueryCriteria admQueryCriteriaFl = new AdmQueryCriteria();
|
|
|
admQueryCriteriaFl.setName("floorList");
|
|
|
+ List<AdmQueryCriteria> cascadeFlBd = new ArrayList<>(1);
|
|
|
+ AdmQueryCriteria admQueryCriteriaBdFl = new AdmQueryCriteria();
|
|
|
+ admQueryCriteriaBdFl.setName("building");
|
|
|
+ cascadeFlBd.add(admQueryCriteriaBdFl);
|
|
|
+ admQueryCriteriaFl.setCascade(cascadeFlBd);
|
|
|
+
|
|
|
List<AdmQueryCriteria> cascade = new ArrayList<>(1);
|
|
|
cascade.add(admQueryCriteriaBd);
|
|
|
cascade.add(admQueryCriteriaFl);
|
|
@@ -299,11 +305,11 @@ public class AdmSystemController {
|
|
|
Map<String, AdmBuilding> admBuildingMap = CollUtil.fieldValueMap(buildingList, BaseEntity.PROP_ID);
|
|
|
List<AdmFloor> admFloorList = admSystem.getFloorList();
|
|
|
if(CollUtil.isNotEmpty(admFloorList)){
|
|
|
- Map<String, AdmFloor> admFloorMap = CollUtil.fieldValueMap(admFloorList, "buildingId");
|
|
|
+ //Map<String, AdmFloor> admFloorMap = CollUtil.fieldValueMap(admFloorList, "buildingId");
|
|
|
admFloorList.stream().forEach(admFloor -> {
|
|
|
ObjectNode infobd = JsonNodeFactory.instance.objectNode();
|
|
|
infobd.put("BuildID",admFloor.getBuildingId());
|
|
|
- infobd.put("BuildName",admBuildingMap.get(admFloor.getBuildingId()).getLocalName());
|
|
|
+ infobd.put("BuildName",admFloor.getBuilding() == null ? (admBuildingMap.get(admFloor.getBuildingId()) != null ? admBuildingMap.get(admFloor.getBuildingId()).getLocalName() : "") :admFloor.getBuilding().getLocalName());
|
|
|
infobd.put("FloorID",admFloor.getId());
|
|
|
infobd.put("FloorName",admFloor.getLocalName());
|
|
|
buildingFloorInfoList.add(infobd);
|