yypsybs
2023-09-20 2237ad24deb34ca1aeaf659ea1d4f523d708cd26
PRData现场测试用
已重命名2个文件
已复制2个文件
已添加30个文件
已修改13个文件
978 ■■■■■ 文件已修改
_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartRowProduct_CapacityAndSaleBudgeChartRow_Ca.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartRow_ScenarioManager_ScenarioManager_Capaci.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInPCSInYear.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInHalfYear.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInSeason.qbl 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByHalfYear#1.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetBySeason.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_Create.qbl 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/Attribute_BusinessType.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/Attribute_PlaceOfProductionOfArray.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/DefaultValue_BusinessType.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/Method_GetProductCodes.qbl 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_CreateIfNotExist.qbl 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_GetProductCodesByBusinessType.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_GetProductCodesByPlaceOfProductionOfArray.qbl 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRow/_ROOT_Type_CapacityAndSaleBudgeChartRow.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/Attribute_ProductCode.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/DefaultValue_ProductCode.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/StaticMethod_CreateIfNotExist.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/_ROOT_Type_CapacityAndSaleBudgeChartRowProduct.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ERPRequestOfPR/Method_GetCallJSONString.qbl 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetBalanceByMonth.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetBalanceByYear.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByHalfYear.qbl 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByMonth.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityBySeason.qbl 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByYear.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/Method_PrintCall.qbl 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning#662.qbl 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_PRHistoryData/Method_PrintCall.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ProductInStockingPointInPeriod/StaticMethod_GetByMRPCalverNo.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByHalfYear#1.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyBySeason.qbl 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_listContextMenuPRData#1.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_MenuPrintRequest_OnClick#623.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_OnCreated.def 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonLoad_OnClick.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_listContextMenuPRHistoryData#1.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_MenuPrintRequest_OnClick#338.def 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartRowProduct_CapacityAndSaleBudgeChartRow_Ca.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CapacityAndSaleBudgeChartRowProduct_CapacityAndSaleBudgeChartRow_CapacityAndSaleBudgeChartRow_CapacityAndSaleBudgeChartRowProduct
{
  #keys: '1[414384.0.852471810]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide CapacityAndSaleBudgeChartRow
  {
    #keys: '3[414384.0.852471812][414384.0.852471811][414384.0.852471813]'
    Cardinality: '0to1'
    ObjectDefinition: CapacityAndSaleBudgeChartRowProduct
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CapacityAndSaleBudgeChartRowProduct
  {
    #keys: '3[414384.0.852471815][414384.0.852471814][414384.0.852471816]'
    Cardinality: '1toN'
    ObjectDefinition: CapacityAndSaleBudgeChartRow
    OwningSide: 'Owned'
  }
}
_Main/BL/Relations/Relation_CapacityAndSaleBudgeChartRow_ScenarioManager_ScenarioManager_Capaci.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation CapacityAndSaleBudgeChartRow_ScenarioManager_ScenarioManager_CapacityAndSaleBudgeChartRow
{
  #keys: '1[414384.0.852471828]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide ScenarioManager
  {
    #keys: '3[414384.0.852471830][414384.0.852471829][414384.0.852471831]'
    Cardinality: '0to1'
    ObjectDefinition: CapacityAndSaleBudgeChartRow
    OwningSide: 'Reference'
  }
  RelationSide.RightSide CapacityAndSaleBudgeChartRow
  {
    #keys: '3[414384.0.852471833][414384.0.852471832][414384.0.852471834]'
    Cardinality: '1toN'
    ObjectDefinition: ScenarioManager
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInPCSInYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
Method GetCapacityInPCSInYear () as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := 0.0;
    for( i := 1; i <= 12; i := i + 1 ) {
      field := Reflection::FindAttribute( "CapacityAndSaleBudge", "CapacityInPCSInMonth" + [String]i );
      result := result + field.GetReal( this );
    }
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInHalfYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: #root
Method GetCapacityInSheetInHalfYear (
  Number halfNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := 0.0;
    fromMonth := 1 + ( halfNo - 1 ) * 6;
    toMonth := 6 + ( halfNo - 1 ) * 6;
    for( i := fromMonth; i <= toMonth; i := i + 1 ) {
      field := Reflection::FindAttribute( "CapacityAndSaleBudge", "CapacityInSheetInMonth" + [String]i );
      result := result + field.GetReal( this );
    }
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/Method_GetCapacityInSheetInSeason.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: #root
Method GetCapacityInSheetInSeason (
  Number seasonNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := 0.0;
    fromMonth := 1 + ( seasonNo - 1 ) * 3;
    toMonth := 3 + ( seasonNo - 1 ) * 3;
    for( i := fromMonth; i <= toMonth; i := i + 1 ) {
      field := Reflection::FindAttribute( "CapacityAndSaleBudge", "CapacityInSheetInMonth" + [String]i );
      result := result + field.GetReal( this );
    }
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetByHalfYear#1.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSheetByHalfYear (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo,
  Number halfNo
) as Real
{
  Description: '产能 - å®žæ•°å¤§å¼ '
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( parent,
                   CapacityAndSaleBudge,
                   item,
                   productNo.Find( item.ProductCode() ) > -1,
                   item.GetCapacityInSheetInHalfYear( halfNo ) );
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudge/StaticMethod_GetSheetBySeason.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSheetBySeason (
  Strings productNo,
  GlobalOTDTable parent,
  Number yearNo,
  Number seasonNo
) as Real
{
  Description: '产能 - å®žæ•°å¤§å¼ '
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    result := sum( parent,
                   CapacityAndSaleBudge,
                   item,
                   productNo.Find( item.ProductCode() ) > -1,
                   item.GetCapacityInSheetInSeason( seasonNo ) );
    return result;
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartElement/StaticMethod_Create.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Create (
  ScenarioManager parent,
  String timeStringAndScenarioName,
  String businessTypeOrOrgCode,
  Real quantity
)
{
  TextBody:
  [*
    // yypsybs Sep-20-2023 (created)
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/Attribute_BusinessType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute BusinessType
{
  #keys: '3[414384.0.850180080][414384.0.850180079][414384.0.850180081]'
  Description: '事业部'
  ValueType: String
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/Attribute_PlaceOfProductionOfArray.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute PlaceOfProductionOfArray
{
  #keys: '3[414384.0.850180083][414384.0.850180082][414384.0.850180084]'
  Description: '组织编码'
  ValueType: String
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/DefaultValue_BusinessType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: BusinessType
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/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, CapacityAndSaleBudgeChartRowProduct, item, item.ProductCode() );
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_CreateIfNotExist.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateIfNotExist (
  ScenarioManager scenarioManager,
  String businessType,
  String placeOfProductionOfArray
) as CapacityAndSaleBudgeChartRow
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    value := select( scenarioManager, CapacityAndSaleBudgeChartRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray );
    if( isnull( value ) ) {
      value := scenarioManager.CapacityAndSaleBudgeChartRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray );
    }
    return value;
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_GetProductCodesByBusinessType.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetProductCodesByBusinessType (
  CapacityAndSaleBudgeChartRows list,
  String businessTyoe
) as owning Strings
{
  TextBody:
  [*
    // yypsybs Sep-20-2023 (created)
    return selectuniquevalues(  list, Elements, item,
                                item.BusinessType() = businessTyoe,
                                item.BusinessType() );
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/StaticMethod_GetProductCodesByPlaceOfProductionOfArray.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetProductCodesByPlaceOfProductionOfArray (
  CapacityAndSaleBudgeChartRows list,
  String placeOfProductionOfArray
) as owning Strings
{
  TextBody:
  [*
    // yypsybs Sep-20-2023 (created)
    return selectuniquevalues(  list, Elements, item,
                                item.PlaceOfProductionOfArray() = placeOfProductionOfArray,
                                item.PlaceOfProductionOfArray() );
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRow/_ROOT_Type_CapacityAndSaleBudgeChartRow.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type CapacityAndSaleBudgeChartRow
{
  #keys: '5[414384.0.852471790][414384.0.852471788][0.0.0][414384.0.852471789][414384.0.852471791]'
  BaseType: Object
  StructuredName: 'CapacityAndSaleBudgeChartRows'
}
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/Attribute_ProductCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductCode
{
  #keys: '3[414384.0.852471849][414384.0.852471848][414384.0.852471850]'
  Description: '产品编码'
  ValueType: String
}
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/DefaultValue_ProductCode.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  TargetAttribute: ProductCode
}
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/StaticMethod_CreateIfNotExist.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateIfNotExist (
  CapacityAndSaleBudgeChartRow parent,
  String productCode
) as CapacityAndSaleBudgeChartRowProduct
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    value := select( parent, CapacityAndSaleBudgeChartRowProduct, item, item.ProductCode() = productCode );
    if( isnull( value ) ) {
      parent.CapacityAndSaleBudgeChartRowProduct( relnew, ProductCode := productCode );
    }
    return value;
  *]
}
_Main/BL/Type_CapacityAndSaleBudgeChartRowProduct/_ROOT_Type_CapacityAndSaleBudgeChartRowProduct.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type CapacityAndSaleBudgeChartRowProduct
{
  #keys: '5[414384.0.852471769][414384.0.852471767][0.0.0][414384.0.852471768][414384.0.852471770]'
  BaseType: Object
  StructuredName: 'CapacityAndSaleBudgeChartRowProducts'
}
_Main/BL/Type_ERPRequestOfPR/Method_GetCallJSONString.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
Quintiq file version 2.0
#parent: #root
Method GetCallJSONString () as String
{
  TextBody:
  [*
    // yypsybs Sep-20-2023 (created)
    conv := DateTimeToString::StandardConverter();
    conv.SetCustomConversion();
    conv.CustomFormatString( 'yyyyMMdd' );
    requestJSON := JSON::Object();
    requestJSON.Add( "BusinessType", this.BusinessType() );
    requestJSON.Add( "DataID", this.DataID() );
    requestJSON.Add( "DeliveryDate", conv.Convert( this.DeliveryDate().DateTime() ) );
    requestJSON.Add( "MRPCalverNo", this.MRPCalverNo() );
    requestJSON.Add( "OrganCode", this.OrganCode() );
    requestJSON.Add( "ProductID", this.ProductID() );
    requestJSON.Add( "ProductName", this.ProductName() );
    requestJSON.Add( "ProvideCode", this.ProviderCode() );
    requestJSON.Add( "ProviderName", this.ProviderName() );
    requestJSON.Add( "Quantity", this.Quantity() );
    requestJSON.Add( "StockingPointID", this.StockingPointID() );
    requestJSON.Add( "UnitOfMeasure", this.UnitOfMeasure() );
    return requestJSON.AsString();
  *]
}
_Main/BL/Type_GlobalDTOTable/Method_InitTestData.qbl
@@ -22,46 +22,49 @@
    info( "CapacityAndSaleBudge::InitTestData" )
    this.CapacityAndSaleBudge( relflush );
    for( i := 1; i < 100; i := i + 1 ) {
      this.CapacityAndSaleBudge( relnew,
                                 PlaceOfProductionOfArray := "面板基地" + [String]Number::Random( 1, 10 ),
                                 BusinessType := "事业部" + [String]Number::Random( 1, 10 ),
                                 CapacityInPCSInMonth1 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth2 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth3 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth4 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth5 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth6 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth7 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth8 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth9 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth10 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth11 := Number::Random( 1, 10000 ),
                                 CapacityInPCSInMonth12 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth1 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth2 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth3 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth4 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth5 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth6 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth7 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth8 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth9 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth10 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth11 := Number::Random( 1, 10000 ),
                                 CapacityInSheetInMonth12 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth1 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth2 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth3 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth4 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth5 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth6 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth7 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth8 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth9 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth10 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth11 := Number::Random( 1, 10000 ),
                                 SaleAmountInMonth12 := Number::Random( 1, 10000 )
                               );
      row := this.CapacityAndSaleBudge( relnew,
                                        PlaceOfProductionOfArray := "面板基地" + [String]Number::Random( 1, 10 ),
                                        BusinessType := "事业部" + [String]Number::Random( 1, 10 ),
                                        CapacityInPCSInMonth1 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth2 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth3 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth4 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth5 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth6 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth7 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth8 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth9 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth10 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth11 := Number::Random( 1, 10000 ),
                                        CapacityInPCSInMonth12 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth1 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth2 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth3 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth4 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth5 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth6 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth7 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth8 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth9 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth10 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth11 := Number::Random( 1, 10000 ),
                                        CapacityInSheetInMonth12 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth1 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth2 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth3 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth4 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth5 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth6 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth7 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth8 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth9 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth10 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth11 := Number::Random( 1, 10000 ),
                                        SaleAmountInMonth12 := Number::Random( 1, 10000 )
                                      );
      row.CapacityInPCSTotal( row.GetCapacityInPCSInYear() );
      row.CapacityInSheetTotal( row.GetCapacityInSheetInYear() );
      row.SaleAmountTotal( row.GetSaleAmountInYear() );
    }
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetBalanceByMonth.qbl
ÎļþÃû´Ó _Main/BL/Type_MappingForecast/StaticMethod_GetByMonth.qbl ÐÞ¸Ä
@@ -1,10 +1,10 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByMonth (
StaticMethod GetBalanceByMonth (
  Strings productCodes,
  MacroPlan parent,
  Number monthNo,
  Number yearNo
  Number yearNo,
  Number monthNo
) as Real
{
  Description: 'todo changeParent'
_Main/BL/Type_MappingForecast/StaticMethod_GetBalanceByYear.qbl
ÎļþÃû´Ó _Main/BL/Type_MappingForecast/StaticMethod_GetByYear.qbl ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByYear (
StaticMethod GetBalanceByYear (
  Strings productCodes,
  MacroPlan parent,
  Number yearNo
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByHalfYear.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetQuantityByHalfYear (
  Strings productCodes,
  MacroPlan parent,
  Number yearNo,
  Number halfNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    value := 0.0;
    startMonth := 1 + ( halfNo - 1 ) * 6;
    endMonth := 6 + ( halfNo - 1 ) * 6;
    for( monthNo := startMonth; monthNo <= endMonth; monthNo := monthNo + 1 ) {
      value := value + MappingForecast::GetQuantityByMonth( productCodes, parent, yearNo, monthNo );
    }
    return value;
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByMonth.qbl
copy from _Main/BL/Type_MappingForecast/StaticMethod_GetByMonth.qbl copy to _Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByMonth.qbl
Îļþ´Ó _Main/BL/Type_MappingForecast/StaticMethod_GetByMonth.qbl ¸´ÖÆ
@@ -1,13 +1,12 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByMonth (
StaticMethod GetQuantityByMonth (
  Strings productCodes,
  MacroPlan parent,
  Number monthNo,
  Number yearNo
  Number yearNo,
  Number monthNo
) as Real
{
  Description: 'todo changeParent'
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
@@ -15,7 +14,7 @@
                  MappingForecast, 
                  item,
                  productCodes.Find( item.ProductID() ) > -1 and yearNo = item.StartDate().Year() and monthNo = item.StartDate().Month(), 
                  item.Price() * item.Quantity() );
                  item.Quantity() );
    return value;
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityBySeason.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetQuantityBySeason (
  Strings productCodes,
  MacroPlan parent,
  Number yearNo,
  Number seasonNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    value := 0.0;
    startMonth := 1 + ( seasonNo - 1 ) * 3;
    endMonth := 3 + ( seasonNo - 1 ) * 3;
    for( monthNo := startMonth; monthNo <= endMonth; monthNo := monthNo + 1 ) {
      value := value + MappingForecast::GetQuantityByMonth( productCodes, parent, yearNo, monthNo );
    }
    return value;
  *]
}
_Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByYear.qbl
copy from _Main/BL/Type_MappingForecast/StaticMethod_GetByYear.qbl copy to _Main/BL/Type_MappingForecast/StaticMethod_GetQuantityByYear.qbl
Îļþ´Ó _Main/BL/Type_MappingForecast/StaticMethod_GetByYear.qbl ¸´ÖÆ
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetByYear (
StaticMethod GetQuantityByYear (
  Strings productCodes,
  MacroPlan parent,
  Number yearNo
@@ -14,7 +14,7 @@
                  MappingForecast, 
                  item,
                  productCodes.Find( item.ProductID() ) > -1 and yearNo = item.StartDate().Year(), 
                  item.Price() * item.Quantity() );
                  item.Quantity() );
    return value;
  *]
}
_Main/BL/Type_PRData/Method_PrintCall.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
Quintiq file version 2.0
#parent: #root
Method PrintCall (
  GlobalOTDTable globalData,
  String callBy
) as String
{
  TextBody:
  [*
    // yypsybs Sep-11-2023 (created)
    result := globalData.PRHistoryData( relnew );
    // ç…§æ¬éƒ¨åˆ†
    result.AuthorizationStatus( this.AuthorizationStatus() );
    result.BusinessType( this.BusinessType() );
    result.DataID( this.DataID() );
    result.DeliverToRequestorId( this.DeliverToRequestorId() );
    result.DestinationOrganizationID( this.DestinationOrganizationID() );
    result.DestinationTypeCode( this.DestinationTypeCode() );
    result.HeaderDescription( this.HeaderDescription() );
    result.LineAttribute1( this.LineAttribute1() );
    result.LineAttribute6( this.LineAttribute6() );
    result.LineType( this.LineType() );
    result.LineTypeId( this.LineTypeId() );
    result.MRPCalverNo( this.MRPCalverNo() );
    result.OrganCode( this.OrganCode() );
    result.OrgId( this.OrgId() );
    result.PlannerCode( this.PlannerCode() );
    result.PreparerId( this.PreparerId() );
    result.ProduceRequiredDate( this.ProduceRequiredDate() );
    result.ProductID( this.ProductID() );
    result.ProductName( this.ProductName() );
    result.ProviderCode( this.ProviderCode() );
    result.ProviderName( this.ProviderName() );
    result.Quantity( this.Quantity() );
    result.RequisitionType( this.RequisitionType() );
    result.StockingPointID( this.StockingPointID() );
    result.UnitOfMeasure( this.UnitOfMeasure() );
    result.UnitPrice( this.UnitPrice() );
    // è¯·æ±‚部分
    request := ERPRequestOfPR::Create( result );
    retult := request.GetCallJSONString();
    request.Delete();
    return retult;
  *]
}
_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning#662.qbl
@@ -24,7 +24,7 @@
    erpData := "暂无";
    
    // æ ¹æ®pispip
    result.MRPCalverNo( pispip.MRPCalverNo() );
    result.MRPCalverNo( ifexpr( pispip.MRPCalverNo() = "", "暂无", pispip.MRPCalverNo() ) );
    result.Quantity( pispip.NewSupplyQuantity() );
    
    // æ ¹æ®product
@@ -40,15 +40,28 @@
                                     Date::Today(), (result.ProduceRequiredDate() - Duration::Days( 7 )).Date() ) );
    
    // æ ¹æ® ç‰©æ–™å±žæ€§æ ‡ç­¾è®¾å®š&物料计划策略
    result.IsPanelMaterial();
    result.IsGenericMaterial( matAttrSetting.FlagGeneric() );
    result.IsLongLeadItem( matAttrSetting.FlagLongTerm() );
    result.MaterialMRPType( ifexpr( matAttrSetting.PlanningStrategyCustom() <> "", matAttrSetting.PlanningStrategyCustom(), matAttrSetting.PlanningStrategyAuto() ) );
    result.IsPanelMaterial( "暂无" );
    if( isnull( matAttrSetting ) ) {
      result.IsGenericMaterial( "暂无" );
      result.IsLongLeadItem( "暂无" );
      result.MaterialMRPType( "暂无" );
    } else {
      result.IsGenericMaterial( matAttrSetting.FlagGeneric() );
      result.IsLongLeadItem( matAttrSetting.FlagLongTerm() );
      result.MaterialMRPType( ifexpr( matAttrSetting.PlanningStrategyCustom() <> "", matAttrSetting.PlanningStrategyCustom(), matAttrSetting.PlanningStrategyAuto() ) );
    }
    
    // æ ¹æ®product中间表
    result.BusinessType( mappingProduct.BusinessType() );
    result.OrganCode( mappingProduct.OrgCode() );
    result.UnitOfMeasure( mappingProduct.UnitOfMeasureName() );
    if( isnull( mappingProduct ) ) {
      result.BusinessType( "暂无" );
      result.OrganCode( "暂无" );
      result.UnitOfMeasure( "暂无" );
    } else {
      result.BusinessType( mappingProduct.BusinessType() );
      result.OrganCode( mappingProduct.OrgCode() );
      result.UnitOfMeasure( mappingProduct.UnitOfMeasureName() );
    }
    
    // æ ¹æ®ä¾›åº”商能力中间表
    result.ProviderCode( mappingProviderCapacity );
_Main/BL/Type_PRData/StaticMethod_FromSupplyPlanning.qbl
@@ -20,7 +20,7 @@
                             item.MRPCalverNo() = mrpCalverNo );
    if( isnull( oldRecords ) or oldRecords.Size() = 0 ) {
      pispips := ProductInStockingPointInPeriod::GetByMRPCalverNo( macroPlan, mrpCalverNo );
      traverse( pispips, Elements, item ) {
      traverse( pispips, Elements, item, item.NewSupplyQuantity() > 0 ) {
        PRData::FromSupplyPlanning( otdTable, macroPlan, mappingRoot, item );
      }
    }
_Main/BL/Type_PRHistoryData/Method_PrintCall.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Method PrintCall (
  String callBy
) as String
{
  TextBody:
  [*
    // yypsybs Sep-20-2023 (created)
    result := this.GlobalOTDTable().PRHistoryData( relcopy, this );
    // æ›´æ–°éƒ¨åˆ†
    result.PRDataReleaseDate( Date::Today() );
    result.ReleaseBy( callBy );
    result.SendTime( DateTime::Now() );
    // è¯·æ±‚
    request := ERPRequestOfPR::Create( result );
    callString := request.GetCallJSONString();
    request.Delete();
    return callString;
  *]
}
_Main/BL/Type_ProductInStockingPointInPeriod/StaticMethod_GetByMRPCalverNo.qbl
@@ -9,9 +9,17 @@
  TextBody:
  [*
    // yypsybs Sep-12-2023 (created)
    result := selectset( parent, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip,
    result := construct( ProductInStockingPointInPeriods );
    if( mrpCalverNo <> "" ) {
      result := selectset( parent, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip,
                         pispip.ProductInStockingPoint_MP().Product_MP().ID().StartsWith( "E" )
                         and pispip.MRPCalverNo() = mrpCalverNo );
                         and pispip.MRPCalverNo() = mrpCalverNo
                           );
    } else {
      result := selectset( parent, Product_MP.ProductInStockingPoint_MP.ProductInStockingPointInPeriod, pispip,
                         true
                           );
    }
    return &result;
  *]
}
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyByHalfYear#1.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetNewSupplyByHalfYear (
  Strings productNo,
  MacroPlan macroPlan,
  Number yearNo,
  Number halfNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    fromMonth := 1 + ( halfNo - 1 ) * 6;
    toMonth := 6 + ( halfNo - 1 ) * 6;
    result := 0.0;
    for( i := fromMonth; i <= toMonth; i := i + 1 ) {
      result := result + Product_MP::GetNewSupplyByMonth( productNo, macroPlan, yearNo, i );
    }
    return result;
  *]
}
_Main/BL/Type_Product_MP/StaticMethod_GetNewSupplyBySeason.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetNewSupplyBySeason (
  Strings productNo,
  MacroPlan macroPlan,
  Number yearNo,
  Number seasonNo
) as Real
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    fromMonth := 1 + ( seasonNo - 1 ) * 3;
    toMonth := 3 + ( seasonNo - 1 ) * 3;
    result := 0.0;
    for( i := fromMonth; i <= toMonth; i := i + 1 ) {
      result := result + Product_MP::GetNewSupplyByMonth( productNo, macroPlan, yearNo, i );
    }
    return result;
  *]
}
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeChart.qbl
@@ -4,9 +4,9 @@
  MacroPlans macroPlans,
  Boolean isCapacity,
  String groupBy,
  String byBusinessTypeOrByOrgCodde,
  String businessType,
  String orgCode,
  String byBusinessTypeOrByOrgCode,
  String businessTypeChosen,
  String placeOfProductionOfArrayChosen,
  String year,
  MPSync mpSync,
  GlobalOTDTable otdTable,
@@ -17,13 +17,226 @@
  TextBody:
  [*
    // yypsybs Sep-19-2023 (created)
    // true, false
    info( isCapacity );
    // æœˆ;季度;半年;å¹´
    info( groupBy );
    // é¢æ¿åŸºåœ°;事业部
    info( byBusinessTypeOrByOrgCode );
    info( businessTypeChosen );
    info( placeOfProductionOfArrayChosen );
    info( year );
    // ====清理旧数据====
    this.CapacityAndSaleBudgeChartRow( relflush );
    this.CapacityAndSaleBudgeChartElement( relflush );
    
    info( isCapacity );
    info( groupBy );
    info( byBusinessTypeOrByOrgCodde );
    info( businessType );
    info( orgCode );
    info( year );
    // ====按面板基地和事业部对产品进行筛选分组====
    historyData := selectset( otdTable, CapacityAndSaleBudge, item, true );
    if( placeOfProductionOfArrayChosen <> "" ) {
      historyData := selectset( historyData, Elements, item, item.PlaceOfProductionOfArray() = placeOfProductionOfArrayChosen );
    }
    if( businessTypeChosen <> "" ) {
      historyData := selectset( historyData, Elements, item, item.BusinessType() = businessTypeChosen );
    }
    traverse( historyData, Elements, item ) {
      row := CapacityAndSaleBudgeChartRow::CreateIfNotExist( this, item.BusinessType(), item.PlaceOfProductionOfArray() );
      // è®°å½•每行包含哪些product
      CapacityAndSaleBudgeChartRowProduct::CreateIfNotExist( row, item.ProductCode() );
    }
    rows := selectset( this, CapacityAndSaleBudgeChartRow, item, true );
    placeOfProductionOfArrayList := selectuniquevalues( historyData, Elements, item, item.PlaceOfProductionOfArray() );
    businessTypeList := selectuniquevalues( historyData, Elements, item, item.BusinessType() );
    // ç”Ÿæˆå›¾è¡¨å…ƒç´ 
    if( byBusinessTypeOrByOrgCode = "面板基地" and groupBy = "å¹´" ) {
      // ç›®æ ‡
      traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) {
        productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray );
        this.CapacityAndSaleBudgeChartElement( relnew,
                                               TimeStringAndScenarioName := [String]year + "å¹´-目标",
                                               BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                               Quantity := ifexpr( isCapacity,
                                                                   CapacityAndSaleBudge::GetSheetByYear( productCodeList, otdTable, [Number]year ),
                                                                   MappingForecast::GetQuantityByYear( productCodeList, mappingParent, [Number]year ) )
                                               );
          // S&OP
        traverse( macroPlans, Elements, macroPlan ) {
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(),
                                                 BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                 Quantity := ifexpr( isCapacity,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ),
                                                                     0.0 )
                                                 );
        }
      }
    }
    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 + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                 BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, otdTable, [Number]year, halfNo ),
                                                                     MappingForecast::GetQuantityByHalfYear( productCodeList, mappingParent, [Number]year, halfNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ),
                                                                       0.0 )
                                                   );
          }
        }
      }
    }
    if ( byBusinessTypeOrByOrgCode = "面板基地" and groupBy = "季度" ) {
      for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) {
        traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) {
          productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray );
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                 BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetBySeason( productCodeList, otdTable, [Number]year, seasonNo ),
                                                                     MappingForecast::GetQuantityBySeason( productCodeList, mappingParent, [Number]year, seasonNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := 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 ) {
        traverse( placeOfProductionOfArrayList, Elements, placeOfProductionOfArray ) {
          productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByPlaceOfProductionOfArray( rows, placeOfProductionOfArray );
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]monthNo + "月-目标",
                                                 BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetByMonth( productCodeList, otdTable, [Number]year, monthNo ),
                                                                     MappingForecast::GetQuantityByMonth( productCodeList, mappingParent, [Number]year, monthNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]monthNo + "月-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := placeOfProductionOfArray,
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ),
                                                                       0.0 )
                                                   );
          }
        }
      }
    }
    if( byBusinessTypeOrByOrgCode = "事业部" and groupBy = "å¹´" ) {
      // ç›®æ ‡
      traverse( businessTypeList, Elements, businessType ) {
        productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType );
        this.CapacityAndSaleBudgeChartElement( relnew,
                                               TimeStringAndScenarioName := [String]year + "å¹´-目标",
                                               BusinessTypeOrOrgCode := businessType,
                                               Quantity := ifexpr( isCapacity,
                                                                   CapacityAndSaleBudge::GetSheetByYear( productCodeList, otdTable, [Number]year ),
                                                                   MappingForecast::GetQuantityByYear( productCodeList, mappingParent, [Number]year ) )
                                               );
          // S&OP
        traverse( macroPlans, Elements, macroPlan ) {
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-" + macroPlan.ScenarioName(),
                                                 BusinessTypeOrOrgCode := businessType,
                                                 Quantity := ifexpr( isCapacity,
                                                                     Product_MP::GetNewSupplyByYear( productCodeList, macroPlan, [Number]year ),
                                                                     0.0 )
                                                 );
        }
      }
    }
    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 + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-目标",
                                                 BusinessTypeOrOrgCode := businessType,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetByHalfYear( productCodeList, otdTable, [Number]year, halfNo ),
                                                                     MappingForecast::GetQuantityByHalfYear( productCodeList, mappingParent, [Number]year, halfNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-" + ifexpr( halfNo = 1, "上", "下" ) + "半年-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := businessType,
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByHalfYear( productCodeList, macroPlan, [Number]year, halfNo ),
                                                                       0.0 )
                                                   );
          }
        }
      }
    }
    if ( byBusinessTypeOrByOrgCode = "事业部" and groupBy = "季度" ) {
      for( seasonNo := 1; seasonNo <= 4; seasonNo := seasonNo + 1 ) {
        traverse( businessTypeList, Elements, businessType ) {
          productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType );
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-目标",
                                                 BusinessTypeOrOrgCode := businessType,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetBySeason( productCodeList, otdTable, [Number]year, seasonNo ),
                                                                     MappingForecast::GetQuantityBySeason( productCodeList, mappingParent, [Number]year, seasonNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]seasonNo + "季度-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := 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 ) {
        traverse( businessTypeList, Elements, businessType ) {
          productCodeList := CapacityAndSaleBudgeChartRow::GetProductCodesByBusinessType( rows, businessType );
          this.CapacityAndSaleBudgeChartElement( relnew,
                                                 TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]monthNo + "月-目标",
                                                 BusinessTypeOrOrgCode := businessType,
                                                 Quantity := ifexpr( isCapacity,
                                                                     CapacityAndSaleBudge::GetSheetByMonth( productCodeList, otdTable, [Number]year, monthNo ),
                                                                     MappingForecast::GetQuantityByMonth( productCodeList, mappingParent, [Number]year, monthNo ) )
                                                 );
            // S&OP
          traverse( macroPlans, Elements, macroPlan ) {
            this.CapacityAndSaleBudgeChartElement( relnew,
                                                   TimeStringAndScenarioName := [String]year + "å¹´-第" + [String]monthNo + "月-" + macroPlan.ScenarioName(),
                                                   BusinessTypeOrOrgCode := businessType,
                                                   Quantity := ifexpr( isCapacity,
                                                                       Product_MP::GetNewSupplyByMonth( productCodeList, macroPlan, [Number]year, monthNo ),
                                                                       0.0 )
                                                   );
          }
        }
      }
    }
  *]
}
_Main/BL/Type_ScenarioManager/Method_CapacityAndSaleBudgeCompare.qbl
@@ -72,7 +72,7 @@
      cell := columnOrgCode.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := row.OrgCode() );
      cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
    }
    // é¢æ¿åˆ†é…é‡ - å¹´åº¦é¢„ç®—
    // é¢æ¿åˆ†é…é‡ - å¹´åº¦é¢„ç®— (sheets)
    // æ ¼å¼ï¼š é¢æ¿åˆ†é…é‡ - å¹´ - æœˆï¼ˆ1-12 & total) - å¹´åº¦é¢„ç®—/scenarioName
    info( "dealing é¢æ¿åˆ†é…é‡" )
    if( CapacityAndSaleBudgeFilterItem::Contains( items, "面板分配量" ) ) {
@@ -143,14 +143,14 @@
          traverse( months, Elements, month ) {
            columnMonth := CapacityAndSaleBudgeCompareItemColumn::CreateIfNotExist( this, "对外销售额-" + [String]year.YearNo() + "å¹´-" + [String]month.MonthNo() + "月-" + macroPlan.ScenarioName() );
            traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
              cellReal := MappingForecast::GetByMonth( row.GetProductCodes(), mappingParent, year.YearNo(), month.MonthNo() );
              cellReal := MappingForecast::GetBalanceByMonth( 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() );
          traverse( this, CapacityAndSaleBudgeCompareItemRow, row ) {
            cellReal := MappingForecast::GetByYear( row.GetProductCodes(), mappingParent, year.YearNo() );
            cellReal := MappingForecast::GetBalanceByYear( row.GetProductCodes(), mappingParent, year.YearNo() );
            cell := columnYear.CapacityAndSaleBudgeCompareItemCell( relnew, CellContent := [String]cellReal );
            cell.CapacityAndSaleBudgeCompareItemRow( relset, row );
          }
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_PanelPRDataButton.def
@@ -13,7 +13,7 @@
      [
        Image: 'ARROW_RIGHT'
        Label: 'Send checked PRs'
        Taborder: 0
        Taborder: 1
      ]
    }
    Component ButtonExportPR
@@ -24,7 +24,18 @@
      [
        Image: 'EXPORT1'
        Label: '数据导出'
        Taborder: 1
        Taborder: 2
      ]
    }
    Component ButtonLoad
    {
      #keys: '[414384.0.859141085]'
      BaseType: 'WebButton'
      Properties:
      [
        Image: 'THICK_ARROW_DOWN_BLUE'
        Label: 'Clean & Load'
        Taborder: 0
      ]
    }
  ]
_Main/UI/MacroPlannerWebApp/Component_Form633/Component_listContextMenuPRData#1.def
@@ -16,6 +16,17 @@
        Title: 'Send selected PRs'
      ]
    }
    Component MenuPrintRequest
    {
      #keys: '[414384.0.859180964]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'MEDIA_PLAY_GREEN'
        Taborder: 4
        Title: 'Print request'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_ListPRData_844_MenuPrintRequest_OnClick#623.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: ListPRData_844
Response OnClick (
  PRData selection
) id:Response_ListPRData_844_MenuPrintRequest_OnClick
{
  #keys: '[414384.0.859160768]'
  CanBindMultiple: false
  DefinitionID => /ListPRData_844/Responsedef_ListPRData_844_WebMenu_OnClick
  Initiator: 'MenuPrintRequest'
  Precondition:
  [*
  *]
  QuillAction
  {
    Body:
    [*
      info( selection.PrintCall( GlobalOTDTable, ApplicationMacroPlanner.GetUserName() ) )
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_OnCreated.def
@@ -10,13 +10,13 @@
  {
    Body:
    [*
      if( not isnull( MacroPlan ) ) {
        MacroPlan.PRData( relflush );
        PRData::TestData( MacroPlan );
      }
      if( not isnull( GlobalOTDTable ) ) {
        GlobalOTDTable.PRHistoryData( relflush );
      }
      //if( not isnull( MacroPlan ) ) {
      //  MacroPlan.PRData( relflush );
      //  PRData::TestData( MacroPlan );
      //}
      //if( not isnull( GlobalOTDTable ) ) {
      //  GlobalOTDTable.PRHistoryData( relflush );
      //}
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_Form633/Response_PanelPRDataButton_ButtonLoad_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#parent: PanelPRDataButton/ButtonLoad
Response OnClick () id:Response_PanelPRDataButton_ButtonLoad_OnClick
{
  #keys: '[414384.0.859141084]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
  *]
  QuillAction
  {
    Body:
    [*
      MacroPlan.PRData( relflush );
      PRData::FromSupplyPlanning( GlobalOTDTable, MacroPlan, MacroPlan, "" );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_ButtonCapacityAndSaleBudgeChartTest_OnClick.def
@@ -17,7 +17,7 @@
                                                 DropDownTimeGroup.Text(),
                                                 DropDownByBusinessTypeOrByOrgCode.Text(),
                                                 DropDownBusinessTypes.Text(),
                                                 DropDownOrgCodes.Text(),
                                                 DropDownPlaceOfProductionOfArrays.Text(),
                                                 DropDownYears.Text(),
                                                 MPSync, 
                                                 GlobalOTDTable, 
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/Response_OnCreated.def
@@ -12,7 +12,7 @@
      CapacityAndSaleBudgeChartElement::TestData( ScenarioManager );
      
      DropDownBusinessTypes.Strings( GlobalOTDTable.CapacityAndSaleBudgeBusinessTypeString() );
      DropDownOrgCodes.Strings( GlobalOTDTable.CapacityAndSaleBudgePlaceOfProductionOfArrayString() );
      DropDownPlaceOfProductionOfArrays.Strings( GlobalOTDTable.CapacityAndSaleBudgePlaceOfProductionOfArrayString() );
      DropDownYears.Strings( GlobalOTDTable::CapacityAndSaleBudgeYearsString() );
    *]
    GroupServerCalls: false
_Main/UI/MacroPlannerWebApp/Component_FormCapacityAndSaleBudgeChart/_ROOT_Component_FormCapacityAndSaleBudgeChart.def
@@ -14,7 +14,7 @@
      BaseType: 'WebButton'
      Properties:
      [
        Label: '测试用'
        Label: '生成'
        Taborder: 6
      ]
    }
@@ -39,7 +39,7 @@
        Taborder: 3
      ]
    }
    Component DropDownOrgCodes
    Component DropDownPlaceOfProductionOfArrays
    {
      #keys: '[414384.0.857770736]'
      BaseType: 'WebDropDownStringList'
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Component_listContextMenuPRHistoryData#1.def
@@ -16,6 +16,17 @@
        Title: 'Call'
      ]
    }
    Component MenuPrintRequest
    {
      #keys: '[414384.0.860210718]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'MEDIA_PLAY_GREEN'
        Taborder: 4
        Title: 'Print request'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormPRHistoryData/Response_ListPRHistoryData_844_MenuPrintRequest_OnClick#338.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
Quintiq file version 2.0
#parent: ListPRHistoryData_844
Response OnClick (
  PRHistoryData selection
) id:Response_ListPRHistoryData_844_MenuPrintRequest_OnClick
{
  #keys: '[414384.0.860210608]'
  CanBindMultiple: false
  DefinitionID => /ListPRHistoryData_844/Responsedef_ListPRHistoryData_844_WebMenu_OnClick
  Initiator: 'MenuPrintRequest'
  QuillAction
  {
    Body:
    [*
      info( selection.PrintCall( ApplicationMacroPlanner.GetUserName() ) )
    *]
    GroupServerCalls: false
  }
}