|
|
@@ -6,6 +6,7 @@ import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.sql.SQLException;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -44,6 +45,8 @@ import net.sf.jasperreports.engine.JRException;
|
|
|
@RequestMapping("/print")
|
|
|
public class PrintController {
|
|
|
|
|
|
+ private static final long timestamp = new Date().getTime();
|
|
|
+
|
|
|
@Autowired
|
|
|
private PrintService printService;
|
|
|
|
|
|
@@ -92,7 +95,7 @@ public class PrintController {
|
|
|
// 预览或打印
|
|
|
if (printType.equals(ReportConstants.PRINT_TYPE_PREVIEW)
|
|
|
|| printType.equals(ReportConstants.PRINT_TYPE_PRINT)) {
|
|
|
- request.getRequestDispatcher("preview").forward(request, response);
|
|
|
+ request.getRequestDispatcher("preview?t=" + timestamp).forward(request, response);
|
|
|
}
|
|
|
// 下载pdf、纯数据excel
|
|
|
else if (printType.equals(ReportConstants.PRINT_TYPE_PDF)) {
|