|
@@ -548,6 +548,42 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "分部2022双11活动统计导出")
|
|
|
+ @RequestMapping("export/organDoubleEleven2022Statis")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/organDoubleEleven2022Statis')")
|
|
|
+ public void organDoubleEleven2022Statis(HttpServletResponse response, OrganDoubleEleven2021StatisDto statisDto) throws IOException {
|
|
|
+ List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2022Statis(statisDto);
|
|
|
+ if (rows.size() < 1) {
|
|
|
+ throw new BizException("没有可导出数据");
|
|
|
+ }
|
|
|
+ OutputStream outputStream = response.getOutputStream();
|
|
|
+ try {
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "总成交金额", "总购买人数", "人均购买金额",
|
|
|
+ "20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数",
|
|
|
+ "40节1v2成交金额", "40节1v2成交人数"}, new String[]{
|
|
|
+ "organName", "totalBuyAmount", "totalBuyNum", "avgBuyAmount", "vip1V120Amount", "vip1V120Num", "vip1V140Amount",
|
|
|
+ "vip1V140Num", "vip1V220Amount", "vip1V220Num", "vip1V240Amount"
|
|
|
+ , "vip1V240Num"}, rows);
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
+ response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
+ "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+
|
|
|
+ outputStream = response.getOutputStream();
|
|
|
+ workbook.write(outputStream);
|
|
|
+ outputStream.flush();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ if (outputStream != null) {
|
|
|
+ try {
|
|
|
+ outputStream.close();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "学生个人账户余额导出")
|
|
|
@PostMapping("export/userCashAccountDetail")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/userCashAccountDetail')")
|