Browse Source

fix bug:根据/object/zone/building-floor接口查询建筑楼层时楼层未按楼层序号排序返回的问题

lijie 3 years ago
parent
commit
46de1f15ba

+ 4 - 3
src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java

@@ -235,13 +235,14 @@ public class AdmSpaceController {
         criteriaSpace.setFilters("state = 1");
 
         criteriaFloor.setCascade(CollUtil.newArrayList(criteriaSpace));
+        criteriaFloor.setOrders("floorSequenceID desc");
         request.setCascade(CollUtil.newArrayList(criteriaFloor));
-        AdmResponse response = buildingService.doQueryBuildingFloor( AdmContextUtil.toDmpContext(), request);
+        AdmResponse response = buildingService.doQueryBuildingFloor(AdmContextUtil.toDmpContext(), request);
         List<AdmBuilding> buildings = (List<AdmBuilding>) response.getContent();
-        buildings.stream().forEach(building -> {
+        buildings.forEach(building -> {
             if(CollUtil.isNotEmpty(building.getFloor())){
                 List<AdmFloor> floors = building.getFloor();
-                floors.stream().forEach(floor -> {
+                floors.forEach(floor -> {
                     if(CollUtil.isNotEmpty(floor.getSpaceList())){
                         floor.setCount(String.valueOf(floor.getSpaceList().size()));
                         floor.setSpaceList(null);