Browse Source

导入校验

ZeroLiYi 4 months ago
parent
commit
abd45b484b

+ 9 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/service/impl/EsDeliveryEnterpriseServiceImpl.java

@@ -228,16 +228,25 @@ public class EsDeliveryEnterpriseServiceImpl extends ServiceImpl<EsDeliveryEnter
228
                         QueryWrapper<BizDict> queryWrapper1 = new QueryWrapper<>();
228
                         QueryWrapper<BizDict> queryWrapper1 = new QueryWrapper<>();
229
                         queryWrapper1.eq("DICT_LABEL",strings[1]);
229
                         queryWrapper1.eq("DICT_LABEL",strings[1]);
230
                         List<BizDict> list1 = BizDictServiceImpl.list(queryWrapper1);
230
                         List<BizDict> list1 = BizDictServiceImpl.list(queryWrapper1);
231
+                        if(list1.isEmpty()){
232
+                            throw new IndexOutOfBoundsException(strings[1]+"不是正确的");
233
+                        }
231
                         EsNetworkEntry.setManagementAreaProvince(list1.get(0).getId());//归口管理地区-省
234
                         EsNetworkEntry.setManagementAreaProvince(list1.get(0).getId());//归口管理地区-省
232
 
235
 
233
                         QueryWrapper<BizDict> queryWrapper2 = new QueryWrapper<>();
236
                         QueryWrapper<BizDict> queryWrapper2 = new QueryWrapper<>();
234
                         queryWrapper2.eq("DICT_LABEL",strings[2]);
237
                         queryWrapper2.eq("DICT_LABEL",strings[2]);
235
                         List<BizDict> list2 = BizDictServiceImpl.list(queryWrapper2);
238
                         List<BizDict> list2 = BizDictServiceImpl.list(queryWrapper2);
239
+                        if(list2.isEmpty()){
240
+                            throw new IndexOutOfBoundsException(strings[2]+"不是正确的");
241
+                        }
236
                         EsNetworkEntry.setManagementAreaCity(list2.get(0).getId());//归口管理地区-市
242
                         EsNetworkEntry.setManagementAreaCity(list2.get(0).getId());//归口管理地区-市
237
 
243
 
238
                         QueryWrapper<BizDict> queryWrapper3 = new QueryWrapper<>();
244
                         QueryWrapper<BizDict> queryWrapper3 = new QueryWrapper<>();
239
                         queryWrapper3.eq("DICT_LABEL",strings[3]);
245
                         queryWrapper3.eq("DICT_LABEL",strings[3]);
240
                         List<BizDict> list3 = BizDictServiceImpl.list(queryWrapper3);
246
                         List<BizDict> list3 = BizDictServiceImpl.list(queryWrapper3);
247
+                        if(list3.isEmpty()){
248
+                            throw new IndexOutOfBoundsException(strings[3]+"不是正确的");
249
+                        }
241
                         EsNetworkEntry.setManagementAreaCounty(list3.get(0).getId());//归口管理地区-县
250
                         EsNetworkEntry.setManagementAreaCounty(list3.get(0).getId());//归口管理地区-县
242
 
251
 
243
 
252
 

+ 15 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/service/impl/EsNetworkEntryServiceImpl.java

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

+ 0 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsinterestsubsidysettle/controller/FsInterestSubsidySettleController.java

@@ -61,7 +61,6 @@ public class FsInterestSubsidySettleController {
61
      */
61
      */
62
     @ApiOperationSupport(order = 1)
62
     @ApiOperationSupport(order = 1)
63
     @ApiOperation("获取财务监管-省级储备粮清算管理-利息补贴清算表分页")
63
     @ApiOperation("获取财务监管-省级储备粮清算管理-利息补贴清算表分页")
64
-    @SaCheckPermission("/financialSupervision/fsinterestsubsidysettle/page")
65
     @GetMapping("/financialSupervision/fsinterestsubsidysettle/page")
64
     @GetMapping("/financialSupervision/fsinterestsubsidysettle/page")
66
     public CommonResult<List<FsInterestSubsidySettle>> page(FsInterestSubsidySettlePageParam fsInterestSubsidySettlePageParam) {
65
     public CommonResult<List<FsInterestSubsidySettle>> page(FsInterestSubsidySettlePageParam fsInterestSubsidySettlePageParam) {
67
         return CommonResult.data(fsInterestSubsidySettleService.page(fsInterestSubsidySettlePageParam));
66
         return CommonResult.data(fsInterestSubsidySettleService.page(fsInterestSubsidySettlePageParam));