Commit 48d8d5d6 authored by yanzg's avatar yanzg

接口文档的支持

parent c8438535
......@@ -281,7 +281,6 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
Row row = sheet.createRow(rowIndex);
row.setHeight(getUnit(this.config.getRowHeight()));
// 合并組数据处理
for (Map.Entry<String, List<String>> groupKvp : mergerGroup.entrySet()) {
// 将当前組生成值密钥
......@@ -292,7 +291,6 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
sb.append(":");
}
String groupValue = StringHelper.md5(sb.toString());
// 更新合并内容
ExcelMergerData mergerData = mergerGroupData.get(groupKvp.getKey());
mergerData.updateMerger(rowIndex, groupValue);
......@@ -306,20 +304,24 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
// 当不需要合并历史记录时,则创建新的内容
Cell cell = createCell(row, columnPos, value, true);
// 判断列是否需要合并
if (column.isMerger()) {
ExcelMergerData mergerData = mergerGroupData.get(column.getMegerGroup());
// 判断是否需要合并历史记录
if (mergerData.isMergerFlag()) {
// 合并历史记录单元格
mergerData(mergerData, columnPos);
}
}
mergerColumn(column, columnPos, false);
}
rowIndex++;
}
private void mergerColumn(ExportColumn column, int columnPos, boolean last) {
// 判断列是否需要合并
if (column.isMerger()) {
ExcelMergerData mergerData = mergerGroupData.get(column.getMegerGroup());
// 判断是否需要合并历史记录
if (mergerData.isMergerFlag() || last) {
// 合并历史记录单元格
mergerData(mergerData, columnPos);
}
}
}
/**
* 合并数据
*
......@@ -346,15 +348,8 @@ public class ExcelConsole<T extends Object> implements DbRow<T> {
// 合并数据配置
for (int columnPos = 0; columnPos < this.config.getColumns().size(); columnPos++) {
ExportColumn column = this.config.getColumns().get(columnPos);
// 判断列是否需要合并
if (column.isMerger()) {
ExcelMergerData mergerData = mergerGroupData.get(column.getMegerGroup());
// 判断是否需要合并历史记录
if (mergerData.isMergerFlag()) {
// 合并历史记录单元格
mergerData(mergerData, columnPos);
}
}
mergerColumn(column, columnPos, true);
if (column.getWidth() < 1) {
//设置单元格长度, 这里要乘上256
int maxBytes = columnBytes.get(columnPos);
......
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