|
@@ -244,27 +244,42 @@ public class EsNetworkEntryServiceImpl extends ServiceImpl<EsNetworkEntryMapper,
|
244
|
244
|
QueryWrapper<BizDict> queryWrapper1 = new QueryWrapper<>();
|
245
|
245
|
queryWrapper1.eq("DICT_LABEL",strings[1]);
|
246
|
246
|
List<BizDict> list1 = BizDictServiceImpl.list(queryWrapper1);
|
|
247
|
+ if(list1.isEmpty()){
|
|
248
|
+ throw new IndexOutOfBoundsException(strings[1]+"不是正确的");
|
|
249
|
+ }
|
247
|
250
|
EsNetworkEntry.setManagementAreaProvince(list1.get(0).getId());//归口管理地区-省
|
248
|
251
|
|
249
|
252
|
QueryWrapper<BizDict> queryWrapper2 = new QueryWrapper<>();
|
250
|
253
|
queryWrapper2.eq("DICT_LABEL",strings[2]);
|
251
|
254
|
List<BizDict> list2 = BizDictServiceImpl.list(queryWrapper2);
|
|
255
|
+ if(list2.isEmpty()){
|
|
256
|
+ throw new IndexOutOfBoundsException(strings[2]+"不是正确的");
|
|
257
|
+ }
|
252
|
258
|
EsNetworkEntry.setManagementAreaCity(list2.get(0).getId());//归口管理地区-市
|
253
|
259
|
|
254
|
260
|
QueryWrapper<BizDict> queryWrapper3 = new QueryWrapper<>();
|
255
|
261
|
queryWrapper3.eq("DICT_LABEL",strings[3]);
|
256
|
262
|
List<BizDict> list3 = BizDictServiceImpl.list(queryWrapper3);
|
|
263
|
+ if(list3.isEmpty()){
|
|
264
|
+ throw new IndexOutOfBoundsException(strings[3]+"不是正确的");
|
|
265
|
+ }
|
257
|
266
|
EsNetworkEntry.setManagementAreaCounty(list3.get(0).getId());//归口管理地区-县
|
258
|
267
|
|
259
|
268
|
|
260
|
269
|
QueryWrapper<BizDict> queryWrapper4 = new QueryWrapper<>();
|
261
|
270
|
queryWrapper4.eq("DICT_LABEL",strings[4]);
|
262
|
271
|
List<BizDict> list4 = BizDictServiceImpl.list(queryWrapper4);
|
|
272
|
+ if(list4.isEmpty()){
|
|
273
|
+ throw new IndexOutOfBoundsException(strings[4]+"不是正确的");
|
|
274
|
+ }
|
263
|
275
|
EsNetworkEntry.setActualAddressProvince(list4.get(0).getId());//实际经营地址-省
|
264
|
276
|
|
265
|
277
|
QueryWrapper<BizDict> queryWrapper5 = new QueryWrapper<>();
|
266
|
278
|
queryWrapper5.eq("DICT_LABEL",strings[5]);
|
267
|
279
|
List<BizDict> list5 = BizDictServiceImpl.list(queryWrapper5);
|
|
280
|
+ if(list5.isEmpty()){
|
|
281
|
+ throw new IndexOutOfBoundsException(strings[5]+"不是正确的");
|
|
282
|
+ }
|
268
|
283
|
EsNetworkEntry.setActualAddressCity(list5.get(0).getId());//实际经营地址-市
|
269
|
284
|
|
270
|
285
|
QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
|