소스 검색

应急保障上传

ZeroLiYi 4 달 전
부모
커밋
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 150
             @ApiImplicitParam(name = "file", value = "文件对象集合")
151 151
     })
152 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 155
         Map<String,Object> map = new HashMap<String,Object>();
156 156
         if(file== null){
157 157
             map.put("massage","无文件数据");
158 158
             map.put("status","500");
159
-            return map;
159
+            return CommonResult.data(map);
160 160
         }
161 161
         //获得文件名
162 162
         String fileName = file.getOriginalFilename();
@@ -164,10 +164,10 @@ public class EsDeliveryEnterpriseController {
164 164
         if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
165 165
             map.put("massage","请使用正确的导入模板");
166 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 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 Exception {
153
+    public CommonResult<Map<String,Object>> importByEntity(@RequestParam(value= "file", required = true) MultipartFile file) throws Exception {
154 154
         Map<String, Object> map = new HashMap<>();
155 155
 
156 156
         try {
@@ -158,7 +158,7 @@ public class EsNetworkEntryController {
158 158
             if (file == null) {
159 159
                 map.put("message", "无文件数据"); // Note: corrected the typo from "massage" to "message"
160 160
                 map.put("status", "500");
161
-                return map;
161
+                return CommonResult.data(map);
162 162
             }
163 163
 
164 164
             // Get the file name
@@ -168,16 +168,16 @@ public class EsNetworkEntryController {
168 168
             if (fileName == null || (!fileName.endsWith("xls") && !fileName.endsWith("xlsx"))) {
169 169
                 map.put("message", "请使用正确的导入模板"); // Note: corrected the typo from "massage" to "message"
170 170
                 map.put("status", "500");
171
-                return map;
171
+                return CommonResult.data(map);
172 172
             }
173 173
 
174 174
             // Process the file using the service
175
-            return esNetworkEntryService.importByEntityResult(file, map);
175
+            return CommonResult.data(esNetworkEntryService.importByEntityResult(file, map));
176 176
         } catch (Exception e) {
177 177
             // Handle exceptions
178 178
             map.put("message", "文件处理失败: " + e.getMessage());
179 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 167
             @ApiImplicitParam(name = "file", value = "文件对象集合")
168 168
     })
169 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 171
         Map<String, Object> map = new HashMap<>();
172 172
         try {
173 173
             if (file == null || file.isEmpty()) {
174 174
                 map.put("message", "无文件数据");
175 175
                 map.put("status", "500");
176
-                return map;
176
+                return CommonResult.data(map);
177 177
             }
178 178
             // 获得文件名
179 179
             String fileName = file.getOriginalFilename();
@@ -181,18 +181,18 @@ public class EsProcessEnterpriseController {
181 181
             if (!fileName.endsWith("xls") && !fileName.endsWith("xlsx")) {
182 182
                 map.put("message", "请使用正确的导入模板");
183 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 188
         } catch (IOException e) {
189 189
             map.put("message", "文件处理异常: " + e.getMessage());
190 190
             map.put("status", "500");
191
-            return map;
191
+            return CommonResult.data(map);
192 192
         } catch (Exception e) {
193 193
             map.put("message", "发生异常: " + e.getMessage());
194 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 66
         return fsInterestSubsidySettleList;
67 67
     }
68
-
69 68
     @Transactional(rollbackFor = Exception.class)
70 69
     @Override
71 70
     public void add(List<FsInterestSubsidySettleAddParam> fsInterestSubsidySettleAddParamList) {