| | |
| | | this.CapacityAndSaleBudgeCompareItemColumn( relflush ); |
| | | // ====汇总所有出现的产品==== |
| | | historyData := selectset( this, Global_MappingAnnualBudgetData, item, true ); |
| | | debuginfo( "historyData : " + [String]historyData.Size() ) |
| | | debuginfo( "historyData : " + [String]historyData.Size() ); |
| | | |
| | | traverse( historyData, Elements, one ) { |
| | | productCode := one.ProductID(); |
| | | Global_MappingOperationBOM::CreateTestData( otdTable, "事业部" + [String](productCode.Length() mod 3), "面板基地" + [String](productCode.Length() mod 4), productCode ); |
| | | boms := selectset( otdTable, Global_MappingOperationBOM, bom, bom.ProductCode() = productCode ); |
| | | if( boms.Size() > 0 ) { |
| | | bom := boms.First(); |
| | | businessType := bom.BusinessType(); |
| | | placeOfProductionOfArray := bom.OrganCode(); |
| | | // Global_MappingOperationBOM::CreateTestData( otdTable, "事业部" + [String](productCode.Length() mod 3), "面板基地" + [String](productCode.Length() mod 4), productCode ); |
| | | // boms := selectset( otdTable, Global_MappingOperationBOM, bom, bom.ProductCode() = productCode ); |
| | | // if( boms.Size() > 0 ) { |
| | | // bom := boms.First(); |
| | | // businessType := bom.BusinessType(); |
| | | // placeOfProductionOfArray := bom.OrganCode(); |
| | | // 相同面板基地和事业部的放一行 |
| | | row := CapacityAndSaleBudgeCompareItemRow::CreateIfNotExist( this, businessType, placeOfProductionOfArray ); |
| | | row := CapacityAndSaleBudgeCompareItemRow::CreateIfNotExist( this, one.BusinessType(), one.OrgCodeFromBom() ); |
| | | // 记录每行包含哪些product |
| | | CapacityAndSaleBudgeCompareItemRowProduct::CreateIfNotExist( row, productCode ); |
| | | } else { |
| | | debuginfo( "no boms for product : " + productCode ); |
| | | } |
| | | // } else { |
| | | // debuginfo( "no boms for product : " + productCode ); |
| | | // } |
| | | } |
| | | debuginfo( "CapacityAndSaleBudgeCompareItemRow : " + [String]selectset( this, CapacityAndSaleBudgeCompareItemRow, item, true ).Size() ); |
| | | // ====从左向右生成列头与内容==== |