| | |
| | | columns := construct( LocalColumns ); |
| | | LocalCell_DemandComparison::GenerateColumnIndex( baseVersionTable,localTable,columnTree,columns ); |
| | | LocalCell_DemandComparison::GenerateColumnIndex( compareVersionTable,localTable,columnTree,columns ); |
| | | columnNames := selectvalues( columns,Elements,column,true,column.Name() ); |
| | | columnNames := selectvalues( columns,Elements,column,true,column.CustomName()); |
| | | |
| | | // 生成数据 |
| | | for ( rowIndex := 0; rowIndex < rowKeys.Size(); rowIndex++ ) { |
| | |
| | | |
| | | row := localTable.LocalRow( relnew,Index := localTable.GetRowIndexCache() ); |
| | | |
| | | traverse( columnNames,Elements,columnName ){ |
| | | traverse( columnNames,Elements,columnName ,columnName <> "" ){ |
| | | columnHandle := columnTree.GetHandle( columnName ); |
| | | columnIndex := columnTree.Root().Child( columnHandle ).GetValueAsNumber(); |
| | | column := columns.Element( columnIndex ); |
| | | columnIndex := guard( columnTree.Root().Child( columnHandle ) , null( NamedValue )); |
| | | column := null( LocalColumn ); |
| | | if( not isnull( columnIndex )){ |
| | | column := columns.Element( columnIndex.GetValueAsNumber() ); |
| | | } |
| | | if( isnull( column )){ |
| | | error( columnName + " is null." ); |
| | | } |
| | | |
| | | baseVersionCell := constnull( GeneralExcelImportAndExportDataCell ); |
| | | baseVersionCellHandle := baseVersionCellTree.GetHandle( columnName ); |
| | | try{ |
| | | baseVersionCellIndex := baseVersionCellTree.Root().Child( baseVersionCellHandle ).GetValueAsNumber(); |
| | | baseVersionCell := baseVersionCells.Element( baseVersionCellIndex ); |
| | | }onerror{} |
| | | baseVersionCellIndex := guard( baseVersionCellTree.Root().Child( baseVersionCellHandle ),null( NamedValue )); |
| | | if( not isnull( baseVersionCellIndex )){ |
| | | baseVersionCell := baseVersionCells.Element( baseVersionCellIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | compareVersionCell := constnull( GeneralExcelImportAndExportDataCell ); |
| | | compareVersionCellHandle := compareVersionCellTree.GetHandle( columnName ); |
| | | try{ |
| | | compareVersionCellIndex := compareVersionCellTree.Root().Child( compareVersionCellHandle ).GetValueAsNumber(); |
| | | compareVersionCell := compareVersionCells.Element( compareVersionCellIndex ); |
| | | }onerror{} |
| | | compareVersionCellIndex := guard( compareVersionCellTree.Root().Child( compareVersionCellHandle ),null( NamedValue )); |
| | | if( not isnull( compareVersionCellIndex )){ |
| | | compareVersionCell := compareVersionCells.Element( compareVersionCellIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | if( columnName = "产地" or columnName = "车型" or columnName = "发动机零件号" or columnName = "发动机四位码" ){ |
| | | row.LocalCell( relnew,LocalCell_DemandComparison,LocalColumn := column, |
| | |
| | | if( not isnull( compareVersionFile )){ |
| | | compareVersionFile.Close(); |
| | | } |
| | | error( e ); |
| | | error( e.GeneralInformation() ); |
| | | } |
| | | |
| | | return localTable; |