yypsybs
2023-09-19 bc27afe76dc7bfbb63c8d078d546b97746ebddde
年度预算产销复盘填数据
已修改6个文件
已添加16个文件
已删除1个文件
434 ■■■■■ 文件已修改
_Main/BL/Relations/Relation_CapacityAndSaleBudgeCompareItemColumn_ScenarioManager_ScenarioManag.qbl 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInYear.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/Method_GetSaleAmountInYear.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSaleByMonth.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSaleByYear.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByMonth.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByYear.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeCompareItemColumn/Attribute_ColumnNo.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Attribute_RowName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Attribute_RowNo.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Method_GetProductCodes.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetByMonth.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetByYear.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/Method_DoCall.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_TestData.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByMonth.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByYear.qbl 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_matrixEditorActionBarPageCapacityAndSaleBudgeCompare.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_matrixeditorContextMenuCapacityAndSaleBudgeCompare.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CapacityAndSaleBudgeCompareItemColumn_ScenarioManager_ScenarioManag.qbl
@@ -3,8 +3,11 @@
Relation CapacityAndSaleBudgeCompareItemColumn_ScenarioManager_ScenarioManager_CapacityAndSaleBudgeCompareItemColumn
{
  #keys: '1[414384.0.816631032]'
  DefaultRelationStrategy
  ProceduralSequenceRelationStrategy
  {
    #keys: '13[0.0.0][414384.0.827659683][414384.0.827659677][414384.0.827659684][414384.0.827659678][414384.0.827659685][414384.0.827659679][414384.0.827659686][414384.0.827659680][414384.0.827659687][414384.0.827659681][414384.0.827659688][414384.0.827659682]'
    SequenceElementSuffix: 'ColumnInManager'
    SequenceSuffix: 'ColumnInManager'
  }
  RelationSide.LeftSide ScenarioManager
  {
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method GetCapacityInSheetInYear () as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := 0.0;
    for( i := 1; i <= 12; i := i + 1 ) {
      field := Reflection::FindAttribute( "CapacityAndSaleBudge", "CapacityInSheetInMonth" + [String]i );
      result := result + field.GetReal( this );
    }
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/Method_GetSaleAmountInYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method GetSaleAmountInYear () as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := 0.0;
    for( i := 1; i <= 12; i := i + 1 ) {
      field := Reflection::FindAttribute( "CapacityAndSaleBudge", "SaleAmountInMonth" + [String]i );
      result := result + field.GetReal( this );
    }
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSaleByMonth.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSaleByMonth (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo,
  Number monthNo
) as Real
{
  Description: '销售额(W)'
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    field := Reflection::FindAttribute( "CapacityAndSaleBudge", "SaleAmountInMonth" + [String]monthNo );
    value := sum( parent,
                  CapacityAndSaleBudge,
                  item,
                  productNo.Find( item.ProductCode() ) > -1,
                  field.GetReal( item ) );
    return value;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSaleByYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSaleByYear (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo
) as Real
{
  Description: '销售额(W)'
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( parent,
                   CapacityAndSaleBudge,
                   item,
                   productNo.Find( item.ProductCode() ) > -1,
                   item.GetSaleAmountInYear() );
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByMonth.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSheetByMonth (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo,
  Number monthNo
) as Real
{
  Description: '产能-实数大张'
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    field := Reflection::FindAttribute( "CapacityAndSaleBudge", "CapacityInSheetInMonth" + [String]monthNo );
    value := sum( parent,
                  CapacityAndSaleBudge,
                  item,
                  productNo.Find( item.ProductCode() ) > -1,
                  field.GetReal( item ) );
    return value;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSheetByYear (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo
) as Real
{
  Description: '产能 - å®žæ•°å¤§å¼ '
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( parent,
                   CapacityAndSaleBudge,
                   item,
                   productNo.Find( item.ProductCode() ) > -1,
                   item.GetCapacityInSheetInYear() );
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeCompareItemColumn/Attribute_ColumnNo.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ColumnNo
{
  #keys: '3[414384.0.829650697][414384.0.829650696][414384.0.829650698]'
  ValueType: Number
}
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Attribute_RowName.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Attribute_RowNo.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute RowNo
{
  #keys: '3[414384.0.829650684][414384.0.829650683][414384.0.829650685]'
  ValueType: Number
}
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/Method_GetProductCodes.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
#parent: #root
Method GetProductCodes () as owning Strings
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    return selectuniquevalues( this, CapacityAndSaleBudgeCompareItemRowProduct, item, item.ProductCode() );
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetByMonth.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByMonth (
  Strings productCodes,
  MacroPlan parent,
  Number monthNo,
  Number yearNo
) as Real
{
  Description: 'todo changeParent'
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    value := sum( parent,
                  MappingForecast,
                  item,
                  productCodes.Find( item.ProductID() ) > -1 and yearNo = item.StartDate().Year() and monthNo = item.StartDate().Month(),
                  item.Price() * item.Quantity() );
    return value;
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetByYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByYear (
  Strings productCodes,
  MacroPlan parent,
  Number yearNo
) as Real
{
  Description: 'todo changeParent'
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    value := sum( parent,
                  MappingForecast,
                  item,
                  productCodes.Find( item.ProductID() ) > -1 and yearNo = item.StartDate().Year(),
                  item.Price() * item.Quantity() );
    return value;
  *]
}
_Main/BL/Type_PRData/Method_DoCall.qbl
@@ -49,10 +49,10 @@
    result.ReceiveTime( DateTime::Now() );
    
    // ä¸»è®°å½•修改
    result.SendStatus( "T" );
    result.SendStatus( "已发送" );
    result.ReleaseBy( callBy );
    result.SendTime( DateTime::Now() );
    this.SendStatus( "T" );
    this.SendStatus( "已发送" );
    this.SendTIme( DateTime::Now() );
    this.SendBy( callBy );
    
_Main/BL/Type_PRData/StaticMethod_TestData.qbl
@@ -21,7 +21,7 @@
                                                                  Number::Random( 9, 12 ),
                                                                  Number::Random( 13, 28 ) ),
                          DataID := [String]Number::Random( 1, Number::MaxNumber() ), 
                          SendStatus := ifexpr( Number::Random( 1, 5 ) = 1, "T", "" ) );
                          SendStatus := ifexpr( Number::Random( 1, 5 ) = 1, "已发送", "" ) );
      }
    }
  *]
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByMonth.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetNewSupplyByMonth (
  Strings productNo,
  MacroPlan macroPlan,
  Number yearNo,
  Number monthNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( macroPlan,
                   Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,
                   item,
                   productNo.Find( item.ProductInStockingPoint_MP().Product_MP().ID() ) > -1
                   and item.Period_MP().StartDate().Year() = yearNo
                   and item.Period_MP().StartDate().Month() = monthNo,
                   item.NewSupplyQuantity() );
    return result;
  *]
}
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetNewSupplyByYear (
  Strings productNo,
  MacroPlan macroPlan,
  Number yearNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( macroPlan,
                         Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod,
                         item,
                         productNo.Find( item.ProductInStockingPoint_MP().Product_MP().ID() ) > -1
                         and item.Period_MP().StartDate().Year() = yearNo,
                         item.NewSupplyQuantity() );
    return result;
  *]
}
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
@@ -6,10 +6,11 @@
  CapacityAndSaleBudgeFilterYears years,
  CapacityAndSaleBudgeFilterMonths months,
  MPSync mpSync,
  GlobalOTDTable otdTable,
  MacroPlan mappingParent
)
{
  Description: 'todo : mappingParent改为mpSync'
  Description: 'todo : mappingParent改为mpSync, random删了'
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
@@ -77,15 +78,19 @@
    if( CapacityAndSaleBudgeFilterItem::Contains( items, "面板分配量" ) ) {
      // åŽ†å²æ•°æ®
      traverse( months, Elements, month ) {
        columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "面板分配量-" + "-" + [String]month.MonthNo() + "-年度预算" );
        columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "面板分配量-" + "-" + [String]month.MonthNo() + "月-年度预算" );
        traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
          cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
          cellReal := CapacityAndSaleBudge::GetSheetByMonth( row.GetProductCodes(), otdTable, DateTime::Now().Year(), month.MonthNo() );
          cellReal := Real::Random( 1.0, 999.0 );
          cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
          cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
        }
      }
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "面板分配量-" + "-total-年度预算" );
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "面板分配量-total-年度预算" );
      traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
        cellReal := CapacityAndSaleBudge::GetSheetByYear( row.GetProductCodes(), otdTable, DateTime::Now().Year() );
        cellReal := Real::Random( 1.0, 999.0 );
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
        cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
      }
      // S&OP数据
