@ -276,22 +276,28 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
protected void addTableDataParameters ( Map < String , ParameterProvider > map , Filter < ParameterProvider > filter ) {
protected void addTableDataParameters ( Map < String , ParameterProvider > map , Filter < ParameterProvider > filter ) {
Iterator < String > it = this . getBook ( ) . getTableDataNameIterator ( ) ;
Iterator < String > it = this . getBook ( ) . getTableDataNameIterator ( ) ;
List < String > names = new ArrayList < > ( ) ;
try {
try {
// 清空下缓存
List < TableData > tableDatas = new ArrayList < > ( ) ;
tableDataParametersMap . clear ( ) ;
while ( it . hasNext ( ) ) {
while ( it . hasNext ( ) ) {
String name = it . next ( ) ;
String name = it . next ( ) ;
TableData tableData = this . getBook ( ) . getTableData ( name ) ;
TableData tableData = this . getBook ( ) . getTableData ( name ) ;
ParameterProvider [ ] parameterProviders = DataOperator . getInstance ( ) . getTableDataParameters ( tableData ) ;
tableDatas . add ( tableData ) ;
names . add ( name ) ;
}
ParameterProvider [ ] [ ] totalParameterProviders = DataOperator . getInstance ( ) . getTotalTableDataParameters ( tableDatas ) ;
tableDataParametersMap . clear ( ) ;
for ( int i = 0 ; i < totalParameterProviders . length ; i + + ) {
ParameterProvider [ ] parameterProviders = totalParameterProviders [ i ] ;
if ( filter ! = null ) {
if ( filter ! = null ) {
ParameterApplyHelper . addPara2Map ( map , parameterProviders , filter , null , ParameterSource . DEFAULT_SOURCE ) ;
ParameterApplyHelper . addPara2Map ( map , parameterProviders , filter , null , ParameterSource . DEFAULT_SOURCE ) ;
} else {
} else {
ParameterApplyHelper . addPara2Map ( map , parameterProviders , null , ParameterSource . TEMPLATE_SOURCE ) ;
ParameterApplyHelper . addPara2Map ( map , parameterProviders , null , ParameterSource . TEMPLATE_SOURCE ) ;
}
}
tableDataParametersMap . put ( name , parameterProviders ) ;
tableDataParametersMap . put ( names . get ( i ) , parameterProviders ) ;
}
}
} catch ( Exception e ) {
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
FineLoggerFactory . getLogger ( ) . error ( e , e . getMessage ( ) ) ;
}
}
}
}