@ -276,22 +276,28 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
protected void addTableDataParameters ( Map < String , ParameterProvider > map , Filter < ParameterProvider > filter ) {
Iterator < String > it = this . getBook ( ) . getTableDataNameIterator ( ) ;
List < String > names = new ArrayList < > ( ) ;
try {
// 清空下缓存
tableDataParametersMap . clear ( ) ;
List < TableData > tableDatas = new ArrayList < > ( ) ;
while ( it . hasNext ( ) ) {
String name = it . next ( ) ;
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 ) {
ParameterApplyHelper . addPara2Map ( map , parameterProviders , filter , null , ParameterSource . DEFAULT_SOURCE ) ;
} else {
ParameterApplyHelper . addPara2Map ( map , parameterProviders , null , ParameterSource . TEMPLATE_SOURCE ) ;
}
tableDataParametersMap . put ( name , parameterProviders ) ;
tableDataParametersMap . put ( names . get ( i ) , parameterProviders ) ;
}
} catch ( Exception e ) {
FineLoggerFactory . getLogger ( ) . error ( e . getMessage ( ) , e ) ;
FineLoggerFactory . getLogger ( ) . error ( e , e . getMessage ( ) ) ;
}
}