Commit 21bb51b9 authored by neo's avatar neo

[DEV] fixed cell list cacls catch exception

parent fd2f2d1d
......@@ -63,13 +63,14 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
List<Object> dataSource) throws NoSuchFieldException, IllegalAccessException {
BigDecimal bigDecimal = new BigDecimal(0);
for (PCell pCell : pCells) {
try {
List<CellTemplatePerGroupDto> cellTemplateDataList = agent.getCellTemplateGroupDto(formulaContext.getReportTemplateGroupId(),
formulaContext.getProjectId(), ec.getWorkbook().getSheetName(ec.getSheetIndex()), pCell.rowIndex-1,
pCell.columnIndex-1, formulaContext.getPeriod());
formulaContext.getProjectId(), ec.getWorkbook().getSheetName(ec.getSheetIndex()), pCell.rowIndex - 1,
pCell.columnIndex - 1, formulaContext.getPeriod());
MyAsserts.assertNotEmpty(cellTemplateDataList, Exceptions.PSUM_CELL_TEMP_NULL);
CellTemplatePerGroupDto cellTemplateData = cellTemplateDataList.get(0);
BigDecimal cellValue = getCellValue(ec,formulaContext,agent,pCell.rowIndex-1,pCell.columnIndex-1,
BigDecimal cellValue = getCellValue(ec, formulaContext, agent, pCell.rowIndex - 1, pCell.columnIndex - 1,
Long.parseLong(cellTemplateData.getCellTemplateId()));
ReportCellDataSourceDto dto = new ReportCellDataSourceDto();
dto.fixedWithGroup(cellTemplateData);
......@@ -80,6 +81,9 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
dataSource.add(dto);
bigDecimal = bigDecimal.add(cellValue);
}catch (Exception e){
e.printStackTrace();
}
}
return bigDecimal.setScale(4, BigDecimal.ROUND_HALF_DOWN);
......
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