From 2713c338a98325cad21ebec2085802a5e49a98ef Mon Sep 17 00:00:00 2001 From: hongji.li <hongji.a.li@capgemini.com> Date: 星期日, 05 十一月 2023 17:47:41 +0800 Subject: [PATCH] Pegging&年度产销优化 --- _Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl | 254 -------------------------------------------------- 1 files changed, 0 insertions(+), 254 deletions(-) diff --git a/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl b/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl index fd760c1..7e62097 100644 --- a/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl +++ b/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl @@ -22,259 +22,5 @@ casbcirs := CapacityAndSaleBudgeChartElement::SelectGenerateChartRows( this, &items, &placeOfProductionOfArrays, &businessTypes, &years, &months ); CapacityAndSaleBudgeChartElement::CreateData( this, macroPlans, casbcirs, popoa, groupBy, saleOrCapacity, years, months ); - - //// 骞翠唤涓嶉�夋椂鍏ㄩ�� - //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 = "瀛e害" ) { - // 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 + "瀛e害-鐩爣", - // 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 + "瀛e害-" + 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 = "瀛e害" ) { - // 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 + "瀛e害-鐩爣", - // 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 + "瀛e害-" + 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( "==鈫�==" ); - //// info( row.BusinessType() ); - //// info( row.PlaceOfProductionOfArray() ); - //// elements := selectset( row, CapacityAndSaleBudgeChartRowProduct, cell, true ); - //// info( elements.Size() ); - //// info( row.GetProductCodes().Concatenate( " | " ) ); - //// info( "==鈫�==" ); - ////} *] } -- Gitblit v1.9.3