| | |
| | | #parent: #root |
| | | Method CapacityAndSaleBudgeChart ( |
| | | MacroPlans macroPlans, |
| | | Boolean isCapacity, |
| | | String saleOrCapacity, |
| | | String groupBy, |
| | | String byBusinessTypeOrByOrgCode, |
| | | String businessTypeChosen, |
| | |
| | | [* |
| | | // yypsybs Sep-19-2023 (created) |
| | | // true, false |
| | | info( isCapacity ); |
| | | info( saleOrCapacity ); |
| | | // 月;季度;半年;年 |
| | | info( groupBy ); |
| | | // 面板基地;事业部 |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | // todo QID 23 |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | // todo |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // S&OP |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ) ) |
| | | ); |
| | | } |
| | | } |
| | |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |
| | | Quantity := ifexpr( saleOrCapacity = "销售额", |
| | | 0.0, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ) ) |
| | | ); |
| | | } |
| | | } |