From 64d3e9657fb45b6415b19e23f483d46a82efe939 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 06 三月 2023 13:56:42 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/controller/data/upload/CheckController.java |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/lf/server/controller/data/upload/CheckController.java b/src/main/java/com/lf/server/controller/data/upload/CheckController.java
index 366980c..2b39f23 100644
--- a/src/main/java/com/lf/server/controller/data/upload/CheckController.java
+++ b/src/main/java/com/lf/server/controller/data/upload/CheckController.java
@@ -5,6 +5,7 @@
 import com.lf.server.entity.all.ResponseMsg;
 import com.lf.server.entity.all.StaticData;
 import com.lf.server.entity.ctrl.FmeReqEntity;
+import com.lf.server.helper.HttpHelper;
 import com.lf.server.helper.PathHelper;
 import com.lf.server.helper.StringHelper;
 import com.lf.server.service.data.FmeService;
@@ -13,6 +14,9 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -46,7 +50,7 @@
 
             return fmeService.getTaskStatus(id, req);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -60,7 +64,10 @@
         try {
             if (!StringHelper.isEmpty(id)) {
                 String url = fmeService.getDownloadUrl(id, req);
-                res.sendRedirect(url);
+
+                HttpHelper httpHelper = new HttpHelper();
+                // res.sendRedirect(url)
+                httpHelper.service(req, res, url, null);
             }
         } catch (Exception ex) {
             log.error(ex.getMessage(), ex);
@@ -69,8 +76,12 @@
 
     @SysLog()
     @ApiOperation(value = "鎻愪氦鏁版嵁璐ㄦ")
-    @GetMapping(value = "/uploadChecks")
-    public ResponseMsg<Object> uploadChecks(FmeReqEntity entity, HttpServletRequest req) {
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "entity", value = "FME璇锋眰瀹炰綋绫�", dataType = "FmeReqEntity", paramType = "body")
+    })
+    @ResponseBody
+    @PostMapping(value = "/uploadChecks")
+    public ResponseMsg<Object> uploadChecks(@RequestBody FmeReqEntity entity, HttpServletRequest req) {
         try {
             if (StringHelper.isEmpty(entity.names)) {
                 return fail("浠诲姟鍚嶇О涓嶈兘涓虹┖");
@@ -98,7 +109,7 @@
 
             return success(list);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -172,7 +183,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -194,7 +205,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -216,7 +227,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -239,7 +250,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -261,7 +272,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -289,7 +300,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -311,7 +322,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -332,7 +343,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -356,7 +367,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -378,7 +389,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -400,7 +411,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }
 
@@ -425,7 +436,7 @@
 
             return success(rs);
         } catch (Exception ex) {
-            return fail(ex.getMessage(), null);
+            return fail(ex, null);
         }
     }*/
 }

--
Gitblit v1.9.3