Commit 638cefca authored by chase's avatar chase

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

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