| | |
| | | MacroPlan mappingParent |
| | | ) |
| | | { |
| | | Description: '按入参处理数据,产生需要的CapacityAndSaleBudgeChartElement' |
| | | Description: |
| | | [* |
| | | 按入参处理数据,产生需要的CapacityAndSaleBudgeChartElement |
| | | !!!!废弃!!!! |
| | | *] |
| | | TextBody: |
| | | [* |
| | | // yypsybs Sep-19-2023 (created) |
| | |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-目标", |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingForecast::GetQuantityByYear( productCodeList, mappingParent, [Number]year ) ) |
| | | // todo QID 23 |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | // todo |
| | | 0.0 ) |
| | | ); |
| | | } |
| | |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标", |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingForecast::GetQuantityByHalfYear( productCodeList, mappingParent, [Number]year, halfNo ) ) |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | |
| | | // info( "seasonNo : " + [String]seasonNo ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-目标", |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingForecast::GetQuantityBySeason( productCodeList, mappingParent, [Number]year, seasonNo ) ) |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // info( "productCodeList : " + [String]productCodeList.Size() ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "面板基地" and groupBy = "月" ) { |
| | | for( monthNo := 1; monthNo <= 12; monthNo := monthNo + 1 ) { |
| | | monthNoString := ifexpr( monthNo <= 9, "0" + [String]monthNo, [String]monthNo ); |
| | | traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]monthNo + "月-目标", |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingForecast::GetQuantityByMonth( productCodeList, mappingParent, [Number]year, monthNo ) ) |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]monthNo + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := placeOfProductionOfArray, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := placeOfProductionOfArray, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |
| | |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-目标", |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByYear( productCodeList, mpSync, [Number]year ), |
| | | MappingForecast::GetQuantityByYear( productCodeList, mappingParent, [Number]year ) ) |
| | | MappingAnnualBudget::GetSheetByYear( productCodeList, mpSync, [Number]year ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ), |
| | | 0.0 ) |
| | |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标", |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ), |
| | | MappingForecast::GetQuantityByHalfYear( productCodeList, mappingParent, [Number]year, halfNo ) ) |
| | | MappingAnnualBudget::GetSheetByHalfYear( productCodeList, mpSync, [Number]year, halfNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ), |
| | | 0.0 ) |
| | |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-目标", |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ), |
| | | MappingForecast::GetQuantityBySeason( productCodeList, mappingParent, [Number]year, seasonNo ) ) |
| | | MappingAnnualBudget::GetSheetBySeason( productCodeList, mpSync, [Number]year, seasonNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := businessType, |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyBySeason( productCodeList, macroPlan, [Number]year, seasonNo ), |
| | | 0.0 ) |
| | |
| | | } |
| | | if ( byBusinessTypeOrByOrgCode = "事业部" and groupBy = "月" ) { |
| | | for( monthNo := 1; monthNo <= 12; monthNo := monthNo + 1 ) { |
| | | monthNoString := ifexpr( monthNo <= 9, "0" + [String]monthNo, [String]monthNo ); |
| | | traverse( businessTypeList, Elements, businessType ) { |
| | | productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType ); |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]monthNo + "月-目标", |
| | | BusinessTypeOrOrgCode := businessType, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-目标", |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | MappingCapacityAndSaleBudge::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ), |
| | | MappingForecast::GetQuantityByMonth( productCodeList, mappingParent, [Number]year, monthNo ) ) |
| | | MappingAnnualBudget::GetSheetByMonth( productCodeList, mpSync, [Number]year, monthNo ) ) |
| | | ); |
| | | // S&OP |
| | | traverse( macroPlans, Elements, macroPlan ) { |
| | | this.CapacityAndSaleBudgeChartElement( relnew, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + [String]monthNo + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrOrgCode := businessType, |
| | | TimeStringAndScenarioName := [String]year + "年-第" + monthNoString + "月-" + macroPlan.ScenarioName(), |
| | | BusinessTypeOrPlaceOfProductionOfArray := businessType, |
| | | Quantity := ifexpr( isCapacity, |
| | | Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ), |
| | | 0.0 ) |