Commit 6962eba4 authored by 高滢's avatar 高滢

导出方案 加一个概要

parent 8bc432cc
...@@ -173,7 +173,7 @@ public class TestPlanRecordController extends BaseController{ ...@@ -173,7 +173,7 @@ public class TestPlanRecordController extends BaseController{
cover.put("车辆VIN号:",systemReviewExportRequest.getCarModel()); cover.put("车辆VIN号:",systemReviewExportRequest.getCarModel());
cover.put("检测机构:",systemReviewExportRequest.getTestOrganizationName()); cover.put("检测机构:",systemReviewExportRequest.getTestOrganizationName());
cover.put("生成时间:",systemReviewExportRequest.getCreateTime()); cover.put("生成时间:",systemReviewExportRequest.getCreateTime());
ExcelMultipleSheetsUtil.excelMultipleSheets(result, "导出方案" + DateUtil.format(new Date(), "yyyyMMdd"), XLSX_SUFFIX, respon,cover); ExcelMultipleSheetsUtil.excelMultipleSheets(result, "检测方案" + DateUtil.format(new Date(), "yyyyMMdd"), XLSX_SUFFIX, respon,cover);
} }
} }
...@@ -42,7 +42,7 @@ public class ExcelMultipleSheetsUtil { ...@@ -42,7 +42,7 @@ public class ExcelMultipleSheetsUtil {
Row dataRowHead = sheetFirst.createRow(1); Row dataRowHead = sheetFirst.createRow(1);
dataRowHead .setHeightInPoints(20); dataRowHead .setHeightInPoints(20);
Cell cell = dataRowHead.createCell(0); Cell cell = dataRowHead.createCell(0);
dataRowHead.createCell(1); dataRowHead.createCell(1).setCellStyle(getStyle(sheetFirst.getWorkbook()));
cell.setCellValue("检测方案"); cell.setCellValue("检测方案");
cell.setCellStyle(getStyle(sheetFirst.getWorkbook())); cell.setCellStyle(getStyle(sheetFirst.getWorkbook()));
// 合并区域:从第1行到第2行,第1列到第2列(注意:行和列的索引从0开始) // 合并区域:从第1行到第2行,第1列到第2列(注意:行和列的索引从0开始)
...@@ -53,8 +53,12 @@ public class ExcelMultipleSheetsUtil { ...@@ -53,8 +53,12 @@ public class ExcelMultipleSheetsUtil {
cover.forEach((key,value)->{ cover.forEach((key,value)->{
Row dataRow = sheetFirst.createRow(i[0]); Row dataRow = sheetFirst.createRow(i[0]);
dataRow.setHeightInPoints(20); dataRow.setHeightInPoints(20);
dataRow.createCell(0).setCellValue(key); Cell cellTitle = dataRow.createCell(0);
dataRow.createCell(1).setCellValue(value); cellTitle.setCellValue(key);
cellTitle.setCellStyle(createCellStyle(sheetFirst.getWorkbook()));
Cell cellText = dataRow.createCell(1);
cellText.setCellValue(value);
cellText.setCellStyle(createCellStyle(sheetFirst.getWorkbook()));
i[0] = i[0] +1; i[0] = i[0] +1;
}); });
......
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