Commit ec87c252 authored by neo's avatar neo

[bugfix] if not found celltemplate use default formula block

parent 5e6682b7
......@@ -61,13 +61,14 @@ public class BB extends FunctionBase implements FreeRefFunction {
dataSource.add(nullCellDto);
BigDecimal cellValue = BigDecimal.ZERO;
CellTemplatePerGroupDto cellTemplateData = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupID(),
formulaContext.getProjectID()).stream().filter(dto -> dto.getRowIndex() == bo.getRowIndex() - 1
&& dto.getColumnIndex() == bo.getColumnIndex() - 1 && dto.getReportCode().equals(bo.getReportCode()))
.findFirst().orElseThrow(() -> {
return Exceptions.BB_CELL_TEMP_NULL;
});
try {
CellTemplatePerGroupDto cellTemplateData = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupID(),
formulaContext.getProjectID()).stream().filter(dto -> dto.getRowIndex() == bo.getRowIndex() - 1
&& dto.getColumnIndex() == bo.getColumnIndex() - 1 && dto.getReportCode().equals(bo.getReportCode()))
.findFirst().orElseThrow(() -> {
return Exceptions.BB_CELL_TEMP_NULL;
});
MyAsserts.assertNotNull(cellTemplateData, Exceptions.BB_CELL_TEMP_NULL);
nullCellDto.fixedWithGroup(cellTemplateData);
......
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