Sfoglia il codice sorgente

修复底层bug 两个

4.1.3.A
xfworld 9 anni fa
parent
commit
0ad7a91c11
1 ha cambiato i file con 7 aggiunte e 6 eliminazioni
  1. +7
    -6
      easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/base/ExcelExportBase.java

+ 7
- 6
easypoi-base/src/main/java/org/jeecgframework/poi/excel/export/base/ExcelExportBase.java Vedi File

@@ -93,10 +93,12 @@ public abstract class ExcelExportBase extends ExportBase {
if (entity.getList() != null) { if (entity.getList() != null) {
Collection<?> list = getListCellValue(entity, t); Collection<?> list = getListCellValue(entity, t);
int listC = 0; int listC = 0;
for (Object obj : list) {
createListCells(patriarch, index + listC, cellNum, obj, entity.getList(), sheet,
workbook);
listC++;
if(list!=null&&list.size()>0){
for (Object obj : list) {
createListCells(patriarch, index + listC, cellNum, obj, entity.getList(), sheet,
workbook);
listC++;
}
} }
cellNum += entity.getList().size(); cellNum += entity.getList().size();
if (list != null && list.size() > maxHeight) { if (list != null && list.size() > maxHeight) {
@@ -197,8 +199,7 @@ public abstract class ExcelExportBase extends ExportBase {
} }
private int createIndexCell(Row row, int index, ExcelExportEntity excelExportEntity) { private int createIndexCell(Row row, int index, ExcelExportEntity excelExportEntity) {
if (excelExportEntity.getName().equals("序号")
&& excelExportEntity.getFormat().equals(PoiBaseConstants.IS_ADD_INDEX)) {
if (excelExportEntity.getName().equals("序号")&&excelExportEntity.getFormat()!=null&&excelExportEntity.getFormat().equals(PoiBaseConstants.IS_ADD_INDEX)) {
createStringCell(row, 0, currentIndex + "", createStringCell(row, 0, currentIndex + "",
index % 2 == 0 ? getStyles(false, null) : getStyles(true, null), null); index % 2 == 0 ? getStyles(false, null) : getStyles(true, null), null);
currentIndex = currentIndex + 1; currentIndex = currentIndex + 1;


Caricamento…
Annulla
Salva