diff --git a/src/com/bonus/cost/service/ProjectCostServiceImpl.java b/src/com/bonus/cost/service/ProjectCostServiceImpl.java index 038951e..ea1d8e8 100644 --- a/src/com/bonus/cost/service/ProjectCostServiceImpl.java +++ b/src/com/bonus/cost/service/ProjectCostServiceImpl.java @@ -1304,18 +1304,24 @@ public class ProjectCostServiceImpl implements ProjectCostService { HSSFRow row2 = sheet.createRow(startRowIndex); row2.setHeight((short) 800); - int colsPerSignature2 = totalColumns / 2; + int colsPerSignature2 = totalColumns / 3; // 需方审核人 HSSFCell cell2_1 = row2.createCell(0); cell2_1.setCellValue("需方审核人:"); cell2_1.setCellStyle(signatureStyle); sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, 0, colsPerSignature2 - 1)); + // 对其占用空白列 + HSSFCell cell2_3 = row2.createCell(colsPerSignature); + cell2_3.setCellValue(""); + cell2_3.setCellStyle(signatureStyle); + sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2, colsPerSignature2 * 2 - 1)); + // 供方审核人 - HSSFCell cell2_2 = row2.createCell(colsPerSignature2); + HSSFCell cell2_2 = row2.createCell(colsPerSignature2 * 2); cell2_2.setCellValue("供方审核人:"); cell2_2.setCellStyle(signatureStyle); - sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2, totalColumns - 1)); + sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2 * 2, totalColumns - 1)); // 为合并区域的所有单元格设置样式 for (int i = 0; i < totalColumns; i++) { @@ -1367,11 +1373,17 @@ public class ProjectCostServiceImpl implements ProjectCostService { cell4_1.setCellStyle(signatureStyle); sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, 0, colsPerSignature2 - 1)); + // 对其占用空白列 + HSSFCell cell4_3 = row4.createCell(colsPerSignature); + cell4_3.setCellValue(""); + cell4_3.setCellStyle(signatureStyle); + sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2, colsPerSignature2 * 2 - 1)); + // 供方单位(盖章) - HSSFCell cell4_2 = row4.createCell(colsPerSignature2); + HSSFCell cell4_2 = row4.createCell(colsPerSignature2 * 2); cell4_2.setCellValue("供方单位(盖章):"); cell4_2.setCellStyle(signatureStyle); - sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2, totalColumns - 1)); + sheet.addMergedRegion(new org.apache.poi.ss.util.CellRangeAddress(startRowIndex, startRowIndex, colsPerSignature2 * 2, totalColumns - 1)); // 为合并区域的所有单元格设置样式 for (int i = 0; i < totalColumns; i++) {