Browse Source

应急保障上传

ZeroLiYi 4 months ago
parent
commit
94e10e5b5f

+ 4 - 4
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/controller/EsDeliveryEnterpriseController.java

@@ -150,13 +150,13 @@ public class EsDeliveryEnterpriseController {
150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
151
     })
151
     })
152
     @PostMapping(value= "/emergencySupport/esDeliveryEnterprise/importByEntity", headers= "content-type= multipart/form-data", consumes= "multipart/*")
152
     @PostMapping(value= "/emergencySupport/esDeliveryEnterprise/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 CommonResult<Map<String,Object>> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws IOException {
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){
157
             map.put("massage","无文件数据");
157
             map.put("massage","无文件数据");
158
             map.put("status","500");
158
             map.put("status","500");
159
-            return map;
159
+            return CommonResult.data(map);
160
         }
160
         }
161
         //获得文件名
161
         //获得文件名
162
         String fileName = file.getOriginalFilename();
162
         String fileName = file.getOriginalFilename();
@@ -164,10 +164,10 @@ public class EsDeliveryEnterpriseController {
164
         if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
164
         if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
165
             map.put("massage","请使用正确的导入模板");
165
             map.put("massage","请使用正确的导入模板");
166
             map.put("status","500");
166
             map.put("status","500");
167
-            return map;
167
+            return CommonResult.data(map);
168
         }
168
         }
169
 
169
 
170
-        return esDeliveryEnterpriseService.importByEntityResult(file,map);
170
+        return CommonResult.data(esDeliveryEnterpriseService.importByEntityResult(file,map));
171
 
171
 
172
     }
172
     }
173
 
173
 

+ 5 - 5
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 Exception {
153
+    public CommonResult<Map<String,Object>> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws Exception {
154
         Map<String, Object> map = new HashMap<>();
154
         Map<String, Object> map = new HashMap<>();
155
 
155
 
156
         try {
156
         try {
@@ -158,7 +158,7 @@ public class EsNetworkEntryController {
158
             if (file == null) {
158
             if (file == null) {
159
                 map.put("message", "无文件数据"); // Note: corrected the typo from "massage" to "message"
159
                 map.put("message", "无文件数据"); // Note: corrected the typo from "massage" to "message"
160
                 map.put("status", "500");
160
                 map.put("status", "500");
161
-                return map;
161
+                return CommonResult.data(map);
162
             }
162
             }
163
 
163
 
164
             // Get the file name
164
             // Get the file name
@@ -168,16 +168,16 @@ public class EsNetworkEntryController {
168
             if (fileName == null || (!fileName.endsWith("xls") && !fileName.endsWith("xlsx"))) {
168
             if (fileName == null || (!fileName.endsWith("xls") && !fileName.endsWith("xlsx"))) {
169
                 map.put("message", "请使用正确的导入模板"); // Note: corrected the typo from "massage" to "message"
169
                 map.put("message", "请使用正确的导入模板"); // Note: corrected the typo from "massage" to "message"
170
                 map.put("status", "500");
170
                 map.put("status", "500");
171
-                return map;
171
+                return CommonResult.data(map);
172
             }
172
             }
173
 
173
 
174
             // Process the file using the service
174
             // Process the file using the service
175
-            return esNetworkEntryService.importByEntityResult(file, map);
175
+            return CommonResult.data(esNetworkEntryService.importByEntityResult(file, map));
176
         } catch (Exception e) {
176
         } catch (Exception e) {
177
             // Handle exceptions
177
             // Handle exceptions
178
             map.put("message", "文件处理失败: " + e.getMessage());
178
             map.put("message", "文件处理失败: " + e.getMessage());
179
             map.put("status", "500");
179
             map.put("status", "500");
180
-            return map;
180
+            return CommonResult.data(map);
181
         }
181
         }
182
     }
182
     }
183
 }
183
 }

+ 6 - 6
unis-plugin/unis-plugin-biz/src/main/java/com/unis/emergencySupport/modular/es/controller/EsProcessEnterpriseController.java

@@ -167,13 +167,13 @@ public class EsProcessEnterpriseController {
167
             @ApiImplicitParam(name = "file", value = "文件对象集合")
167
             @ApiImplicitParam(name = "file", value = "文件对象集合")
168
     })
168
     })
169
     @PostMapping(value= "/emergencySupport/esProcessEnterprise/importByEntity", headers= "content-type= multipart/form-data", consumes= "multipart/*")
169
     @PostMapping(value= "/emergencySupport/esProcessEnterprise/importByEntity", headers= "content-type= multipart/form-data", consumes= "multipart/*")
170
-    public Map<String,Object> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws IOException {
170
+    public CommonResult<Map<String,Object>> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws IOException {
171
         Map<String, Object> map = new HashMap<>();
171
         Map<String, Object> map = new HashMap<>();
172
         try {
172
         try {
173
             if (file == null || file.isEmpty()) {
173
             if (file == null || file.isEmpty()) {
174
                 map.put("message", "无文件数据");
174
                 map.put("message", "无文件数据");
175
                 map.put("status", "500");
175
                 map.put("status", "500");
176
-                return map;
176
+                return CommonResult.data(map);
177
             }
177
             }
178
             // 获得文件名
178
             // 获得文件名
179
             String fileName = file.getOriginalFilename();
179
             String fileName = file.getOriginalFilename();
@@ -181,18 +181,18 @@ public class EsProcessEnterpriseController {
181
             if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
181
             if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
182
                 map.put("message", "请使用正确的导入模板");
182
                 map.put("message", "请使用正确的导入模板");
183
                 map.put("status", "500");
183
                 map.put("status", "500");
184
-                return map;
184
+                return CommonResult.data(map);
185
             }
185
             }
186
 
186
 
187
-            return esProcessEnterpriseService.importByEntityResult(file, map);
187
+            return CommonResult.data(esProcessEnterpriseService.importByEntityResult(file, map));
188
         } catch (IOException e) {
188
         } catch (IOException e) {
189
             map.put("message", "文件处理异常: " + e.getMessage());
189
             map.put("message", "文件处理异常: " + e.getMessage());
190
             map.put("status", "500");
190
             map.put("status", "500");
191
-            return map;
191
+            return CommonResult.data(map);
192
         } catch (Exception e) {
192
         } catch (Exception e) {
193
             map.put("message", "发生异常: " + e.getMessage());
193
             map.put("message", "发生异常: " + e.getMessage());
194
             map.put("status", "500");
194
             map.put("status", "500");
195
-            return map;
195
+            return CommonResult.data(map);
196
         }
196
         }
197
 
197
 
198
     }
198
     }

+ 0 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/financialSupervision/modular/fsinterestsubsidysettle/service/impl/FsInterestSubsidySettleServiceImpl.java

@@ -65,7 +65,6 @@ public class FsInterestSubsidySettleServiceImpl extends ServiceImpl<FsInterestSu
65
 
65
 
66
         return fsInterestSubsidySettleList;
66
         return fsInterestSubsidySettleList;
67
     }
67
     }
68
-
69
     @Transactional(rollbackFor = Exception.class)
68
     @Transactional(rollbackFor = Exception.class)
70
     @Override
69
     @Override
71
     public void add(List<FsInterestSubsidySettleAddParam> fsInterestSubsidySettleAddParamList) {
70
     public void add(List<FsInterestSubsidySettleAddParam> fsInterestSubsidySettleAddParamList) {