已重命名1个文件
已添加23个文件
已修改12个文件
已删除3个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Create ( |
| | | GlobalOTDSOP this, |
| | | String businessTypeOrPlaceOfProductionOfArray, |
| | | String timeStringAndScenarioName, |
| | | Real quantity |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessTypeOrPlaceOfProductionOfArray, |
| | | TimeStringAndScenarioName := timeStringAndScenarioName, |
| | | Quantity := quantity |
| | | ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateData ( |
| | | GlobalOTDSOP this, |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String popoa, |
| | | String groupBy, |
| | | String saleOrCapacity, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | //info( "产è½/éå®é¢ï¼", saleOrCapacity, " æ¶é´åç»ï¼", groupBy, " åºå°/äºä¸é¨ï¼", popoa ); |
| | | |
| | | if ( groupBy = "å¹´" ) { |
| | | CapacityAndSaleBudgeChartElement::CreateDataByYear( this, macroPlans, casbcirs, popoa, saleOrCapacity, years, months ); |
| | | } else if ( groupBy = "æ" ) { |
| | | CapacityAndSaleBudgeChartElement::CreateDataByMonth( this, macroPlans, casbcirs, popoa, saleOrCapacity, years, months ); |
| | | } else if ( groupBy = "å£åº¦" ) { |
| | | CapacityAndSaleBudgeChartElement::CreateDataByQuarter( this, macroPlans, casbcirs, popoa, saleOrCapacity, years, months ); |
| | | } else if ( groupBy = "åå¹´" ) { |
| | | CapacityAndSaleBudgeChartElement::CreateDataByHalfAYear( this, macroPlans, casbcirs, popoa, saleOrCapacity, years, months ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateDataByHalfAYear ( |
| | | GlobalOTDSOP this, |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String popoa, |
| | | String saleOrCapacity, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | calculationConditions := ifexpr( saleOrCapacity = "产è½", "PanelAllocation", "SalesVolume" ); |
| | | categories := construct( Strings ); |
| | | if ( popoa = "颿¿åºå°" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.PlaceOfProductionOfArray() ); |
| | | } else if ( popoa = "äºä¸é¨" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.BusinessType() ); |
| | | } |
| | | |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( categories, Elements, c ) { |
| | | for ( i := 0; i < 2; i ++ ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + ifexpr( i = 0, "ä¸åå¹´", "ä¸åå¹´" ) + "-" + "ç®æ "; |
| | | targetMonth := selectset( months, Elements, tempM, tempM.MonthNo() >= ( ( i * 6 ) + 1 ) and |
| | | tempM.MonthNo() <= ( ( i + 1 ) * 6 ) ); |
| | | filterCASBCIR := CapacityAndSaleBudgeChartElement::FilterCalculationRows( casbcirs, c, popoa ); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, "", y.YearNo(), targetMonth ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | |
| | | traverse ( macroPlans, Elements, mp ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + ifexpr( i = 0, "ä¸åå¹´", "ä¸åå¹´" ) + "-" + mp.ScenarioName(); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, mp.ScenarioName(), y.YearNo(), targetMonth ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateDataByMonth ( |
| | | GlobalOTDSOP this, |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String popoa, |
| | | String saleOrCapacity, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | calculationConditions := ifexpr( saleOrCapacity = "产è½", "PanelAllocation", "SalesVolume" ); |
| | | categories := construct( Strings ); |
| | | if ( popoa = "颿¿åºå°" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.PlaceOfProductionOfArray() ); |
| | | } else if ( popoa = "äºä¸é¨" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.BusinessType() ); |
| | | } |
| | | |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( categories, Elements, c ) { |
| | | traverse ( months, Elements, m ) { |
| | | filterCASBCIR := CapacityAndSaleBudgeChartElement::FilterCalculationRows( casbcirs, c, popoa ); |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + [String]m.MonthNo() + "æ" + "-" + "ç®æ "; |
| | | targetMonths := construct( CapacityAndSaleBudgeFilterMonths ); |
| | | targetMonths.Add( m ); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, "", y.YearNo(), targetMonths ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | |
| | | traverse ( macroPlans, Elements, mp ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + [String]m.MonthNo() + "æ" + "-" + mp.ScenarioName(); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, mp.ScenarioName(), y.YearNo(), targetMonths ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateDataByQuarter ( |
| | | GlobalOTDSOP this, |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String popoa, |
| | | String saleOrCapacity, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | calculationConditions := ifexpr( saleOrCapacity = "产è½", "PanelAllocation", "SalesVolume" ); |
| | | categories := construct( Strings ); |
| | | if ( popoa = "颿¿åºå°" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.PlaceOfProductionOfArray() ); |
| | | } else if ( popoa = "äºä¸é¨" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.BusinessType() ); |
| | | } |
| | | |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( categories, Elements, c ) { |
| | | for ( i := 1; i < 5; i ++ ) { |
| | | targetMonth := selectset( months, Elements, tempM, tempM.MonthNo() >= ( ( i - 1 ) * 3 + 1 ) and |
| | | tempM.MonthNo() <= ( i * 3 ) ); |
| | | if ( targetMonth.Size() > 0 ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + "第" + [String]i + "å£åº¦" + "-" + "ç®æ "; |
| | | info( targetMonth.Size() ); |
| | | filterCASBCIR := CapacityAndSaleBudgeChartElement::FilterCalculationRows( casbcirs, c, popoa ); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, "", y.YearNo(), targetMonth ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | |
| | | traverse ( macroPlans, Elements, mp ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + "第" + [String]i + "å£åº¦" + "-" + mp.ScenarioName(); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, mp.ScenarioName(), y.YearNo(), targetMonth ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateDataByYear ( |
| | | GlobalOTDSOP this, |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String popoa, |
| | | String saleOrCapacity, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | calculationConditions := ifexpr( saleOrCapacity = "产è½", "PanelAllocation", "SalesVolume" ); |
| | | categories := construct( Strings ); |
| | | if ( popoa = "颿¿åºå°" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.PlaceOfProductionOfArray() ); |
| | | } else if ( popoa = "äºä¸é¨" ) { |
| | | categories := selectuniquevalues( casbcirs, Elements, tempCASBCIR, true, tempCASBCIR.BusinessType() ); |
| | | } |
| | | |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( categories, Elements, c ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + "ç®æ "; |
| | | filterCASBCIR := CapacityAndSaleBudgeChartElement::FilterCalculationRows( casbcirs, c, popoa ); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, "", y.YearNo(), months ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | |
| | | traverse ( macroPlans, Elements, mp ) { |
| | | timeStringAndScenarioName := [String]y.YearNo() + "å¹´" + "-" + mp.ScenarioName(); |
| | | quantity := CapacityAndSaleBudgeChartElement::GetQuantity( filterCASBCIR, calculationConditions, mp.ScenarioName(), y.YearNo(), months ); |
| | | CapacityAndSaleBudgeChartElement::Create( this, c, timeStringAndScenarioName, quantity ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod FilterCalculationRows ( |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String category, |
| | | String popoa |
| | | ) as owning CapacityAndSaleBudgeCompareItemRows |
| | | { |
| | | TextBody: |
| | | [* |
| | | resultCASBCIR := construct( CapacityAndSaleBudgeCompareItemRows ); |
| | | |
| | | if ( popoa = "颿¿åºå°" ) { |
| | | resultCASBCIR := selectset( casbcirs, Elements, tempCASBCIR, tempCASBCIR.PlaceOfProductionOfArray() = category ); |
| | | } else if ( popoa = "äºä¸é¨" ) { |
| | | resultCASBCIR := selectset( casbcirs, Elements, tempCASBCIR, tempCASBCIR.BusinessType() = category ); |
| | | } |
| | | |
| | | return &resultCASBCIR; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetQuantity ( |
| | | CapacityAndSaleBudgeCompareItemRows casbcirs, |
| | | String calculationConditions, |
| | | String scenarioName, |
| | | Number year, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | total := 0.0; |
| | | |
| | | total := sum( casbcirs, Elements.CapacityAndSaleBudgeCompareItemCell, tempCASBCIC, |
| | | tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().ColumnType() = calculationConditions and |
| | | tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().ScenarioName() = scenarioName and |
| | | tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().Year() = year and |
| | | exists( months, Elements, tempM, tempM.MonthNo() = tempCASBCIC.CapacityAndSaleBudgeCompareItemColumn().Month() ), |
| | | [Real]tempCASBCIC.CellContent() |
| | | ); |
| | | |
| | | return total; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SelectGenerateChartRows ( |
| | | GlobalOTDSOP this, |
| | | owning CapacityAndSaleBudgeFilterItems items, |
| | | owning CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays casbfpopoas, |
| | | owning CapacityAndSaleBudgeFilterBusinessTypes casbfbts, |
| | | owning CapacityAndSaleBudgeFilterYears years, |
| | | owning CapacityAndSaleBudgeFilterMonths months |
| | | ) as owning CapacityAndSaleBudgeCompareItemRows |
| | | { |
| | | TextBody: |
| | | [* |
| | | casbcirs := construct( CapacityAndSaleBudgeCompareItemRows ); |
| | | |
| | | CapacityAndSaleBudgeCompareItemCell::SetFilterCriteria( this, &items, &casbfpopoas, &casbfbts, &years, &months ); |
| | | |
| | | casbcirs := selectset( this, CapacityAndSaleBudgeCompareItemRow, tempCASBCIR, |
| | | exists( casbfpopoas, Elements, tempCASBFPOPOA, tempCASBFPOPOA.PlaceOfProductionOfArray() = tempCASBCIR.PlaceOfProductionOfArray() ) and |
| | | exists( casbfbts, Elements, tempCASBFBT, tempCASBFBT.BusinessType() = tempCASBCIR.BusinessType() ) |
| | | ); |
| | | |
| | | return &casbcirs; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreatePanelAllocation ( |
| | | MacroPlans macroPlans, |
| | | const GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationDataForBudget( globalOTDTable, this, capacityAndSaleBudgeFilterItems, years, months ); |
| | | |
| | | CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationDataForScenario( macroPlans, this, capacityAndSaleBudgeFilterItems, years, months ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreatePanelAllocationDataForBudget ( |
| | | const GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | if ( exists( capacityAndSaleBudgeFilterItems, Elements, tempCASBFI, tempCASBFI.ItemName() = "颿¿åé
é" ) ) { |
| | | columnNo := max( this, CapacityAndSaleBudgeCompareItemColumn, tempCASBCIC, true, tempCASBCIC.ColumnNo() ) + 1; |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( months, Elements, m ) { |
| | | columnMonthName := "颿¿åé
é" + "-" + [String]y.YearNo() + "å¹´" + "-" + [String]m.MonthNo() + "æ" + "-" + "年度é¢ç®"; |
| | | columnMonth := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnMonthName, ColumnNo := columnNo, Year := y.YearNo(), Month := m.MonthNo(), ColumnType := "PanelAllocation" ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | // info( "å½åè¡ï¼", casbcir.RowNo(), " è¡ç»ç»ï¼", casbcir.PlaceOfProductionOfArray(), " è¡äºä¸é¨ï¼", casbcir.BusinessType() ); |
| | | annualPanelAllocationQuantity := CapacityAndSaleBudgeCompareItemCell::GetPanelAllocationQuantityForBudget( globalOTDTable, |
| | | y.YearNo(), |
| | | m.MonthNo(), |
| | | casbcir.PlaceOfProductionOfArray(), |
| | | casbcir.BusinessType() |
| | | ); |
| | | monthCell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]annualPanelAllocationQuantity ); |
| | | monthCell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | } |
| | | columnNo++; |
| | | } |
| | | |
| | | columnYearName := "颿¿åé
é" + "-" + [String]y.YearNo() + "å¹´" + "-" + "total" + "-" + "年度é¢ç®"; |
| | | columnYear := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnYearName, ColumnNo := columnNo, Year := y.YearNo(), ColumnType := "PanelAllocation" ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | annualPanelAllocationQuantity := CapacityAndSaleBudgeCompareItemCell::GetPanelAllocationQuantityForBudget( globalOTDTable, |
| | | y.YearNo(), |
| | | 0, |
| | | casbcir.PlaceOfProductionOfArray(), |
| | | casbcir.BusinessType() |
| | | ); |
| | | yearCell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]annualPanelAllocationQuantity ); |
| | | yearCell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreatePanelAllocationDataForScenario ( |
| | | MacroPlans macroPlans, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateSalesVolumeData ( |
| | | MacroPlans macroPlans, |
| | | const GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeDataForBudget( globalOTDTable, this, capacityAndSaleBudgeFilterItems, years, months ); |
| | | |
| | | CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeDataForScenario( macroPlans, this, capacityAndSaleBudgeFilterItems, years, months ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateSalesVolumeDataForBudget ( |
| | | const GlobalOTDTable globalOTDTable, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | if ( exists( capacityAndSaleBudgeFilterItems, Elements, tempCASBFI, tempCASBFI.ItemName() = "éå®é¢" ) ) { |
| | | columnNo := max( this, CapacityAndSaleBudgeCompareItemColumn, tempCASBCIC, true, tempCASBCIC.ColumnNo() ) + 1; |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( months, Elements, m ) { |
| | | columnMonthName := "对å¤éå®é¢" + "-" + [String]y.YearNo() + "å¹´" + "-" + [String]m.MonthNo() + "æ" + "-" + "年度é¢ç®"; |
| | | columnMonth := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnMonthName, ColumnNo := columnNo, Year := y.YearNo(), Month := m.MonthNo(), ColumnType := "SalesVolume" ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | // info( "å½åè¡ï¼", casbcir.RowNo(), " è¡ç»ç»ï¼", casbcir.PlaceOfProductionOfArray(), " è¡äºä¸é¨ï¼", casbcir.BusinessType() ); |
| | | annualSalesQuantity := CapacityAndSaleBudgeCompareItemCell::GetAnnualSalesQuantity( globalOTDTable, |
| | | y.YearNo(), |
| | | m.MonthNo(), |
| | | casbcir.PlaceOfProductionOfArray(), |
| | | casbcir.BusinessType() |
| | | ); |
| | | monthCell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]annualSalesQuantity ); |
| | | monthCell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | } |
| | | columnNo++; |
| | | } |
| | | |
| | | columnYearName := "对å¤éå®é¢" + "-" + [String]y.YearNo() + "å¹´" + "-" + "total" + "-" + "年度é¢ç®"; |
| | | columnYear := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnYearName, ColumnNo := columnNo, Year := y.YearNo(), ColumnType := "SalesVolume" ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | annualSalesQuantity := CapacityAndSaleBudgeCompareItemCell::GetAnnualSalesQuantity( globalOTDTable, |
| | | y.YearNo(), |
| | | 0, |
| | | casbcir.PlaceOfProductionOfArray(), |
| | | casbcir.BusinessType() |
| | | ); |
| | | yearCell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]annualSalesQuantity ); |
| | | yearCell.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | } |
| | | columnNo++; |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CreateSalesVolumeDataForScenario ( |
| | | MacroPlans macroPlans, |
| | | GlobalOTDSOP this, |
| | | CapacityAndSaleBudgeFilterItems capacityAndSaleBudgeFilterItems, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | if ( exists( capacityAndSaleBudgeFilterItems, Elements, tempCASBFI, tempCASBFI.ItemName() = "éå®é¢" ) ) { |
| | | columnNo := max( this, CapacityAndSaleBudgeCompareItemColumn, tempCASBCIC, true, tempCASBCIC.ColumnNo() ) + 1; |
| | | traverse ( macroPlans, Elements, mp ) { |
| | | traverse ( years, Elements, y ) { |
| | | traverse ( months, Elements, m ) { |
| | | columnMonthName := "对å¤éå®é¢" + "-" + [String]y.YearNo() + "å¹´" + "-" + [String]m.MonthNo() + "æ" + "-" + mp.ScenarioName(); |
| | | columnMonth := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnMonthName, ColumnNo := columnNo, Year := y.YearNo(), Month := m.MonthNo(), ColumnType := "SalesVolume", ScenarioName := mp.ScenarioName() ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | productIDs := selectuniquevalues( casbcir, CapacityAndSaleBudgeCompareItemRowProduct, tempCASBCIRP, true, tempCASBCIRP.ProductCode() ); |
| | | total := sum( mp, SalesDemand, tempSD, productIDs.Find( tempSD.ProductID() ) >= 0 and |
| | | tempSD.StartDate().Year() = [Number]y.YearNo() and |
| | | tempSD.StartDate().Month() = [Number]m.MonthNo(), |
| | | tempSD.Quantity() * tempSD.Price() ); |
| | | cellMonth := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]total ); |
| | | cellMonth.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | columnNo++; |
| | | } |
| | | } |
| | | |
| | | columnMonthName := "对å¤éå®é¢" + "-" + [String]y.YearNo() + "å¹´" + "-" + "total" + "-" + mp.ScenarioName(); |
| | | columnYear := this.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := columnMonthName, ColumnNo := columnNo, Year := y.YearNo(), ColumnType := "SalesVolume", ScenarioName := mp.ScenarioName() ); |
| | | traverse ( this, CapacityAndSaleBudgeCompareItemRow, casbcir ) { |
| | | productIDs := selectuniquevalues( casbcir, CapacityAndSaleBudgeCompareItemRowProduct, tempCASBCIRP, true, tempCASBCIRP.ProductCode() ); |
| | | total := sum( mp, SalesDemand, tempSD, productIDs.Find( tempSD.ProductID() ) >= 0 and |
| | | tempSD.StartDate().Year() = [Number]y.YearNo(), |
| | | tempSD.Quantity() * tempSD.Price() ); |
| | | cellYear := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]total ); |
| | | cellYear.CapacityAndSaleBudgeCompareItemRow( relset, casbcir ); |
| | | } |
| | | columnNo++; |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GenerateBasicDataBasedOnFilteringCriteria ( |
| | | GlobalOTDSOP globalOTDSOP, |
| | | const GlobalOTDTable globalOTDTable, |
| | | CapacityAndSaleBudgeFilterItems items, |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays casbfpopoas, |
| | | CapacityAndSaleBudgeFilterBusinessTypes casbfbts |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | columnPOPOA := globalOTDSOP.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := "颿¿åºå°", ColumnNo := 0 ); |
| | | columnBT := globalOTDSOP.CapacityAndSaleBudgeCompareItemColumn( relnew, ColumnName := "äºä¸é¨", ColumnNo := 1 ); |
| | | |
| | | rowNr := 0; |
| | | |
| | | info( "ç»ç»åºå°ä¸ªæ°ï¼", casbfpopoas.Size(), " äºä¸é¨ä¸ªæ°ï¼", casbfbts.Size() ); |
| | | |
| | | traverse ( casbfpopoas, Elements, casbfpopoa ) { |
| | | traverse ( casbfbts, Elements, casbfbt ) { |
| | | targetGlobal_MappingAnnualBudgetData := selectset( globalOTDTable, Global_MappingAnnualBudgetData, tempGMABD, tempGMABD.OrganCode() = casbfpopoa.PlaceOfProductionOfArray() and |
| | | tempGMABD.BusinessType() = casbfbt.BusinessType() ); |
| | | if ( targetGlobal_MappingAnnualBudgetData.Size() > 0 ) { |
| | | targetCapacityAndSaleBudgeCompareItemRow := globalOTDSOP.CapacityAndSaleBudgeCompareItemRow( relnew, |
| | | PlaceOfProductionOfArray := casbfpopoa.PlaceOfProductionOfArray(), |
| | | BusinessType := casbfbt.BusinessType(), |
| | | RowNo := rowNr ); |
| | | rowNr++; |
| | | traverse ( targetGlobal_MappingAnnualBudgetData, Elements, gmabd ) { |
| | | targetCapacityAndSaleBudgeCompareItemRow.CapacityAndSaleBudgeCompareItemRowProduct( relnew, ProductCode := gmabd.ProductID() ); |
| | | } |
| | | cellPOPOA := columnPOPOA.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := casbfpopoa.PlaceOfProductionOfArray() ); |
| | | cellBT := columnBT.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := casbfbt.BusinessType() ); |
| | | cellPOPOA.CapacityAndSaleBudgeCompareItemRow( relset, targetCapacityAndSaleBudgeCompareItemRow ); |
| | | cellBT.CapacityAndSaleBudgeCompareItemRow( relset, targetCapacityAndSaleBudgeCompareItemRow ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetAnnualSalesQuantity ( |
| | | const GlobalOTDTable globalOTDTable, |
| | | Number year, |
| | | Number month, |
| | | String placeOfProductionOfArray, |
| | | String businessType |
| | | ) as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | total := 0.0; |
| | | |
| | | targetGlobal_MappingAnnualBudgetDatas := selectset( globalOTDTable, Global_MappingAnnualBudgetData, tempGMABD, |
| | | tempGMABD.YearNo() = [String]year and |
| | | tempGMABD.OrganCode() = placeOfProductionOfArray and |
| | | tempGMABD.BusinessType() = businessType |
| | | ); |
| | | |
| | | if ( month = 0 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales1() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales2() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales3() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales4() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales5() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales6() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales7() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales8() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales9() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales10() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales11() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales12() ); |
| | | } else if ( month = 1 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales1() ); |
| | | } else if ( month = 2 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales2() ); |
| | | } else if ( month = 3 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales3() ); |
| | | } else if ( month = 4 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales4() ); |
| | | } else if ( month = 5 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales5() ); |
| | | } else if ( month = 6 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales6() ); |
| | | } else if ( month = 7 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales7() ); |
| | | } else if ( month = 8 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales8() ); |
| | | } else if ( month = 9 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales9() ); |
| | | } else if ( month = 10 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales10() ); |
| | | } else if ( month = 11 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales11() ); |
| | | } else if ( month = 12 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySales12() ); |
| | | } |
| | | |
| | | return total; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetPanelAllocationQuantityForBudget ( |
| | | const GlobalOTDTable globalOTDTable, |
| | | Number year, |
| | | Number month, |
| | | String placeOfProductionOfArray, |
| | | String businessType |
| | | ) as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | total := 0.0; |
| | | |
| | | targetGlobal_MappingAnnualBudgetDatas := selectset( globalOTDTable, Global_MappingAnnualBudgetData, tempGMABD, |
| | | tempGMABD.YearNo() = [String]year and |
| | | tempGMABD.OrganCode() = placeOfProductionOfArray and |
| | | tempGMABD.BusinessType() = businessType |
| | | ); |
| | | |
| | | if ( month = 0 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity1() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity2() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity3() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity4() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity5() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity6() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity7() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity8() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity9() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity10() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity11() ) |
| | | + sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity12() ); |
| | | } else if ( month = 1 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity1() ); |
| | | } else if ( month = 2 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity2() ); |
| | | } else if ( month = 3 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity3() ); |
| | | } else if ( month = 4 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity4() ); |
| | | } else if ( month = 5 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity5() ); |
| | | } else if ( month = 6 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity6() ); |
| | | } else if ( month = 7 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity7() ); |
| | | } else if ( month = 8 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity8() ); |
| | | } else if ( month = 9 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity9() ); |
| | | } else if ( month = 10 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity10() ); |
| | | } else if ( month = 11 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity11() ); |
| | | } else if ( month = 12 ) { |
| | | total := sum( targetGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, true, [Real]tempGMABD.MonthlySheetCapacity12() ); |
| | | } |
| | | |
| | | return total; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SetFilterCriteria ( |
| | | GlobalOTDSOP this, |
| | | output owning CapacityAndSaleBudgeFilterItems items, |
| | | output owning CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays casbfpopoas, |
| | | output owning CapacityAndSaleBudgeFilterBusinessTypes casbfbts, |
| | | output owning CapacityAndSaleBudgeFilterYears years, |
| | | output owning CapacityAndSaleBudgeFilterMonths months |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | if ( items.Size() = 0 ) { |
| | | items := selectset( this, CapacityAndSaleBudgeFilterItem, tempCASBFI, tempCASBFI.ItemName() = "éå®é¢" ); |
| | | } |
| | | |
| | | if ( casbfpopoas.Size() = 0 ) { |
| | | casbfpopoas := selectset( this, CapacityAndSaleBudgeFilterPlaceOfProductionOfArray, tempCASBFPOPOA, true ); |
| | | } |
| | | |
| | | if ( casbfbts.Size() = 0 ) { |
| | | casbfbts := selectset( this, CapacityAndSaleBudgeFilterBusinessType, tempCASBFBT, true ); |
| | | } |
| | | |
| | | if ( years.Size() = 0 ) { |
| | | years := selectset( this, CapacityAndSaleBudgeFilterYear, tempCASBFY, tempCASBFY.YearNo() = Date::ActualDate().Year() ); |
| | | } else { |
| | | years := selectsortedset( years, Elements, tempCASBFY, true, tempCASBFY.YearNo() ); |
| | | } |
| | | |
| | | if ( months.Size() = 0 ) { |
| | | months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, tempCASBFM, true, tempCASBFM.MonthNo() ); |
| | | } else { |
| | | months := selectsortedset( months, Elements, tempCASBFM, true, tempCASBFM.MonthNo() ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ColumnType |
| | | { |
| | | #keys: '3[414702.1.340387451][414702.1.340387450][414702.1.340387452]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Month |
| | | { |
| | | #keys: '3[414702.1.339609433][414702.1.339609432][414702.1.339609434]' |
| | | ValueType: Number |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ScenarioName |
| | | { |
| | | #keys: '3[414702.1.339085005][414702.1.339085004][414702.1.339085006]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Year |
| | | { |
| | | #keys: '3[414702.1.339609423][414702.1.339609422][414702.1.339609424]' |
| | | ValueType: Number |
| | | } |
| | |
| | | [* |
| | | globalOTDSOP.CapacityAndSaleBudgeFilterBusinessType( relflush ); |
| | | |
| | | businessTypes := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, tempGMPMP, true, tempGMPMP.BusinessType() ); |
| | | businessTypes := selectuniquevalues( globalOTDTable, Global_MappingAnnualBudgetData, tempGMABD, true, tempGMABD.BusinessType() ); |
| | | |
| | | traverse ( businessTypes, Elements, bt ) { |
| | | globalOTDSOP.CapacityAndSaleBudgeFilterBusinessType( relnew, BusinessType := bt ); |
| | |
| | | [* |
| | | globalOTDSOP.CapacityAndSaleBudgeFilterPlaceOfProductionOfArray( relflush ); |
| | | |
| | | organCodes := selectuniquevalues( globalOTDTable, Global_MappingOperation, tempGMO, true, tempGMO.OrganCode() ); |
| | | organCodes := selectuniquevalues( globalOTDTable, Global_MappingAnnualBudgetData, tempGMABD, true, tempGMABD.OrganCode() ); |
| | | |
| | | traverse ( organCodes, Elements, oc ) { |
| | | globalOTDSOP.CapacityAndSaleBudgeFilterPlaceOfProductionOfArray( relnew, PlaceOfProductionOfArray := oc ); |
ÎļþÃû´Ó _Main/BL/Type_GlobalDTOTable/Method_InitTestDataByYear.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitTestDataByYear ( |
| | | MacroPlan macroPlan, |
| | | Method CreateCapacityAndSaleBudgeTestData ( |
| | | GlobalOTDSOP globalOTDSOP, |
| | | const GlobalOTDTable globalOTDTable, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterBusinessTypes businessTypes, |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays placeOfProductionOfArrays, |
| | | Product_MPs product_MPs |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | product_MPs := selectset( product_MPs, Elements, tempPMP, tempPMP.IsLeaf() and not tempPMP.IsSystem() ); |
| | | |
| | | this.Global_MappingAnnualBudgetData( relflush ); |
| | | |
| | | product_MPs := selectset( product_MPs, Elements, tempPMP, tempPMP.IsLeaf() and not tempPMP.IsSystem() ); |
| | | if ( years.Size() = 0 ) { |
| | | years := selectset( globalOTDSOP, CapacityAndSaleBudgeFilterYear, tempCASBFY, |
| | | tempCASBFY.YearNo() = Date::ActualDate().Year() or |
| | | tempCASBFY.YearNo() = Date::ActualDate().Year() - 1 or |
| | | tempCASBFY.YearNo() = Date::ActualDate().Year() + 1 |
| | | tempCASBFY.YearNo() = Date::ActualDate().Year() |
| | | ); |
| | | } |
| | | if ( businessTypes.Size() = 0 ) { |
| | | businessTypes := selectset( globalOTDSOP, CapacityAndSaleBudgeFilterBusinessType, tempCASBFBT, true ); |
| | | } |
| | | if ( placeOfProductionOfArrays.Size() = 0 ) { |
| | | placeOfProductionOfArrays := selectset( globalOTDSOP, CapacityAndSaleBudgeFilterPlaceOfProductionOfArray, tempCASBFPOPOA, true ); |
| | | } |
| | | businessTypes := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, tempGMPMP, true, tempGMPMP.BusinessType() ); |
| | | placeOfProductionOfArrays := selectuniquevalues( globalOTDTable, Global_MappingOperation, tempGMO, true, tempGMO.OrganCode() ); |
| | | |
| | | traverse ( years, Elements, year ) { |
| | | traverse ( years, Elements, year, businessTypes.Size() > 0 and placeOfProductionOfArrays.Size() > 0 ) { |
| | | traverse ( product_MPs, Elements, pmp ) { |
| | | businessType := businessTypes.Element( Number::Random( 0, businessTypes.Size() - 1 ) ).BusinessType(); |
| | | placeOfProductionOfArray := placeOfProductionOfArrays.Element( Number::Random( 0, placeOfProductionOfArrays.Size() - 1 ) ).PlaceOfProductionOfArray(); |
| | | businessType := businessTypes.Element( Number::Random( 0, businessTypes.Size() - 1 ) ); |
| | | placeOfProductionOfArray := placeOfProductionOfArrays.Element( Number::Random( 0, placeOfProductionOfArrays.Size() - 1 ) ); |
| | | mappingAnnualBudget := this.Global_MappingAnnualBudgetData( relnew, |
| | | ID := OS::GenerateGUIDAsString(), |
| | | YearNo := [String]year.YearNo(), |
| | |
| | | MacroPlans macroPlans, |
| | | String saleOrCapacity, |
| | | String groupBy, |
| | | String byBusinessTypeOrByOrgCode, |
| | | CapacityAndSaleBudgeFilterBusinessTypes businessTypes, |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays placeOfProductionOfArrays, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months, |
| | | String popoa, |
| | | owning CapacityAndSaleBudgeFilterItems items, |
| | | owning CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays placeOfProductionOfArrays, |
| | | owning CapacityAndSaleBudgeFilterBusinessTypes businessTypes, |
| | | owning CapacityAndSaleBudgeFilterYears years, |
| | | owning CapacityAndSaleBudgeFilterMonths months, |
| | | GlobalOTDTable otdTable |
| | | ) |
| | | { |
| | | Description: 'æå
¥åå¤çæ°æ®ï¼äº§çéè¦çCapacityAndSaleBudgeChartElement' |
| | | TextBody: |
| | | [* |
| | | info( "产è½/éå®é¢ï¼", saleOrCapacity, " æ¶é´åç»ï¼", groupBy, " åºå°/äºä¸é¨ï¼", byBusinessTypeOrByOrgCode ); |
| | | // 年份ä¸éæ¶å
¨é |
| | | if ( years.Size() = 0 ) { |
| | | years := selectset( this, CapacityAndSaleBudgeFilterYear, tempCASBFY, tempCASBFY.YearNo() = Date::ActualDate().Year() ); |
| | | } |
| | | // æä»½ä¸éæ¶å
¨é |
| | | if ( months.Size() = 0 ) { |
| | | months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, item, true, item.MonthNo() ); |
| | | } |
| | | |
| | | // ====æ¸
çæ§æ°æ®==== |
| | | this.CapacityAndSaleBudgeChartRow( relflush ); |
| | | this.CapacityAndSaleBudgeChartElement( relflush ); |
| | | |
| | | // ====æé¢æ¿åºå°åäºä¸é¨å¯¹äº§åè¿è¡çéåç»==== |
| | | targeGlobal_MappingAnnualBudgetDatas := selectset( otdTable, Global_MappingAnnualBudgetData, tempGMABD, true ); |
| | | if ( businessTypes.Size() > 0 ) { |
| | | businessTypeStrings := selectuniquevalues( businessTypes, Elements, item, true, item.BusinessType() ); |
| | | targeGlobal_MappingAnnualBudgetDatas := selectset( targeGlobal_MappingAnnualBudgetDatas, Elements, item, businessTypeStrings.Find( item.BusinessType() ) > -1 ); |
| | | } |
| | | if ( placeOfProductionOfArrays.Size() > 0 ) { |
| | | placeOfProductionOfArrayStrings := selectuniquevalues( placeOfProductionOfArrays, Elements, item, true, item.PlaceOfProductionOfArray() ); |
| | | targeGlobal_MappingAnnualBudgetDatas := selectset( targeGlobal_MappingAnnualBudgetDatas, Elements, item, placeOfProductionOfArrayStrings.Find( item.OrganCode() ) > -1 ); |
| | | } |
| | | info( "éä¸ç个æ°:", targeGlobal_MappingAnnualBudgetDatas.Size() ); |
| | | casbcirs := CapacityAndSaleBudgeChartElement::SelectGenerateChartRows( this, &items, &placeOfProductionOfArrays, &businessTypes, &years, &months ); |
| | | |
| | | traverse ( targeGlobal_MappingAnnualBudgetDatas, Elements, gmabd ) { |
| | | row := CapacityAndSaleBudgeChartRow::CreateIfNotExist( this, gmabd.BusinessType(), gmabd.OrganCode() ); |
| | | // è®°å½æ¯è¡å
å«åªäºproduct |
| | | CapacityAndSaleBudgeChartRowProduct::CreateIfNotExist( row, gmabd.ProductID() ); |
| | | } |
| | | CapacityAndSaleBudgeChartElement::CreateData( this, macroPlans, casbcirs, popoa, groupBy, saleOrCapacity, years, months ); |
| | | |
| | | rows := selectset( this, CapacityAndSaleBudgeChartRow, item, true ); |
| | | placeOfProductionOfArrayList := selectuniquevalues( targeGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, tempGMABD.OrganCode() ); |
| | | businessTypeList := selectuniquevalues( targeGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, tempGMABD.BusinessType() ); |
| | | |
| | | // çæå¾è¡¨å
ç´ |
| | | traverse ( years, Elements, year ) { |
| | | if ( byBusinessTypeOrByOrgCode = "颿¿åºå°" and groupBy = "å¹´" ) { |
| | | // ç®æ |
| | | traverse ( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByYear( productCodeList, otdTable, year.YearNo() ), |
| | | Global_MappingForecast::GetQuantityByYear( productCodeList, otdTable, year.YearNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse ( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByYear( productCodeList, macroPlan, year.YearNo() ), |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "颿¿åºå°" and groupBy = "åå¹´" ) { |
| | | for( halfNo := 1; halfNo <= 2; halfNo := halfNo + 1 ) { |
| | | traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ), |
| | | Global_MappingForecast::GetQuantityByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ), |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "颿¿åºå°" and groupBy = "å£åº¦" ) { |
| | | for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) { |
| | | traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ), |
| | | Global_MappingForecast::GetQuantityBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ) ) |
| | | ); |
| | | // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) , |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "颿¿åºå°" and groupBy = "æ" ) { |
| | | traverse( months, Elements, month ) { |
| | | // info( "process month start : " + [String]month.MonthNo() ); |
| | | monthNoString := ifexpr( month.MonthNo() <= 9, "0" + [String]month.MonthNo(), [String]month.MonthNo() ); |
| | | traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ), |
| | | Global_MappingForecast::GetQuantityByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ), |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | // info( "process month end : " + [String]month.MonthNo() ); |
| | | } |
| | | } |
| | | if( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "å¹´" ) { |
| | | // ç®æ |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByYear( productCodeList, otdTable, year.YearNo() ), |
| | | Global_MappingForecast::GetQuantityByYear( productCodeList, otdTable, year.YearNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByYear( productCodeList, macroPlan, year.YearNo() ) , |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "åå¹´" ) { |
| | | for( halfNo := 1; halfNo <= 2; halfNo := halfNo + 1 ) { |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ), |
| | | Global_MappingForecast::GetQuantityByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) , |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "å£åº¦" ) { |
| | | for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) { |
| | | // debuginfo( "process season start : " + [String]seasonNo ); |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ), |
| | | Global_MappingForecast::GetQuantityBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ), |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | // info( "process season end : " + [String]seasonNo ); |
| | | } |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "äºä¸é¨" and groupBy = "æ" ) { |
| | | traverse( months, Elements, month ) { |
| | | // debuginfo( "process month start : " + [String]month.MonthNo() ); |
| | | monthNoString := ifexpr( month.MonthNo() <= 9, "0" + [String]month.MonthNo(), [String]month.MonthNo() ); |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Global_MappingAnnualBudgetData::GetSaleByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ), |
| | | Global_MappingForecast::GetQuantityByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | Forecast::GetFulfilledBalanceByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) , |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | ) |
| | | ); |
| | | } |
| | | } |
| | | // debuginfo( "process month end : " + [String]month.MonthNo() ); |
| | | } |
| | | } |
| | | } |
| | | //// 年份ä¸éæ¶å
¨é |
| | | //if ( years.Size() = 0 ) { |
| | | // years := selectset( this, CapacityAndSaleBudgeFilterYear, tempCASBFY, tempCASBFY.YearNo() = Date::ActualDate().Year() ); |
| | | //} |
| | | //// æä»½ä¸éæ¶å
¨é |
| | | //if ( months.Size() = 0 ) { |
| | | // months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, item, true, item.MonthNo() ); |
| | | //} |
| | | // |
| | | //// ====æ¸
çæ§æ°æ®==== |
| | | // |
| | | //// ====æé¢æ¿åºå°åäºä¸é¨å¯¹äº§åè¿è¡çéåç»==== |
| | | //targeGlobal_MappingAnnualBudgetDatas := selectset( otdTable, Global_MappingAnnualBudgetData, tempGMABD, true ); |
| | | //if ( businessTypes.Size() > 0 ) { |
| | | // businessTypeStrings := selectuniquevalues( businessTypes, Elements, item, true, item.BusinessType() ); |
| | | // targeGlobal_MappingAnnualBudgetDatas := selectset( targeGlobal_MappingAnnualBudgetDatas, Elements, item, businessTypeStrings.Find( item.BusinessType() ) > -1 ); |
| | | //} |
| | | //if ( placeOfProductionOfArrays.Size() > 0 ) { |
| | | // placeOfProductionOfArrayStrings := selectuniquevalues( placeOfProductionOfArrays, Elements, item, true, item.PlaceOfProductionOfArray() ); |
| | | // targeGlobal_MappingAnnualBudgetDatas := selectset( targeGlobal_MappingAnnualBudgetDatas, Elements, item, placeOfProductionOfArrayStrings.Find( item.OrganCode() ) > -1 ); |
| | | //} |
| | | ////info( "éä¸ç个æ°:", targeGlobal_MappingAnnualBudgetDatas.Size() ); |
| | | // |
| | | //traverse ( targeGlobal_MappingAnnualBudgetDatas, Elements, gmabd ) { |
| | | // row := CapacityAndSaleBudgeChartRow::CreateIfNotExist( this, gmabd.BusinessType(), gmabd.OrganCode() ); |
| | | // // è®°å½æ¯è¡å
å«åªäºproduct |
| | | // CapacityAndSaleBudgeChartRowProduct::CreateIfNotExist( row, gmabd.ProductID() ); |
| | | //} |
| | | // |
| | | //rows := selectset( this, CapacityAndSaleBudgeChartRow, item, true ); |
| | | //placeOfProductionOfArrayList := selectuniquevalues( targeGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, tempGMABD.OrganCode() ); |
| | | //businessTypeList := selectuniquevalues( targeGlobal_MappingAnnualBudgetDatas, Elements, tempGMABD, tempGMABD.BusinessType() ); |
| | | // |
| | | //// çæå¾è¡¨å
ç´ |
| | | //traverse ( years, Elements, year ) { |
| | | // if ( popoa = "颿¿åºå°" and groupBy = "å¹´" ) { |
| | | // // ç®æ |
| | | // traverse ( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByYear( productCodeList, otdTable, year.YearNo() ), |
| | | // Global_MappingForecast::GetQuantityByYear( productCodeList, otdTable, year.YearNo() ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse ( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByYear( productCodeList, macroPlan, year.YearNo() ), |
| | | // Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | // } |
| | | // if ( popoa = "颿¿åºå°" and groupBy = "åå¹´" ) { |
| | | // for( halfNo := 1; halfNo <= 2; halfNo := halfNo + 1 ) { |
| | | // traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ), |
| | | // Global_MappingForecast::GetQuantityByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ), |
| | | // Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // if ( popoa = "颿¿åºå°" and groupBy = "å£åº¦" ) { |
| | | // for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) { |
| | | // traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ), |
| | | // Global_MappingForecast::GetQuantityBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ) ) |
| | | // ); |
| | | // // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) , |
| | | // Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // if ( popoa = "颿¿åºå°" and groupBy = "æ" ) { |
| | | // traverse( months, Elements, month ) { |
| | | //// info( "process month start : " + [String]month.MonthNo() ); |
| | | // monthNoString := ifexpr( month.MonthNo() <= 9, "0" + [String]month.MonthNo(), [String]month.MonthNo() ); |
| | | // traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ), |
| | | // Global_MappingForecast::GetQuantityByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ), |
| | | // Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | //// info( "process month end : " + [String]month.MonthNo() ); |
| | | // } |
| | | // } |
| | | // if( popoa = "äºä¸é¨" and groupBy = "å¹´" ) { |
| | | // // ç®æ |
| | | // traverse( businessTypeList, Elements, businessType ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByYear( productCodeList, otdTable, year.YearNo() ), |
| | | // Global_MappingForecast::GetQuantityByYear( productCodeList, otdTable, year.YearNo() ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByYear( productCodeList, macroPlan, year.YearNo() ) , |
| | | // Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, year.YearNo() ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | // } |
| | | // if ( popoa = "äºä¸é¨" and groupBy = "åå¹´" ) { |
| | | // for( halfNo := 1; halfNo <= 2; halfNo := halfNo + 1 ) { |
| | | // traverse( businessTypeList, Elements, businessType ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ), |
| | | // Global_MappingForecast::GetQuantityByHalfYear( productCodeList, otdTable, year.YearNo(), halfNo ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-" + ifexpr( halfNo = 1, "ä¸", "ä¸" ) + "åå¹´-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) , |
| | | // Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, year.YearNo(), halfNo ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // if ( popoa = "äºä¸é¨" and groupBy = "å£åº¦" ) { |
| | | // for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) { |
| | | //// debuginfo( "process season start : " + [String]seasonNo ); |
| | | // traverse( businessTypeList, Elements, businessType ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ), |
| | | // Global_MappingForecast::GetQuantityBySeason( productCodeList, otdTable, year.YearNo(), seasonNo ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + [String]seasonNo + "å£åº¦-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ), |
| | | // Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, year.YearNo(), seasonNo ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | //// info( "process season end : " + [String]seasonNo ); |
| | | // } |
| | | // } |
| | | // if ( popoa = "äºä¸é¨" and groupBy = "æ" ) { |
| | | // traverse( months, Elements, month ) { |
| | | //// debuginfo( "process month start : " + [String]month.MonthNo() ); |
| | | // monthNoString := ifexpr( month.MonthNo() <= 9, "0" + [String]month.MonthNo(), [String]month.MonthNo() ); |
| | | // traverse( businessTypeList, Elements, businessType ) { |
| | | // productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-ç®æ ", |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Global_MappingAnnualBudgetData::GetSaleByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ), |
| | | // Global_MappingForecast::GetQuantityByMonth( productCodeList, otdTable, year.YearNo(), month.MonthNo() ) ) |
| | | // ); |
| | | // // S&OP |
| | | // traverse( macroPlans, Elements, macroPlan ) { |
| | | // this.CapacityAndSaleBudgeChartElement( relnew, |
| | | // TimeStringAndScenarioName := [String]year.YearNo() + "å¹´-第" + monthNoString + "æ-" + macroPlan.ScenarioName(), |
| | | // BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | // Quantity := ifexpr( saleOrCapacity = "éå®é¢", |
| | | // Forecast::GetFulfilledBalanceByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) , |
| | | // Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, year.YearNo(), month.MonthNo() ) |
| | | // ) |
| | | // ); |
| | | // } |
| | | // } |
| | | //// debuginfo( "process month end : " + [String]month.MonthNo() ); |
| | | // } |
| | | // } |
| | | //} |
| | | ////info( "CapacityAndSaleBudgeChartElement : " + [String]selectset( this, CapacityAndSaleBudgeChartElement, item, true ).Size() ); |
| | | ////traverse( this, CapacityAndSaleBudgeChartRow, row ) { |
| | | //// info( "==â==" ); |
| | |
| | | #parent: #root |
| | | Method CapacityAndSaleBudgeCompare ( |
| | | MacroPlans macroPlans, |
| | | CapacityAndSaleBudgeFilterItems items, |
| | | CapacityAndSaleBudgeFilterYears years, |
| | | CapacityAndSaleBudgeFilterMonths months, |
| | | owning CapacityAndSaleBudgeFilterItems items, |
| | | owning CapacityAndSaleBudgeFilterPlaceOfProductionOfArrays casbfpopoas, |
| | | owning CapacityAndSaleBudgeFilterBusinessTypes casbfbts, |
| | | owning CapacityAndSaleBudgeFilterYears years, |
| | | owning CapacityAndSaleBudgeFilterMonths months, |
| | | const GlobalOTDTable globalOTDTable |
| | | ) |
| | | { |
| | | Description: 'todo : mappingParentæ¹ä¸ºmpSync, randomå äº' |
| | | TextBody: |
| | | [* |
| | | if ( years.Size() = 0 ) { |
| | | years := selectset( this, CapacityAndSaleBudgeFilterYear, tempCASBFY, tempCASBFY.YearNo() = Date::ActualDate().Year() ); |
| | | } |
| | | if ( months.Size() = 0 ) { |
| | | months := selectsortedset( this, CapacityAndSaleBudgeFilterMonth, item, item.MonthNo() ); |
| | | } |
| | | |
| | | this.CapacityAndSaleBudgeCompareItemRow( relflush ); |
| | | this.CapacityAndSaleBudgeCompareItemColumn( relflush ); |
| | | |
| | | CapacityAndSaleBudgeCompareItemCell::CreateData( globalOTDTable, this ); |
| | | CapacityAndSaleBudgeCompareItemCell::SetFilterCriteria( this, &items, &casbfpopoas, &casbfbts, &years, &months ); |
| | | |
| | | if ( CapacityAndSaleBudgeFilterItem::Contains( items, "颿¿åé
é" ) ) { |
| | | traverse ( years, Elements, year ) { |
| | | CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationBudget( this, months, year, globalOTDTable ); |
| | | CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationByScenario( macroPlans, this, months, year ); |
| | | } |
| | | } |
| | | CapacityAndSaleBudgeCompareItemCell::GenerateBasicDataBasedOnFilteringCriteria( this, globalOTDTable, items, casbfpopoas, casbfbts ); |
| | | |
| | | if ( CapacityAndSaleBudgeFilterItem::Contains( items, "éå®é¢" ) ) { |
| | | traverse ( years, Elements, year ) { |
| | | CapacityAndSaleBudgeCompareItemCell::CreateSalesVolume( this, months, year, globalOTDTable ); |
| | | CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeByScenario( macroPlans, this, months, year ); |
| | | } |
| | | } |
| | | CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeData( macroPlans, globalOTDTable, this, items, years, months ); |
| | | |
| | | CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocation( macroPlans, globalOTDTable, this, items, years, months ); |
| | | |
| | | //if ( CapacityAndSaleBudgeFilterItem::Contains( items, "颿¿åé
é" ) ) { |
| | | // traverse ( years, Elements, year ) { |
| | | // CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationBudget( this, months, year, globalOTDTable ); |
| | | // CapacityAndSaleBudgeCompareItemCell::CreatePanelAllocationByScenario( macroPlans, this, months, year ); |
| | | // } |
| | | //} |
| | | // |
| | | //if ( CapacityAndSaleBudgeFilterItem::Contains( items, "éå®é¢" ) ) { |
| | | // traverse ( years, Elements, year ) { |
| | | // CapacityAndSaleBudgeCompareItemCell::CreateSalesVolume( this, months, year, globalOTDTable ); |
| | | // CapacityAndSaleBudgeCompareItemCell::CreateSalesVolumeByScenario( macroPlans, this, months, year ); |
| | | // } |
| | | //} |
| | | |
| | | // å¤§å¼ çå©é¢ |
| | | //traverse ( years, Elements, year ) { |
| | |
| | | //} |
| | | |
| | | // 设置rowNoåcolumnNo |
| | | rowNo := 1; |
| | | rowSorted := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, item, item.PlaceOfProductionOfArray() + "_" + item.BusinessType() ); |
| | | traverse( rowSorted, Elements, item ) { |
| | | item.RowNo( rowNo ); |
| | | rowNo := rowNo + 1; |
| | | } |
| | | columnNo := 1; |
| | | traverse( this, CapacityAndSaleBudgeCompareItemColumn, item ) { |
| | | item.ColumnNo( columnNo ); |
| | | columnNo := columnNo + 1; |
| | | } |
| | | //rowNo := 1; |
| | | //rowSorted := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, item, item.PlaceOfProductionOfArray() + "_" + item.BusinessType() ); |
| | | //traverse( rowSorted, Elements, item ) { |
| | | // item.RowNo( rowNo ); |
| | | // rowNo := rowNo + 1; |
| | | //} |
| | | //columnNo := 1; |
| | | //traverse( this, CapacityAndSaleBudgeCompareItemColumn, item ) { |
| | | // item.ColumnNo( columnNo ); |
| | | // columnNo := columnNo + 1; |
| | | //} |
| | | *] |
| | | } |
| | |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | flag := true; |
| | | |
| | | flag := GlobalOTDSOP.CapacityAndSaleBudgeFilterYear( relsize ) > 0 and |
| | | GlobalOTDSOP.CapacityAndSaleBudgeFilterBusinessType( relsize ) > 0 and |
| | | GlobalOTDSOP.CapacityAndSaleBudgeFilterPlaceOfProductionOfArray( relsize ) > 0; |
| | | |
| | | return flag; |
| | | return not isnull( GlobalOTDSOP ) and not isnull( GlobalOTDTable ); |
| | | *] |
| | | QuillAction |
| | | { |
| | |
| | | if ( DataHolderCheckedProduct.Data().Size() = 0 ) { |
| | | WebMessageBox::Error( "请å
å¨å·¦ä¾§å¯¼èªæ éæ©è¦çææµè¯æ°æ®ç产åï¼", true ); |
| | | } else { |
| | | GlobalOTDTable.InitTestDataByYear( MacroPlan, |
| | | GlobalOTDSOP, |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), |
| | | DataHolderCheckedProduct.Data() ); |
| | | GlobalOTDTable.CreateCapacityAndSaleBudgeTestData( GlobalOTDSOP, |
| | | GlobalOTDTable, |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCheckedProduct.Data() ); |
| | | } |
| | | } |
| | | *] |
| | |
| | | CapacityAndSaleBudgeFilterMonth::InitializedData( GlobalOTDSOP ); |
| | | CapacityAndSaleBudgeFilterBusinessType::InitializedData( GlobalOTDSOP, GlobalOTDTable ); |
| | | CapacityAndSaleBudgeFilterPlaceOfProductionOfArray::InitializedData( GlobalOTDSOP, GlobalOTDTable ); |
| | | |
| | | GlobalOTDTable.Global_MappingAnnualBudgetData( relflush ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | [ |
| | | ContextMenu: 'chartContextMenuCapacityAndSaleBudge' |
| | | Taborder: 4 |
| | | Title: '年度产éé¢ç®å¤ç' |
| | | ] |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | //CapacityAndSaleBudgeChartElement::TestData( GlobalOTDTable ); |
| | | targetCapacityAndSaleBudgeFilterItem := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterItem, tempCASBFI, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterItem.Data(), Elements, tempCASBFI1, tempCASBFI1 = tempCASBFI ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterPlaceOfProductionOfArray := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterPlaceOfProductionOfArray, tempCASBFPOPOA, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), Elements, tempCASBFPOPOA1, tempCASBFPOPOA1 = tempCASBFPOPOA ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterBusinessType := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterBusinessType, tempCASBFBT, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), Elements, tempCASBFBT1, tempCASBFBT1 = tempCASBFBT ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterYear := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterYear, tempCASBFY, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterYear.Data(), Elements, tempCASBFY1, tempCASBFY1 = tempCASBFY ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterMonth := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterMonth, tempCASBFM, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterMonth.Data(), Elements, tempCASBFM1, tempCASBFM1 = tempCASBFM ) ); |
| | | |
| | | GlobalOTDSOP.CapacityAndSaleBudgeChart( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DropDownSaleOrCapacity.Text(), |
| | | DropDownTimeGroup.Text(), |
| | | DropDownByBusinessTypeOrByOrgCode.Text(), |
| | | DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | GlobalOTDTable ); |
| | | &targetCapacityAndSaleBudgeFilterItem, |
| | | &targetCapacityAndSaleBudgeFilterPlaceOfProductionOfArray, |
| | | &targetCapacityAndSaleBudgeFilterBusinessType, |
| | | &targetCapacityAndSaleBudgeFilterYear, |
| | | &targetCapacityAndSaleBudgeFilterMonth, |
| | | GlobalOTDTable |
| | | ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | targetCapacityAndSaleBudgeFilterItem := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterItem, tempCASBFI, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterItem.Data(), Elements, tempCASBFI1, tempCASBFI1 = tempCASBFI ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterPlaceOfProductionOfArray := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterPlaceOfProductionOfArray, tempCASBFPOPOA, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterPlaceOfProductionOfArray.Data(), Elements, tempCASBFPOPOA1, tempCASBFPOPOA1 = tempCASBFPOPOA ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterBusinessType := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterBusinessType, tempCASBFBT, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterBusinessType.Data(), Elements, tempCASBFBT1, tempCASBFBT1 = tempCASBFBT ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterYear := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterYear, tempCASBFY, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterYear.Data(), Elements, tempCASBFY1, tempCASBFY1 = tempCASBFY ) ); |
| | | |
| | | targetCapacityAndSaleBudgeFilterMonth := selectset( GlobalOTDSOP, CapacityAndSaleBudgeFilterMonth, tempCASBFM, |
| | | exists( DataHolderCapacityAndSaleBudgeFilterMonth.Data(), Elements, tempCASBFM1, tempCASBFM1 = tempCASBFM ) ); |
| | | |
| | | |
| | | GlobalOTDSOP.CapacityAndSaleBudgeCompare( DataHolderMacroPlansForScenarioComparison.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterItem.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterYear.Data(), |
| | | DataHolderCapacityAndSaleBudgeFilterMonth.Data(), |
| | | &targetCapacityAndSaleBudgeFilterItem, |
| | | &targetCapacityAndSaleBudgeFilterPlaceOfProductionOfArray, |
| | | &targetCapacityAndSaleBudgeFilterBusinessType, |
| | | &targetCapacityAndSaleBudgeFilterYear, |
| | | &targetCapacityAndSaleBudgeFilterMonth, |
| | | GlobalOTDTable ); |
| | | *] |
| | | GroupServerCalls: false |
| | |
| | | FormPeggingAllResult_DataSetLevelPeggingAllResult |
| | | { |
| | | groupDepth: 2 |
| | | sort: 'StartDate' |
| | | sort: 'ProductID,StockingPointID,StartDate' |
| | | column_PeggingProductInSalesDemandBase_SalesDemandBaseID |
| | | { |
| | | columnId: 'PeggingProductInSalesDemandBase.SalesDemandBaseID' |
| | |
| | | userconfigurableinformation |
| | | { |
| | | } |
| | | image: 'VIEW' |
| | | page: '' |
| | | group: '' |
| | | index: 0 |
| | | image: 'VIEW' |
| | | description: '' |
| | | } |
| | | formatversion: 2 |
| | |
| | | FormCapacityAndSaleBudgeFilterItem_DataSetLevelCapacityAndSaleBudgeFilterItem |
| | | { |
| | | groupDepth: -1 |
| | | sort: 'ItemName' |
| | | sort: 'DESC:ItemName' |
| | | column_ItemName |
| | | { |
| | | columnId: 'ItemName' |
| | |
| | | FormCapacityAndSaleBudgeFilterPlaceOfProductionOfArray_DataSetLevelCapacityAndSaleBudgeFilterPlaceOfProductionOfArray |
| | | { |
| | | groupDepth: -1 |
| | | sort: 'DESC:PlaceOfProductionOfArray' |
| | | column_PlaceOfProductionOfArray |
| | | { |
| | | columnId: 'PlaceOfProductionOfArray' |
| | |
| | | FormCapacityAndSaleBudgeFilterBusinessType_DataSetLevelCapacityAndSaleBudgeFilterBusinessType |
| | | { |
| | | groupDepth: -1 |
| | | sort: 'DESC:BusinessType' |
| | | column_BusinessType |
| | | { |
| | | columnId: 'BusinessType' |
| | |
| | | userconfigurableinformation |
| | | { |
| | | } |
| | | image: 'PIG' |
| | | page: '' |
| | | group: '' |
| | | index: 0 |
| | | image: 'PIG' |
| | | description: '' |
| | | } |
| | | formatversion: 2 |
| | |
| | | CREATIONUSER 'quintiq/hongjli' |
| | | UPDATEDATETIME '2023-11-01T11:42:14' |
| | | UPDATEUSER 'quintiq/hongjli' |
| | | LASTACCESSDATE '2023-11-02' |
| | | LASTACCESSDATE '2023-11-03' |
| | | VIEWSCOPE 0 |
| | | } |
| | | AUTHORIZATIONS |