Commit 3042e676 authored by yanzg's avatar yanzg

接口文档的支持

parent d744bb15
......@@ -295,14 +295,19 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
ExcelMergerData mergerData = mergerGroupData.get(column.getMegerGroup());
// 判断是否需要合并历史记录
if (mergerData.getRowIndexHistory() != mergerData.getRowIndex() - 1) {
if (mergerData.getRowCell() > 1) {
// 合并历史记录单元格
mergerData(mergerData, columnPos);
}
} else {
// 当不需要合并历史记录时,则创建新的内容
Cell cell = row.createCell(columnPos);
cell.setCellValue(value);
}
// if (mergerData.getRowIndexHistory() != mergerData.getRowIndex() - 1) {
// // 合并历史记录单元格
// mergerData(mergerData, columnPos);
// }
} else {
// 不合并时直接写入单元格内容
......@@ -321,8 +326,8 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
* @param columnPos 合并的列位置
*/
private void mergerData(ExcelMergerData mergerColumn, int columnPos) {
int rowStart = mergerColumn.getRowIndexHistory();
int rowEnd = rowStart + mergerColumn.getRowCellHistory() - 1;
int rowStart = mergerColumn.getRowIndex();
int rowEnd = rowStart + mergerColumn.getRowCell() - 1;
CellRangeAddress region = new CellRangeAddress(rowStart, rowEnd, columnPos, columnPos);
sheet.addMergedRegion(region);
}
......
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