|
|
@ -1,15 +1,11 @@ |
|
|
|
package com.hnac.hzims.ticket.twoTicket.service.impl; |
|
|
|
package com.hnac.hzims.ticket.twoTicket.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.http.server.HttpServerResponse; |
|
|
|
|
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.EasyExcel; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
|
|
|
import com.alibaba.excel.write.metadata.style.WriteCellStyle; |
|
|
|
import com.alibaba.excel.write.metadata.style.WriteFont; |
|
|
|
|
|
|
|
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
|
|
|
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
import com.hnac.hzims.ticket.allTicket.entity.TicketInfoEvaluateEntity; |
|
|
|
import com.hnac.hzims.ticket.allTicket.entity.TicketInfoEvaluateEntity; |
|
|
|
import com.hnac.hzims.ticket.allTicket.service.TicketInfoEvaluateService; |
|
|
|
import com.hnac.hzims.ticket.allTicket.service.TicketInfoEvaluateService; |
|
|
@ -41,9 +37,7 @@ import org.springblade.system.user.feign.IUserClient; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.OutputStream; |
|
|
|
|
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
@ -158,15 +152,18 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 两票统计分析导出 |
|
|
|
* 两票统计分析导出 |
|
|
|
* |
|
|
|
* |
|
|
|
|
|
|
|
* @param dateTime |
|
|
|
* @param response |
|
|
|
* @param response |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void exportTicketCount(HttpServletResponse response) { |
|
|
|
public void exportTicketCount(String dateTime, HttpServletResponse response) { |
|
|
|
String fileName = URLEncoder.encode("两票月报分析统计报表.xlsx"); |
|
|
|
String fileName = URLEncoder.encode("两票月报分析统计报表.xlsx"); |
|
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName); |
|
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName); |
|
|
|
response.setContentType("application/vnd.ms-excel;charset=utf-8"); |
|
|
|
response.setContentType("application/vnd.ms-excel;charset=utf-8"); |
|
|
|
response.setCharacterEncoding("utf-8"); |
|
|
|
response.setCharacterEncoding("utf-8"); |
|
|
|
List<TicketCount> ticketCounts = baseMapper.selectList(null); |
|
|
|
LambdaQueryWrapper<TicketCount> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq(TicketCount::getDateTime, dateTime); |
|
|
|
|
|
|
|
List<TicketCount> ticketCounts = baseMapper.selectList(queryWrapper); |
|
|
|
List<TicketCountResponseVo> countResponseList = getTicketCountResponseList(ticketCounts); |
|
|
|
List<TicketCountResponseVo> countResponseList = getTicketCountResponseList(ticketCounts); |
|
|
|
//导出
|
|
|
|
//导出
|
|
|
|
//内容样式策略
|
|
|
|
//内容样式策略
|
|
|
|