ZeroLiYi 4 meses atrás
pai
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 150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
151 151
     })
152 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 155
         Map<String,Object> map = new HashMap<String,Object>();
156 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 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 253
                         QueryWrapper<BizDict> queryWrapper4 = new QueryWrapper<>();
254 254
                         queryWrapper4.eq("DICT_LABEL",strings[4]);
255 255
                         List<BizDict> list4 = BizDictServiceImpl.list(queryWrapper4);
256
+                        if(list4.isEmpty()){
257
+                            throw new IndexOutOfBoundsException(strings[4]+"不是正确的");
258
+                        }
256 259
                         EsNetworkEntry.setActualAddressProvince(list4.get(0).getId());//实际经营地址-省
257 260
 
258 261
                         QueryWrapper<BizDict> queryWrapper5 = new QueryWrapper<>();
259 262
                         queryWrapper5.eq("DICT_LABEL",strings[5]);
260 263
                         List<BizDict> list5 = BizDictServiceImpl.list(queryWrapper5);
264
+                        if(list5.isEmpty()){
265
+                            throw new IndexOutOfBoundsException(strings[5]+"不是正确的");
266
+                        }
261 267
                         EsNetworkEntry.setActualAddressCity(list5.get(0).getId());//实际经营地址-市
262 268
 
263 269
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
264 270
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
265 271
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
272
+                        if(list6.isEmpty()){
273
+                            throw new IndexOutOfBoundsException(strings[6]+"不是正确的");
274
+                        }
266 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 202
     @Transactional
203 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 205
         // TODO Auto-generated method stub
206 206
         Integer index = 6;
207 207
         List<String[]> list = FileImport.importByFile(file, index);
@@ -285,6 +285,9 @@ public class EsNetworkEntryServiceImpl extends ServiceImpl<EsNetworkEntryMapper,
285 285
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
286 286
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
287 287
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
288
+                        if(list6.isEmpty()){
289
+                            throw new IndexOutOfBoundsException(strings[6]+"不是正确的");
290
+                        }
288 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 239
                         QueryWrapper<BizDict> queryWrapper1 = new QueryWrapper<>();
240 240
                         queryWrapper1.eq("DICT_LABEL",strings[1]);
241 241
                         List<BizDict> list1 = BizDictServiceImpl.list(queryWrapper1);
242
+                        if(list1.isEmpty()){
243
+                            throw new IndexOutOfBoundsException(strings[1]+"不是正确的");
244
+                        }
242 245
                         EsProcessEnterprise.setManagementAreaProvince(list1.get(0).getId());//归口管理地区-省
243 246
 
244 247
                         QueryWrapper<BizDict> queryWrapper2 = new QueryWrapper<>();
245 248
                         queryWrapper2.eq("DICT_LABEL",strings[2]);
246 249
                         List<BizDict> list2 = BizDictServiceImpl.list(queryWrapper2);
250
+                        if(list2.isEmpty()){
251
+                            throw new IndexOutOfBoundsException(strings[2]+"不是正确的");
252
+                        }
247 253
                         EsProcessEnterprise.setManagementAreaCity(list2.get(0).getId());//归口管理地区-市
248 254
 
249 255
                         QueryWrapper<BizDict> queryWrapper3 = new QueryWrapper<>();
250 256
                         queryWrapper3.eq("DICT_LABEL",strings[3]);
251 257
                         List<BizDict> list3 = BizDictServiceImpl.list(queryWrapper3);
258
+                        if(list3.isEmpty()){
259
+                            throw new IndexOutOfBoundsException(strings[3]+"不是正确的");
260
+                        }
252 261
                         EsProcessEnterprise.setManagementAreaCounty(list3.get(0).getId());//归口管理地区-县
253 262
 
254 263
 
255 264
                         QueryWrapper<BizDict> queryWrapper4 = new QueryWrapper<>();
256 265
                         queryWrapper4.eq("DICT_LABEL",strings[4]);
257 266
                         List<BizDict> list4 = BizDictServiceImpl.list(queryWrapper4);
267
+                        if(list4.isEmpty()){
268
+                            throw new IndexOutOfBoundsException(strings[4]+"不是正确的");
269
+                        }
258 270
                         EsProcessEnterprise.setActualAddressProvince(list4.get(0).getId());//实际经营地址-省
259 271
 
260 272
                         QueryWrapper<BizDict> queryWrapper5 = new QueryWrapper<>();
261 273
                         queryWrapper5.eq("DICT_LABEL",strings[5]);
262 274
                         List<BizDict> list5 = BizDictServiceImpl.list(queryWrapper5);
275
+                        if(list5.isEmpty()){
276
+                            throw new IndexOutOfBoundsException(strings[5]+"不是正确的");
277
+                        }
263 278
                         EsProcessEnterprise.setActualAddressCity(list5.get(0).getId());//实际经营地址-市
264 279
 
265 280
                         QueryWrapper<BizDict> queryWrapper6 = new QueryWrapper<>();
266 281
                         queryWrapper6.eq("DICT_LABEL",strings[6]);
267 282
                         List<BizDict> list6 = BizDictServiceImpl.list(queryWrapper6);
283
+                        if(list6.isEmpty()){
284
+                            throw new IndexOutOfBoundsException(strings[6]+"不是正确的");
285
+                        }
268 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 11
             SUM(other_deduction) other_deduction
12 12
         FROM
13 13
             business_fs_interest_maintain
14
-        where year=#{year}
14
+        where year=#{planYear}
15 15
         GROUP BY org_id
16 16
 
17 17
     </select>