Commit 1cf7fea2 by wukaiqiang

导出时遇到错误抛出Controller层错误信息

parent 2b4a39e4
...@@ -3,6 +3,9 @@ package com.xyst.dinas.statistics.web; ...@@ -3,6 +3,9 @@ package com.xyst.dinas.statistics.web;
import java.io.IOException; import java.io.IOException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -22,7 +25,7 @@ import com.xyst.dinas.statistics.web.Info.ConditionsDetailsInfo; ...@@ -22,7 +25,7 @@ import com.xyst.dinas.statistics.web.Info.ConditionsDetailsInfo;
public class DownLoadStatisticsController { public class DownLoadStatisticsController {
@Autowired @Autowired
DownLoadStatisticsService downLoadStatisticsService; DownLoadStatisticsService downLoadStatisticsService;
private Logger logger = LoggerFactory.getLogger(this.getClass());
@PostMapping(value = "/DownLoadStatistics/downLoadStatisticsService") @PostMapping(value = "/DownLoadStatistics/downLoadStatisticsService")
public void downLoadStatisticsService(HttpServletResponse response, HttpServletRequest request) throws JSONException { public void downLoadStatisticsService(HttpServletResponse response, HttpServletRequest request) throws JSONException {
String exportParamStr = request.getParameter("exportParamStr"); String exportParamStr = request.getParameter("exportParamStr");
...@@ -44,8 +47,10 @@ public class DownLoadStatisticsController { ...@@ -44,8 +47,10 @@ public class DownLoadStatisticsController {
downLoadStatisticsService.downLoadStatisticsServiceTable(response, request, conditionsDetailsInfo); downLoadStatisticsService.downLoadStatisticsServiceTable(response, request, conditionsDetailsInfo);
} catch (RuntimeException e) { } catch (RuntimeException e) {
// TODO: handle exception // TODO: handle exception
logger.info("导出数据时出现错误信息!请确认!"+e.getMessage());
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
logger.info("导出数据时出现错误信息!请确认!"+e.getMessage());
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment