|
|
@ -5,9 +5,10 @@ import au.com.royalpay.payment.manage.dev.core.AliforexcelService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFFont;
|
|
|
|
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
@ -34,18 +35,12 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
httpResponse.addHeader("Content-Disposition", "attachment; filename=" + codedFileName +query.getDatefrom() + "~" +query.getDateto() + ".xls");
|
|
|
|
httpResponse.addHeader("Content-Disposition", "attachment; filename=" + codedFileName +query.getDatefrom() + "~" +query.getDateto() + ".xls");
|
|
|
|
ous = httpResponse.getOutputStream();
|
|
|
|
ous = httpResponse.getOutputStream();
|
|
|
|
HSSFWorkbook wb = new HSSFWorkbook();
|
|
|
|
HSSFWorkbook wb = new HSSFWorkbook();
|
|
|
|
HSSFFont font = wb.createFont();
|
|
|
|
|
|
|
|
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
|
|
|
|
|
|
|
|
font.setFontHeightInPoints((short) 15);
|
|
|
|
|
|
|
|
CellStyle analysisStyle = wb.createCellStyle();
|
|
|
|
|
|
|
|
analysisStyle.setFont(font);
|
|
|
|
|
|
|
|
Sheet sheet = wb.createSheet("支付宝进件专用" );
|
|
|
|
Sheet sheet = wb.createSheet("支付宝进件专用" );
|
|
|
|
sheet.createFreezePane(1, 2);
|
|
|
|
sheet.createFreezePane(1, 2);
|
|
|
|
sheet.setDefaultColumnWidth((short) 25);
|
|
|
|
sheet.setDefaultColumnWidth((short) 25);
|
|
|
|
int rowNum = 0;
|
|
|
|
int rowNum = 0;
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
Row row = sheet.createRow(rowNum);
|
|
|
|
String[] title = {"公司注册名称", "对外营业名称", "","所属行业(数字代码即可)","地址","eg. Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00\n请注意格式","+61 452296105\n" +
|
|
|
|
String[] title = {"Company name", "Store name", "Partner Code","Industry","Store address","Business hours","Contact information","Video link (optional)","Store description","Tags"};
|
|
|
|
"请注意格式","youtube视频介绍链接(若有)","门店介绍","标签"};
|
|
|
|
|
|
|
|
for (int i = 0; i < title.length; i++) {
|
|
|
|
for (int i = 0; i < title.length; i++) {
|
|
|
|
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
|
|
|
|
row.createCell(i, Cell.CELL_TYPE_STRING).setCellValue(title[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -59,7 +54,7 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("business_hours"));
|
|
|
|
row.createCell(5, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("business_hours"));
|
|
|
|
row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("company_phone"));
|
|
|
|
row.createCell(6, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("company_phone"));
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
|
|
|
|
row.createCell(7, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
|
|
|
|
row.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("description"));
|
|
|
|
row.createCell(8, Cell.CELL_TYPE_STRING).setCellValue(partner.getString("merchant_introduction"));
|
|
|
|
row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
|
|
|
|
row.createCell(9, Cell.CELL_TYPE_STRING).setCellValue(partner.getString(""));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wb.write(ous);
|
|
|
|
wb.write(ous);
|
|
|
|