@@ -93,16 +98,20 @@
        traverse( macroPlans, Elements, macroPlan ) {
          traverse( months, Elements, month ) {
            columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, 
                                                                                    "面板分配量-" + [String]year.YearNo() + "-" + [String]month.MonthNo() + "-" + macroPlan.ScenarioName() );
                                                                                    "面板分配量-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "月-" + macroPlan.ScenarioName() );
            traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
              cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
              cellReal := Product_MP::GetNewSupplyByMonth( row.GetProductCodes(), macroPlan, year.YearNo(), month.MonthNo() );
              cellReal := Real::Random( 1.0, 999.0 );
              cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
              cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
            }
          }
          columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, 
                                                                                 "面板分配量-" + [String]year.YearNo() + "-total-" + macroPlan.ScenarioName() );
                                                                                 "面板分配量-" + [String]year.YearNo() + "å¹´-total-" + macroPlan.ScenarioName() );
          traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
            cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
            cellReal := Product_MP::GetNewSupplyByYear( row.GetProductCodes(), macroPlan, year.YearNo() );
            cellReal := Real::Random( 1.0, 999.0 );
            cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
            cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
          }
        }
@@ -113,30 +122,36 @@
    if( CapacityAndSaleBudgeFilterItem::Contains( items, "销售额" ) ) {
      // åŽ†å²æ•°æ®
      traverse( months, Elements, month ) {
        columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + "-" + [String]month.MonthNo() + "-年度预算" );
        columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + "-" + [String]month.MonthNo() + "月-年度预算" );
        traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
          cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
          cellReal := CapacityAndSaleBudge::GetSaleByMonth( row.GetProductCodes(), otdTable, DateTime::Now().Year(), month.MonthNo() );
          cellReal := Real::Random( 1.0, 999.0 );
          cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
          cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
        }
      }
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + "-total-年度预算" );
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-total-年度预算" );
      traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
        cellReal := CapacityAndSaleBudge::GetSaleByYear( row.GetProductCodes(), otdTable, DateTime::Now().Year() );
        cellReal := Real::Random( 1.0, 999.0 );
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
        cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
      }
      // S&OP数据
      traverse( years, Elements, year ) {
        traverse( macroPlans, Elements, macroPlan ) {
          traverse( months, Elements, month ) {
            columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "-" + [String]month.MonthNo() + "-" + macroPlan.ScenarioName() );
            columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "月-" + macroPlan.ScenarioName() );
            traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
              cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
              cellReal := MappingForecast::GetByMonth( row.GetProductCodes(), mappingParent, year.YearNo(), month.MonthNo() );
              cell := columnMonth.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
              cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
            }
          }
          columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "-total-" + macroPlan.ScenarioName() );
          columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "å¹´-total-" + macroPlan.ScenarioName() );
          traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
            cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
            cellReal := MappingForecast::GetByYear( row.GetProductCodes(), mappingParent, year.YearNo() );
            cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
            cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
          }
        }
