zhubaomin
2024-08-29 6ff1146dd3e06d991e8bc246bb3e9f3644699254
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/district/DistrictCtrl.java
@@ -78,7 +78,7 @@
    @GetMapping(path = "all")
    @SsoAop()
    public BaseResponse<List<BaDistrict>> all() {
        List<BaDistrict> list = this.sv.selectAllByLevel(DistrictLevel.City.code);
        List<BaDistrict> list = this.sv.selectAllByLevel(DistrictLevel.Province.code);
        return BaseResponseUtils.buildSuccess(list);
    }
@@ -297,6 +297,7 @@
                List<Map<String, Object>> list_towns = Optional.ofNullable(sv.getDistrictsBySupperId(countyId)).orElse(new ArrayList<>());
                if (list_towns.size() > 0) {
                    array_towns = JSONArray.parseArray(JSON.toJSONString(list_towns));
                    job_county.put("children", array_towns);
                    // 遍历每一个镇,将镇下村列表加到镇的子集
                    for (int j = 0; j < array_towns.size(); j++) {
                        JSONObject job_town = array_towns.getJSONObject(j);
@@ -310,7 +311,7 @@
                    //System.out.println("----" + array_towns);
                }
                // 镇村组装完毕,将镇村加到县下
                job_county.put("children", array_towns);
//                job_county.put("children", array_towns);
            }
            // 县组装完毕
            //String a = array_counties.toJSONString();