|
|
|
@ -156,12 +156,26 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
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) { |
|
|
|
|
analysisCell.setRowIndex(analysisCell.getRowIndex() + number); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doFill(List<AnalysisCell> analysisCellList, Object oneRowData, FillConfig fillConfig, |
|
|
|
|
Integer relativeRowIndex) { |
|
|
|
@ -384,8 +398,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
|
|
|
|
int startIndex = 0; |
|
|
|
|
int length = value.length(); |
|
|
|
|
int lastPrepareDataIndex = 0; |
|
|
|
|
out: |
|
|
|
|
while (startIndex < length) { |
|
|
|
|
out: while (startIndex < length) { |
|
|
|
|
int prefixIndex = value.indexOf(FILL_PREFIX, startIndex); |
|
|
|
|
if (prefixIndex < 0) { |
|
|
|
|
break out; |
|
|
|
@ -515,4 +528,8 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
|
|
|
|
|
return prefix + "-" + wrapperName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private String tablePrefix(String uniqueDataFlag) { |
|
|
|
|
return uniqueDataFlag.substring(0, uniqueDataFlag.indexOf("-") + 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|