wuxw 1 год назад
Родитель
Сommit
8695b9b29f

+ 3 - 0
service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityParkingTreeCmd.java

@@ -93,6 +93,9 @@ public class QueryCommunityParkingTreeCmd extends Cmd {
         JSONArray parkings = community.getJSONArray("children");
         JSONObject parkingInfo = null;
         for (ParkingAreaDto tmpParkingAreaDto : parkingAreaDtos) {
+            if(!community.getString("communityId").equals(tmpParkingAreaDto.getCommunityId())){
+                continue;
+            }
             if (!hasInParkingArea(tmpParkingAreaDto, parkings)) {
                 parkingInfo = new JSONObject();
                 parkingInfo.put("id", "p_" + tmpParkingAreaDto.getPaId());

+ 3 - 0
service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityRepairTreeCmd.java

@@ -92,6 +92,9 @@ public class QueryCommunityRepairTreeCmd extends Cmd {
         JSONArray parkings = community.getJSONArray("children");
         JSONObject parkingInfo = null;
         for (RepairSettingDto tmpRepairSettingDto : repairSettingDtos) {
+            if(!community.getString("communityId").equals(tmpRepairSettingDto.getCommunityId())){
+                continue;
+            }
             if (!hasInRepairSetting(tmpRepairSettingDto, parkings)) {
                 parkingInfo = new JSONObject();
                 parkingInfo.put("id", "r_" + tmpRepairSettingDto.getRepairType());

+ 10 - 0
service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityUnitTreeCmd.java

@@ -82,10 +82,14 @@ public class QueryCommunityUnitTreeCmd extends Cmd {
         JSONArray floors = community.getJSONArray("children");
         JSONObject floorInfo = null;
         for (UnitDto tmpUnitDto : unitDtos) {
+            if(!community.getString("communityId").equals(tmpUnitDto.getCommunityId())){
+                continue;
+            }
             if (!hasInFloor(tmpUnitDto, floors)) {
                 floorInfo = new JSONObject();
                 floorInfo.put("id", "f_" + tmpUnitDto.getFloorId());
                 floorInfo.put("floorId", tmpUnitDto.getFloorId());
+                floorInfo.put("communityId", community.getString("communityId"));
                 floorInfo.put("text", tmpUnitDto.getFloorNum()+"栋");
                 floorInfo.put("icon", "/img/floor.png");
                 floorInfo.put("children", new JSONArray());
@@ -106,6 +110,12 @@ public class QueryCommunityUnitTreeCmd extends Cmd {
         JSONArray units = floor.getJSONArray("children");
         JSONObject unitInfo = null;
         for (UnitDto tmpUnitDto : unitDtos) {
+            if(!floor.getString("communityId").equals(tmpUnitDto.getCommunityId())){
+                continue;
+            }
+            if(!floor.getString("floorId").equals(tmpUnitDto.getFloorId())){
+                continue;
+            }
             if (!hasInUnit(tmpUnitDto, units)) {
                 unitInfo = new JSONObject();
                 unitInfo.put("id", "u_" + tmpUnitDto.getUnitId());