ZeroLiYi 4 months ago
parent
commit
01c0835edb

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/controller/EsNetworkEntryController.java

@@ -150,7 +150,7 @@ public class EsNetworkEntryController {
150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
151
     })
151
     })
152
     @PostMapping(value= "/emergencySupport/esNetworkEntry/importByEntity", headers= "content-type= multipart/form-data", consumes= "multipart/*")
152
     @PostMapping(value= "/emergencySupport/esNetworkEntry/importByEntity", headers= "content-type= multipart/form-data", consumes= "multipart/*")
153
-    public Map<String,Object> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws IOException {
153
+    public Map<String,Object> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws Exception {
154
 
154
 
155
         Map<String,Object> map = new HashMap<String,Object>();
155
         Map<String,Object> map = new HashMap<String,Object>();
156
         if(file== null){
156
         if(file== null){

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/service/EsNetworkEntryService.java

@@ -84,5 +84,5 @@ public interface EsNetworkEntryService extends IService<EsNetworkEntry> {
84
 
84
 
85
     List<EsNetworkEntryCountVO> selectCount(EsNetworkEntryCountParam esNetworkEntryCountParam);
85
     List<EsNetworkEntryCountVO> selectCount(EsNetworkEntryCountParam esNetworkEntryCountParam);
86
 
86
 
87
-    Map<String, Object> importByEntityResult(MultipartFile file, Map<String, Object> map) throws IOException;
87
+    Map<String, Object> importByEntityResult(MultipartFile file, Map<String, Object> map) throws Exception;
88
 }
88
 }

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

@@ -253,16 +253,25 @@ public class EsDeliveryEnterpriseServiceImpl extends ServiceImpl<EsDeliveryEnter
253
                         QueryWrapper<BizDict> queryWrapper4 = new QueryWrapper<>();
253
                         QueryWrapper<BizDict> queryWrapper4 = new QueryWrapper<>();
254
                         queryWrapper4.eq("DICT_LABEL",strings[4]);
254
                         queryWrapper4.eq("DICT_LABEL",strings[4]);
255
                         List<BizDict> list4 = BizDictServiceImpl.list(queryWrapper4);
255
                         List<BizDict> list4 = BizDictServiceImpl.list(queryWrapper4);
256
+                        if(list4.isEmpty()){
257
+                            throw new IndexOutOfBoundsException(strings[4]+"不是正确的");
258
+                        }
256
                         EsNetworkEntry.setActualAddressProvince(list4.get(0).getId());//实际经营地址-省
259
                         EsNetworkEntry.setActualAddressProvince(list4.get(0).getId());//实际经营地址-省
257
 
260
 
258
                         QueryWrapper<BizDict> queryWrapper5 = new QueryWrapper<>();
261
                         QueryWrapper<BizDict> queryWrapper5 = new QueryWrapper<>();
259
                         queryWrapper5.eq("DICT_LABEL",strings[5]);
262
                         queryWrapper5.eq("DICT_LABEL",strings[5]);
260
                         List<BizDict> list5 = BizDictServiceImpl.list(queryWrapper5);
263
                         List<BizDict> list5 = BizDictServiceImpl.list(queryWrapper5);
264
+                        if(list5.isEmpty()){
265
+                            throw new IndexOutOfBoundsException(strings[5]+"不是正确的");
266
+                        }
261
                         EsNetworkEntry.setActualAddressCity(list5.get(0).getId());//实际经营地址-市
267
                         EsNetworkEntry.setActualAddressCity(list5.get(0).getId());//实际经营地址-市
262
 
268
 
263
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
269
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
264
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
270
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
265
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
271
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
272
+                        if(list6.isEmpty()){
273
+                            throw new IndexOutOfBoundsException(strings[6]+"不是正确的");
274
+                        }
266
                         EsNetworkEntry.setActualAddressCounty(list6.get(0).getId());//实际经营地址-县
275
                         EsNetworkEntry.setActualAddressCounty(list6.get(0).getId());//实际经营地址-县
267
 
276
 
268
 
277
 

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

@@ -201,7 +201,7 @@ public class EsNetworkEntryServiceImpl extends ServiceImpl<EsNetworkEntryMapper,
201
     }
201
     }
202
     @Transactional
202
     @Transactional
203
     @Override
203
     @Override
204
-    public Map<String, Object> importByEntityResult(MultipartFile file, Map<String, Object> map) throws IOException {
204
+    public Map<String, Object> importByEntityResult(MultipartFile file, Map<String, Object> map) throws Exception {
205
         // TODO Auto-generated method stub
205
         // TODO Auto-generated method stub
206
         Integer index = 6;
206
         Integer index = 6;
207
         List<String[]> list = FileImport.importByFile(file, index);
207
         List<String[]> list = FileImport.importByFile(file, index);
@@ -285,6 +285,9 @@ public class EsNetworkEntryServiceImpl extends ServiceImpl<EsNetworkEntryMapper,
285
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
285
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
286
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
286
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
287
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
287
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
288
+                        if(list6.isEmpty()){
289
+                            throw new IndexOutOfBoundsException(strings[6]+"不是正确的");
290
+                        }
288
                         EsNetworkEntry.setActualAddressCounty(list6.get(0).getId());//实际经营地址-县
291
                         EsNetworkEntry.setActualAddressCounty(list6.get(0).getId());//实际经营地址-县
289
 
292
 
290
 
293
 

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

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

+ 1 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsinterestmaintain/mapper/mapping/BusinessFsInterestMaintainMapper.xml

@@ -11,7 +11,7 @@
11
             SUM(other_deduction) other_deduction
11
             SUM(other_deduction) other_deduction
12
         FROM
12
         FROM
13
             business_fs_interest_maintain
13
             business_fs_interest_maintain
14
-        where year=#{year}
14
+        where year=#{planYear}
15
         GROUP BY org_id
15
         GROUP BY org_id
16
 
16
 
17
     </select>
17
     </select>