Commit be3a5b9e authored by yanzg's avatar yanzg

接口文档的支持

parent bdb7e247
......@@ -324,7 +324,7 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
// 判断是否需要合并历史记录
if (mergerData.isMergerFlag() || last) {
// 合并历史记录单元格
mergerData(mergerData, columnPos);
mergerData(mergerData, columnPos, last);
}
}
}
......@@ -334,10 +334,15 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
*
* @param mergerColumn 需要合并的列
* @param columnPos 合并的列位置
* @param last 是否最后一行,最后一行,则合并之前的数据
*/
private void mergerData(ExcelMergerData mergerColumn, int columnPos) {
private void mergerData(ExcelMergerData mergerColumn, int columnPos, boolean last) {
int rowStart = mergerColumn.getRowIndexHistory();
int rowEnd = rowStart + mergerColumn.getRowCellHistory() - 1;
if (last) {
rowStart = mergerColumn.getRowIndex();
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