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 );
|
}
|
}
|
}
|
}
|
}
|
*]
|
}
|