|
|
@ -156,12 +156,26 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
sheet.shiftRows(maxRowIndex + 1, lastRowIndex, number, true, false); |
|
|
|
sheet.shiftRows(maxRowIndex + 1, lastRowIndex, number, true, false); |
|
|
|
for (AnalysisCell analysisCell : templateAnalysisCache.get(currentUniqueDataFlag)) { |
|
|
|
|
|
|
|
|
|
|
|
// The current data is greater than unity rowindex increase
|
|
|
|
|
|
|
|
String tablePrefix = tablePrefix(currentUniqueDataFlag); |
|
|
|
|
|
|
|
increaseRowIndex(templateAnalysisCache, number, maxRowIndex, tablePrefix); |
|
|
|
|
|
|
|
increaseRowIndex(templateCollectionAnalysisCache, number, maxRowIndex, tablePrefix); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void increaseRowIndex(Map<String, List<AnalysisCell>> templateAnalysisCache, int number, int maxRowIndex, |
|
|
|
|
|
|
|
String tablePrefix) { |
|
|
|
|
|
|
|
for (Map.Entry<String, List<AnalysisCell>> entry : templateAnalysisCache.entrySet()) { |
|
|
|
|
|
|
|
if (!tablePrefix.equals(tablePrefix(entry.getKey()))) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (AnalysisCell analysisCell : entry.getValue()) { |
|
|
|
if (analysisCell.getRowIndex() > maxRowIndex) { |
|
|
|
if (analysisCell.getRowIndex() > maxRowIndex) { |
|
|
|
analysisCell.setRowIndex(analysisCell.getRowIndex() + number); |
|
|
|
analysisCell.setRowIndex(analysisCell.getRowIndex() + number); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void doFill(List<AnalysisCell> analysisCellList, Object oneRowData, FillConfig fillConfig, |
|
|
|
private void doFill(List<AnalysisCell> analysisCellList, Object oneRowData, FillConfig fillConfig, |
|
|
|
Integer relativeRowIndex) { |
|
|
|
Integer relativeRowIndex) { |
|
|
@ -384,8 +398,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
int startIndex = 0; |
|
|
|
int startIndex = 0; |
|
|
|
int length = value.length(); |
|
|
|
int length = value.length(); |
|
|
|
int lastPrepareDataIndex = 0; |
|
|
|
int lastPrepareDataIndex = 0; |
|
|
|
out: |
|
|
|
out: while (startIndex < length) { |
|
|
|
while (startIndex < length) { |
|
|
|
|
|
|
|
int prefixIndex = value.indexOf(FILL_PREFIX, startIndex); |
|
|
|
int prefixIndex = value.indexOf(FILL_PREFIX, startIndex); |
|
|
|
if (prefixIndex < 0) { |
|
|
|
if (prefixIndex < 0) { |
|
|
|
break out; |
|
|
|
break out; |
|
|
@ -515,4 +528,8 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
return prefix + "-" + wrapperName; |
|
|
|
return prefix + "-" + wrapperName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String tablePrefix(String uniqueDataFlag) { |
|
|
|
|
|
|
|
return uniqueDataFlag.substring(0, uniqueDataFlag.indexOf("-") + 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|