Commit edf376435116bd210c03e350ef9c2f7b65eb1cc9

Authored by liquanyu
1 parent 414f41df30

update

Showing 2 changed files with 22 additions and 2 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java View file @ edf3764
... ... @@ -185,8 +185,28 @@
185 185 }
186 186  
187 187 }
188   - }
  188 + else
  189 + {
  190 + regionsQuery = new BasicConfigQuery();
  191 + regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID);
  192 + regionsQuery.setParentId(provinceList.get(0).getId());
  193 + regionsQuery.setOrName(items.get(1));
  194 + List<BasicConfig> cityList1 = queryBasicConfig(regionsQuery);
  195 + if (CollectionUtils.isNotEmpty(cityList1))
  196 + {
  197 + map.put("cityId", cityList1.get(0).getId());
  198 + regionsQuery = new BasicConfigQuery();
  199 + regionsQuery.setOrName(items.get(2));
  200 + regionsQuery.setTypeId(SystemConfig.CHINA_TYPE_ID);
  201 + regionsQuery.setParentId(cityList1.get(0).getId());
189 202  
  203 + List<BasicConfig> areas = queryBasicConfig(regionsQuery);
  204 + if (CollectionUtils.isNotEmpty(areas)) {
  205 + map.put("areaId", areas.get(0).getId());
  206 + }
  207 + }
  208 + }
  209 + }
190 210 }
191 211 map.put("address", items.get(items.size() - 1));
192 212 } else if (items != null && items.size() == 5) {
platform-common/src/main/java/com/lyms/platform/common/utils/AddressUtil.java View file @ edf3764
... ... @@ -47,7 +47,7 @@
47 47 }
48 48  
49 49 public static void main(String[] ages) {
50   - List<String> addrs = AddressUtil.getAddress("山东省荣成市曙光东区26号207");
  50 + List<String> addrs = AddressUtil.getAddress("山东省威海市荣成市曙光东区26号207");
51 51 for (String ad : addrs) {
52 52 System.out.println(ad);
53 53 }