wuxw
2025-03-04 8695b9b29f86910a2e3889b999716a28a6d3a879
service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityUnitTreeCmd.java
@@ -82,10 +82,14 @@
        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 @@
        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());