From d6bd7a69bc31efa79b21c7be12ba9547a921c251 Mon Sep 17 00:00:00 2001 From: hongji.li <hongji.a.li@capgemini.com> Date: 星期五, 03 十一月 2023 16:28:41 +0800 Subject: [PATCH] 年度产销预算BUG修改 --- _Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl | 497 +++++++++++++++++++++++++++--------------------------- 1 files changed, 251 insertions(+), 246 deletions(-) diff --git a/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl b/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl index b96a8a8..fd760c1 100644 --- a/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl +++ b/_Main/BL/Type_GlobalOTDSOP/Method_CapacityAndSaleBudgeChart.qbl @@ -4,263 +4,268 @@ 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 = "瀛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 ( 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 = "瀛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 ( 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 = "瀛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( "==鈫�==" ); -- Gitblit v1.9.3