Commit 638cefca authored by chase's avatar chase

fix tbm公式无数据时显示不对bug

parent abf857d5
...@@ -42,19 +42,15 @@ public class TBM extends FunctionBase implements FreeRefFunction { ...@@ -42,19 +42,15 @@ public class TBM extends FunctionBase implements FreeRefFunction {
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList(); List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
List<String> segment3List = getSegment3List(evenType, mappingName); List<String> segment3List = getSegment3List(evenType, mappingName);
if (CollectionUtils.isEmpty(segment3List)) {
return NumberEval.ZERO;
}
double result = 0.00; double result = 0.00;
if (sourceDataType == 1) { if (CollectionUtils.isNotEmpty(segment3List)) {
result = countForTrialBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId()); if (sourceDataType == 1) {
} else if (sourceDataType == 2) { result = countForTrialBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId());
result = countForAdjBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId()); } else if (sourceDataType == 2) {
} else if (sourceDataType == 3) { result = countForAdjBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId());
result = countForTrialFinalBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId()); } else if (sourceDataType == 3) {
} else { result = countForTrialFinalBalance(evenType, calculateType, segment3List, dataSource, formulaContext.getPeriod(), formulaContext.getYear(), formulaContext.getOrganizationId());
return NumberEval.ZERO; }
} }
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource), Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
FormulaDataSourceDetailType.FormulaDataSourceDto, FormulaDataSourceDetailType.FormulaDataSourceDto,
......
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