From 351b9a53cb9ecebdf8f79db0117f540d9c42c2a4 Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期二, 23 二月 2021 17:19:23 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/ResDataUploadController.java |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/ResDataUploadController.java b/src/main/java/com/fgkj/controller/ResDataUploadController.java
index e610015..0b89847 100644
--- a/src/main/java/com/fgkj/controller/ResDataUploadController.java
+++ b/src/main/java/com/fgkj/controller/ResDataUploadController.java
@@ -1,27 +1,27 @@
 package com.fgkj.controller;
 
+import com.fgkj.dto.DLG_Progress;
+import com.fgkj.dto.ServiceModel;
+import com.fgkj.dto.User_inf;
+import com.fgkj.services.ResDataUploadService;
+import com.fgkj.util.ActionUtil;
+import com.google.gson.Gson;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpSession;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Date;
 
-import javax.servlet.http.HttpSession;
-
-import io.swagger.annotations.Api;
-import org.apache.struts2.ServletActionContext;
-
-import com.fgkj.dto.DLG_Progress;
-import com.fgkj.dto.ServiceModel;
-import com.fgkj.dto.User_inf;
-import com.fgkj.services.ResDataUploadService;
-import com.google.gson.Gson;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
 @RequestMapping("resDataUpload")
 @RestController
-@Api
+@Api(tags = "resDataUpload鎺ュ彛")
+//Perry TODO
 public class ResDataUploadController{
 
 	/*private String tableRowData;
@@ -30,10 +30,11 @@
 	// 鎻愪氦杩囨潵鐨刦ile鐨勫悕瀛�
 	private String[] fileFileName;*/
 
-	@Autowired
+	@Resource
 	private ResDataUploadService service;
 
 	@PostMapping("uploadResFile")
+	@ApiOperation(notes = "",value="涓婁紶鏂囦欢")
 	public boolean uploadResfile(@RequestParam String tableRowData,int battgroupid,File[] file,String[] fileFileName){
 		boolean res=false;
 
@@ -45,7 +46,7 @@
 			String[][] tableRowDatas = gson
 					.fromJson(tableRowData, String[][].class);
 			//System.out.println(file.length + "---" + tableRowDatas.length);
-			//uinf.setUId(1001);
+			//uinf.setuId(1001);
 			
 			/*ResDataUploadService rdus=new ResDataUploadService(user, battgroupid, tableRowDatas, file, session);
 			rdus.start();*/
@@ -57,6 +58,7 @@
 	
 	// 鍋滄涓婁紶
 	@PutMapping("stopResUpload")
+	@ApiOperation(notes = "",value="鍋滄涓婁紶")
 	public DLG_Progress stopResUpload() {
 		HttpSession session = ActionUtil.getSession();
 		DLG_Progress progress = (DLG_Progress) session.getAttribute("Resprogress");
@@ -68,6 +70,7 @@
 
 	// 鏌ヨ杩涘害
 	@GetMapping("resProgress")
+	@ApiOperation(notes = "",value="鏌ヨ杩涘害")
 	public ServiceModel selectResprogress() {
 		ServiceModel model = new ServiceModel();
 
@@ -88,7 +91,7 @@
 	}
 	
 	public void createFile(File[] file,String[] fileFileName){
-		String root = ServletActionContext.getServletContext().getRealPath("");		// 涓婁紶璺緞
+		String root = ActionUtil.getApplication().getRealPath("");		// 涓婁紶璺緞
 		//System.out.println(root);
 		for(int i=0;i<file.length;i++){
 			long times=new Date().getTime();

--
Gitblit v1.9.1