@@ -148,14 +163,14 @@
      // åŽ†å²æ•°æ®
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "大张盈利额-年度预算" );
      traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
        cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
      }
      // S&OP数据
      traverse( macroPlans, Elements, macroPlan ) {
        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "大张盈利额-" + [String]year.YearNo() );
        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "大张盈利额-" + [String]year.YearNo() + "å¹´" );
        traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
          cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
          cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
          cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
        }
      }
@@ -166,20 +181,32 @@
      // åŽ†å²æ•°æ®
      columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产品盈利额-年度预算" );
      traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
        cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
        cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
      }
      // S&OP数据
      traverse( macroPlans, Elements, macroPlan ) {
        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产品盈利额-" + [String]year.YearNo() );
        columnYear := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "产品盈利额-" + [String]year.YearNo() + "å¹´" );
        traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
          cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 100 ) );
          cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]Number::Random( 0, 0 ) );
          cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
        }
      }
    }
    
    // è®¾ç½®rowNo和columnNo
    info( "set rowNo and columnNo" );
    rowNo := 1;
    rowSorted := selectsortedset( this, CapacityAndSaleBudgeCompareItemRow, item, item.BusinessType() + "_" + item.OrgCode() );
    traverse( rowSorted, Elements, item ) {
      item.RowNo( rowNo );
      rowNo := rowNo + 1;
    }
    columnNo := 1;
    traverse( this, CapacityAndSaleBudgeCompareItemColumn, item ) {
      item.ColumnNo( columnNo );
      columnNo := columnNo + 1;
    }
    info( "done" );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_MatrixEditorCapacityAndSaleBudgeCompare.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
