记得上下班打卡 | git大法好,push需谨慎

Commit 88d1c522 authored by GaoHu's avatar GaoHu

代理数据导出ex文件名(演出名+日期+代理数据)

parent 59fcb098
...@@ -52,11 +52,11 @@ public class SmileShowBaseController extends BaseController { ...@@ -52,11 +52,11 @@ public class SmileShowBaseController extends BaseController {
@GetMapping("/export") @GetMapping("/export")
@ApiOperation("单个演出销售列表导出") @ApiOperation("单个演出销售列表导出")
@ResponseBody @ResponseBody
public void export(String perId, HttpServletResponse response) { public void export(String perId,String title, HttpServletResponse response) {
ServletOutputStream servletOutputStream = null; ServletOutputStream servletOutputStream = null;
try { try {
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=".concat(DateUtil.Formatter.ddHHmmssTrim.format(LocalDateTime.now())) response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename="
.concat(new String(("单个演出销售列表导出").getBytes("gb2312"), StandardCharsets.ISO_8859_1)).concat(ExcelTypeEnum.XLSX.getValue())); .concat(new String((title + DateUtil.getNowTime() + "代理数据").getBytes("gb2312"), StandardCharsets.ISO_8859_1)).concat(ExcelTypeEnum.XLSX.getValue()));
response.setContentType(MediaType.MULTIPART_FORM_DATA_VALUE); response.setContentType(MediaType.MULTIPART_FORM_DATA_VALUE);
response.setCharacterEncoding(StandardCharsets.UTF_8.name()); response.setCharacterEncoding(StandardCharsets.UTF_8.name());
servletOutputStream = response.getOutputStream(); servletOutputStream = response.getOutputStream();
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
headers: {"Content-Type": "application/json;charset=UTF-8"}, headers: {"Content-Type": "application/json;charset=UTF-8"},
data: params, data: params,
success: function (e) { success: function (e) {
window.location.replace('http://' + window.location.host + '/smile/show/base/export?perId=' + '[[${saleDataVo.performancesId}]]'.replaceAll("\"", "")) window.location.replace('http://' + window.location.host + '/smile/show/base/export?perId=' + '[[${saleDataVo.performancesId}]]'.replaceAll("\"", "") + '&title=' + '[[${saleDataVo.title}]]')
} }
}); });
......
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