Преглед на файлове

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

lijie преди 3 години
родител
ревизия
46de1f15ba
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java

+ 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);