Quintiq file version 2.0
Component MatrixEditorCapacityAndSaleBudgeCompare
{
  #keys: '[414384.0.828942477]'
  BaseType: 'WebMatrixEditor'
  Children:
  [
    Component MatrixEditorCellCapacityAndSaleBudgeCompare
    {
      #keys: '[414384.0.828942478]'
      BaseType: 'WebMatrixEditorCell'
      Children:
      [
        Component DataExtractorCapacityAndSaleBudgeCompare
        {
          #keys: '[414384.0.828942479]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'ScenarioManager'
            Source: 'ScenarioManager'
            Taborder: 0
            Transformation: 'CapacityAndSaleBudgeCompareItemColumn.CapacityAndSaleBudgeCompareItemCell'
          ]
        }
      ]
      Properties:
      [
        Attributes: 'CellContent'
        Column: 'CapacityAndSaleBudgeCompareItemColumn'
        Row: 'CapacityAndSaleBudgeCompareItemRow'
        Taborder: 0
      ]
    }
    Component MatrixEditorRowsCapacityAndSaleBudgeCompare
    {
      #keys: '[414384.0.828942482]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractor385
        {
          #keys: '[414384.0.828942483]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'ScenarioManager'
            Source: 'ScenarioManager'
            Taborder: 0
            Transformation: 'CapacityAndSaleBudgeCompareItemRow'
          ]
        }
      ]
      Properties:
      [
        Legend: 'RowNo'
        SortCriteria: 'RowNo'
        Taborder: 1
      ]
    }
    Component MatrixEditorColumnsCapacityAndSaleBudgeCompare
    {
      #keys: '[414384.0.828942486]'
      BaseType: 'WebMatrixEditorHeaderLevel'
      Children:
      [
        Component DataExtractor224
        {
          #keys: '[414384.0.828942487]'
          BaseType: 'WebDataExtractor'
          Properties:
          [
            DataType: 'ScenarioManager'
            Source: 'ScenarioManager'
            Taborder: 0
            Transformation: 'CapacityAndSaleBudgeCompareItemColumn'
          ]
        }
      ]
      Properties:
      [
        Legend: 'ColumnName'
        SortCriteria: 'ColumnNo'
        Taborder: 2
      ]
    }
    #child: matrixEditorActionBarPageCapacityAndSaleBudgeCompare
    #child: matrixeditorContextMenuCapacityAndSaleBudgeCompare
  ]
  Properties:
  [
    Columns: 'MatrixEditorColumnsCapacityAndSaleBudgeCompare'
    ContextMenu: 'matrixeditorContextMenuCapacityAndSaleBudgeCompare'
    Editable: false
    Rows: 'MatrixEditorRowsCapacityAndSaleBudgeCompare'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_matrixEditorActionBarPageCapacityAndSaleBudgeCompare.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixEditorActionBarPageCapacityAndSaleBudgeCompare
{
  #keys: '[414384.0.828942490]'
  BaseType: 'matrixEditorActionBarPage'
  Properties:
  [
    Taborder: 3
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Component_matrixeditorContextMenuCapacityAndSaleBudgeCompare.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
Quintiq file version 2.0
Component matrixeditorContextMenuCapacityAndSaleBudgeCompare
{
  #keys: '[414384.0.828942493]'
  BaseType: 'matrixeditorContextMenu'
  Properties:
  [
    Taborder: 4
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/Response_ButtonCapacityAndSaleBudgeCompare_OnClick.def
@@ -15,6 +15,7 @@
                                                   DataHolderCapacityAndSaleBudgeFilterYear.Data(), 
                                                   DataHolderCapacityAndSaleBudgeFilterMonth.Data(),
                                                   MPSync, 
                                                   GlobalOTDTable,
                                                   MacroPlan );
    *]
  }
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeCompare/_ROOT_Component_FormCapacityAndSaleBudgeCompare.def
@@ -17,6 +17,7 @@
        Taborder: 0
      ]
    }
    #child: MatrixEditorCapacityAndSaleBudgeCompare
  ]
  Properties:
  [