|
|
@ -101,7 +101,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
realData = data; |
|
|
|
realData = data; |
|
|
|
currentDataPrefix = null; |
|
|
|
currentDataPrefix = null; |
|
|
|
} |
|
|
|
} |
|
|
|
currentUniqueDataFlag = uniqueDataFlag(writeContext.writeSheetHolder().getSheetNo(), currentDataPrefix); |
|
|
|
currentUniqueDataFlag = uniqueDataFlag(writeContext.writeSheetHolder(), currentDataPrefix); |
|
|
|
|
|
|
|
|
|
|
|
// processing data
|
|
|
|
// processing data
|
|
|
|
if (realData instanceof Collection) { |
|
|
|
if (realData instanceof Collection) { |
|
|
@ -444,7 +444,6 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
|
|
|
|
|
|
|
|
private String dealAnalysisCell(AnalysisCell analysisCell, String value, int rowIndex, int lastPrepareDataIndex, |
|
|
|
private String dealAnalysisCell(AnalysisCell analysisCell, String value, int rowIndex, int lastPrepareDataIndex, |
|
|
|
int length, Map<String, Set<Integer>> firstRowCache, StringBuilder preparedData) { |
|
|
|
int length, Map<String, Set<Integer>> firstRowCache, StringBuilder preparedData) { |
|
|
|
Integer sheetNo = writeContext.writeSheetHolder().getSheetNo(); |
|
|
|
|
|
|
|
if (analysisCell != null) { |
|
|
|
if (analysisCell != null) { |
|
|
|
if (lastPrepareDataIndex == length) { |
|
|
|
if (lastPrepareDataIndex == length) { |
|
|
|
analysisCell.getPrepareDataList().add(StringUtils.EMPTY); |
|
|
|
analysisCell.getPrepareDataList().add(StringUtils.EMPTY); |
|
|
@ -452,7 +451,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
analysisCell.getPrepareDataList().add(convertPrepareData(value.substring(lastPrepareDataIndex))); |
|
|
|
analysisCell.getPrepareDataList().add(convertPrepareData(value.substring(lastPrepareDataIndex))); |
|
|
|
analysisCell.setOnlyOneVariable(Boolean.FALSE); |
|
|
|
analysisCell.setOnlyOneVariable(Boolean.FALSE); |
|
|
|
} |
|
|
|
} |
|
|
|
String uniqueDataFlag = uniqueDataFlag(sheetNo, analysisCell.getPrefix()); |
|
|
|
String uniqueDataFlag = uniqueDataFlag(writeContext.writeSheetHolder(), analysisCell.getPrefix()); |
|
|
|
if (WriteTemplateAnalysisCellTypeEnum.COMMON.equals(analysisCell.getCellType())) { |
|
|
|
if (WriteTemplateAnalysisCellTypeEnum.COMMON.equals(analysisCell.getCellType())) { |
|
|
|
List<AnalysisCell> analysisCellList = templateAnalysisCache.get(uniqueDataFlag); |
|
|
|
List<AnalysisCell> analysisCellList = templateAnalysisCache.get(uniqueDataFlag); |
|
|
|
if (analysisCellList == null) { |
|
|
|
if (analysisCellList == null) { |
|
|
@ -503,11 +502,17 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor { |
|
|
|
return prepareData; |
|
|
|
return prepareData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String uniqueDataFlag(Integer sheetNo, String wrapperName) { |
|
|
|
private String uniqueDataFlag(WriteSheetHolder writeSheetHolder, String wrapperName) { |
|
|
|
|
|
|
|
String prefix; |
|
|
|
|
|
|
|
if (writeSheetHolder.getSheetNo() != null) { |
|
|
|
|
|
|
|
prefix = writeSheetHolder.getSheetNo().toString(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
prefix = writeSheetHolder.getSheetName().toString(); |
|
|
|
|
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(wrapperName)) { |
|
|
|
if (StringUtils.isEmpty(wrapperName)) { |
|
|
|
return sheetNo.toString() + "-"; |
|
|
|
return prefix + "-"; |
|
|
|
} |
|
|
|
} |
|
|
|
return sheetNo + "-" + wrapperName; |
|
|
|
return prefix + "-" + wrapperName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|