ÎļþÃû´Ó _Main/BL/Type_GlobalDTOTable/Method_CapacityAndSaleBudgeCompare.qbl ÐÞ¸Ä |
| | |
| | | CapacityAndSaleBudgeFilterItems items, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months, |
| | | GlobalOTDTable otdTable |
| | | const GlobalOTDTable otdTable |
| | | ) |
| | | { |
| | | Description: 'todo : mappingParentæ¹ä¸ºmpSync, randomå äº' |
| | |
| | | this.CapacityAndSaleBudgeCompareItemRow( relflush ); |
| | | this.CapacityAndSaleBudgeCompareItemColumn( relflush ); |
| | | // ====æ±æ»ææåºç°ç产å==== |
| | | historyData := selectset( this, Global_MappingAnnualBudgetData, item, true ); |
| | | debuginfo( "historyData : " + [String]historyData.Size() ) |
| | | historyData := selectset( otdTable, Global_MappingAnnualBudgetData, item, true ); |
| | | 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() ); |
| | | // ====ä»å·¦åå³çæå头ä¸å
容==== |
| | |
| | | traverse( months, Elements, month ) { |
| | | columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "颿¿åé
é-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "æ-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | | cellReal := Global_MappingForecast::GetQuantityByMonth( row.GetProductCodes(), this, DateTime::Now().Year(), month.MonthNo() ); |
| | | cellReal := Global_MappingForecast::GetQuantityByMonth( row.GetProductCodes(), otdTable, DateTime::Now().Year(), month.MonthNo() ); |
| | | cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |
| | | } |
| | | columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "颿¿åé
é-" + [String]year.YearNo() + "å¹´-total-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | | cellReal := Global_MappingForecast::GetQuantityByYear( row.GetProductCodes(), this, year.YearNo() ); |
| | | cellReal := Global_MappingForecast::GetQuantityByYear( row.GetProductCodes(), otdTable, year.YearNo() ); |
| | | cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |
| | |
| | | traverse( months, Elements, month ) { |
| | | columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对å¤éå®é¢-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "æ-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | | cellReal := Global_MappingAnnualBudgetData::GetSaleByMonth( row.GetProductCodes(), this, year.YearNo(), month.MonthNo() ); |
| | | cellReal := Global_MappingAnnualBudgetData::GetSaleByMonth( row.GetProductCodes(), otdTable, year.YearNo(), month.MonthNo() ); |
| | | cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |
| | | } |
| | | columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对å¤éå®é¢-" + [String]year.YearNo() + "å¹´-年度é¢ç®" ); |
| | | traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) { |
| | | cellReal := Global_MappingAnnualBudgetData::GetSaleByYear( row.GetProductCodes(), this, year.YearNo() ); |
| | | cellReal := Global_MappingAnnualBudgetData::GetSaleByYear( row.GetProductCodes(), otdTable, year.YearNo() ); |
| | | cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal ); |
| | | cell.CapacityAndSaleBudgeCompareItemRow( relset, row ); |
| | | } |