|
|
@@ -45,7 +45,7 @@ public class PrintController {
|
|
|
* @param response
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping("")
|
|
|
+ @RequestMapping
|
|
|
@ResponseBody
|
|
|
public String print(String reportName, String whereCondition, Map<String, Object> otherParameters,
|
|
|
HttpServletResponse response) {
|
|
|
@@ -72,8 +72,7 @@ public class PrintController {
|
|
|
outputStream.flush();
|
|
|
outputStream.close();
|
|
|
} catch (IOException e) {
|
|
|
- logger.error("连接被关闭!");
|
|
|
- e.printStackTrace();
|
|
|
+ logger.error("浏览器重复请求!");
|
|
|
}
|
|
|
|
|
|
message = "报表 " + reportName + " 打印完成!";
|
|
|
@@ -93,7 +92,7 @@ public class PrintController {
|
|
|
String reportName = "Purchase";
|
|
|
String whereCondition = "where pu_code = 'MP160800017' and pd_qty > 1000";
|
|
|
Map<String, Object> otherParameters = new HashMap<>();
|
|
|
- otherParameters.put("OTHER_PARAMETER_1", "天气真好!");
|
|
|
+ otherParameters.put("OTHER_PARAMETER_TEST", "天气真好!");
|
|
|
return print(reportName, whereCondition, otherParameters, response);
|
|
|
}
|
|
|
}
|