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

Commit b0563abd authored by zhoujianping's avatar zhoujianping

1.增加预约统计导出相关功能

parent 10ac8ade
......@@ -7,8 +7,11 @@ import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.common.enums.BusinessType;
import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
import com.liquidnet.client.admin.zhengzai.kylin.dto.KylinOrderImportDto;
import com.liquidnet.client.admin.zhengzai.kylin.dto.KylinPerformanceSubscribeTicketStatisticalExportDao;
import com.liquidnet.client.admin.zhengzai.kylin.dto.PerformanceOrderStatisCountResp;
import com.liquidnet.client.admin.zhengzai.stone.service.dto.StoneScoreListExportDto;
import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.goblin.param.GoblinFrontCubeParam;
import com.liquidnet.service.kylin.dao.PerformanceAdminListDao;
......@@ -201,8 +204,26 @@ public class KylinPerformancesController extends BaseController {
public String subscribe(@PathVariable("performancesId") String performancesId, ModelMap mmap) {
List<KylinPerformanceSubscribeTicketStatisticalDao> result = kylinPerformancesService.getPerformanceSubscribe(performancesId);
mmap.put("subscribeStaticList", result);
mmap.put("performancesId",performancesId);
return prefix + "/subscribe";
}
@Log(title = "预约统计:导出列表")
@PostMapping("/subscribe/export")
@ResponseBody
public AjaxResult subscribeExport(@RequestParam("performancesId") String performancesId) {
List<KylinPerformanceSubscribeTicketStatisticalDao> list = kylinPerformancesService.getPerformanceSubscribe(performancesId);
ArrayList<KylinPerformanceSubscribeTicketStatisticalExportDao> listExport = new ArrayList<>();
for (KylinPerformanceSubscribeTicketStatisticalDao kylinPerformanceSubscribeTicketStatisticalDao : list) {
KylinPerformanceSubscribeTicketStatisticalExportDao kylinPerformanceSubscribeTicketStatisticalExportDao = new KylinPerformanceSubscribeTicketStatisticalExportDao();
kylinPerformanceSubscribeTicketStatisticalExportDao.setTimeTitle(kylinPerformanceSubscribeTicketStatisticalDao.getTimeTitle());
kylinPerformanceSubscribeTicketStatisticalExportDao.setTicketTimesTitle(kylinPerformanceSubscribeTicketStatisticalDao.getTicketTimesTitle());
kylinPerformanceSubscribeTicketStatisticalExportDao.setSubscribeTotal(kylinPerformanceSubscribeTicketStatisticalDao.getSubscribeTotal());
listExport.add(kylinPerformanceSubscribeTicketStatisticalExportDao);
}
ExcelUtil<KylinPerformanceSubscribeTicketStatisticalExportDao> util = new ExcelUtil(KylinPerformanceSubscribeTicketStatisticalExportDao.class);
return util.exportExcel(listExport, "预约统计");
}
//@RequiresPermissions("kylin:performances:view")
@PostMapping(value = "/agent/change")
@ResponseBody
......
......@@ -6,6 +6,9 @@
<body class="gray-bg">
<div class="container-div">
<div class="row">
<button id="fun1" type="button" class="btn btn-w-m btn-success" href="javascript:void(0)"
onclick="searchExport()">导出
</button>
<table class="col-sm-12 select-table table-bordered table table-stripped small m-t-md">
<thead>
<tr>
......@@ -38,5 +41,20 @@
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var performancesId=[[${performancesId}]];
var prefix = ctx + "kylin/performances";
function searchExport(){
$.modal.loading("正在导出数据,请稍后...");
$.post(prefix+'/subscribe/export', {performancesId: performancesId}, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
} else {
$.modal.alertError(result.msg);
}
$.modal.closeLoading();
});
}
</script>
</body>
</html>
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import lombok.Data;
import java.io.Serializable;
@Data
public class KylinPerformanceSubscribeTicketStatisticalExportDao implements Serializable, Cloneable {
@Excel(name = "场次", cellType = Excel.ColumnType.STRING)
private String ticketTimesTitle;
@Excel(name = "票种", cellType = Excel.ColumnType.STRING)
private String timeTitle;
@Excel(name = "预约人数", cellType = Excel.ColumnType.NUMERIC)
private Integer subscribeTotal;
}
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