大屏接口

dev_0531
yechenhao 5 years ago
parent 5eeaefd639
commit 81390cf53f

@ -38,6 +38,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -655,10 +656,8 @@ public class StorePromotionDataService {
});
String[] headNames = new String[]{"零售公司编号", "零售公司","店铺名", "店铺编号", "客户名称", "客户id", "添加店铺总数"};
HSSFWorkbook ws = new HSSFWorkbook();
XSSFWorkbook ws = new XSSFWorkbook();
Sheet hssfSheet = ws.createSheet("推广管理");
HSSFCellStyle cellStyle = ws.createCellStyle();
cellStyle.setWrapText(true);//设置自动换行
int isAdd = 0;
//设置列名
if (null != headNames && headNames.length > 0) {
@ -696,7 +695,7 @@ public class StorePromotionDataService {
nameCell.setCellValue(customerDistinctDTO.getCount());
}
OutputStream output = response.getOutputStream();
response.setHeader("Content-disposition", "attachment; filename=store.xls");
response.setHeader("Content-disposition", "attachment; filename=store.xlsx");
response.setContentType("application/vnd.ms-excel");
ws.write(output);
ws.close();

Loading…
Cancel
Save