| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getHousesList(String name, String code, Integer type) { |
| | | public Object getHousesList(String name, String code, Integer type,Integer addressType) { |
| | | List<TreeNode> list = new ArrayList<>(); |
| | | // 查小区,场所 |
| | | if (type==1){ |
| | | // 根据社区名称查询小区集合 |
| | | list = baseMapper.getDistrictList(name,code); |
| | | } |
| | | // 查楼栋,场所 |
| | | // 查楼栋,街路巷 |
| | | if (type==2){ |
| | | // 根据社区名称查询楼栋集合 |
| | | list = baseMapper.getBuildingList(name,code); |
| | | // 判断 code 长度,如果 code 长度大于 12 则为小区查楼栋,否则则按社区查街路巷 |
| | | if (code.length()>12){ |
| | | // 根据社区名称查询楼栋集合 |
| | | list = baseMapper.getBuildingList(name, code); |
| | | }else { |
| | | // 查询街路巷 |
| | | list = baseMapper.getStreetRuList(name, code); |
| | | } |
| | | } |
| | | // 查户室 |
| | | if (type==3){ |
| | | // 查询户室及住户相关信息,单元中包含住户 |
| | | return getUnitHouseholdList(name,code); |
| | | // 判断地址类型 |
| | | if (addressType==1) { |
| | | // 查询户室及住户相关信息,单元中包含住户 |
| | | return getUnitHouseholdList(name, code); |
| | | } |
| | | if (addressType==2) { |
| | | // 根据街路巷编号查询街路巷门牌名称集合 |
| | | return baseMapper.getDoorplateNameList(name,code); |
| | | } |
| | | } |
| | | return list; |
| | | } |