yanyuan
2023-10-08 292bfebf66d2872fc898458d7b53fc8a50d6d037
接口优化
已修改4个文件
已添加7个文件
700 ■■■■ 文件已修改
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetCurrency_MP.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetProduct_MP.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetSalesSegment_MP.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetStockingPoing_MP.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetUnitOfMeasure_MP.qbl 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_SynchronizeMacroPlanData.qbl 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_ListInterfaceTest_MenuCreateShowData_OnClick.def 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Test.vw 521 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl
@@ -2,7 +2,9 @@
#parent: #root
Method SynchronizeDataToMacroPlan (
  MacroPlan macroPlan,
  Boolean isUnitOfMeasure_MP
  String executionUser,
  Boolean isUnitOfMeasure_MP,
  Boolean isCustomOrder
)
{
  TextBody:
@@ -10,5 +12,9 @@
    if ( isUnitOfMeasure_MP ) {
      Global_MappingUnitOfMeasure_MP::SynchronizeMacroPlanData( this, macroPlan );
    }
    if ( isCustomOrder ) {
      Global_MappingCustomOrder::SynchronizeMacroPlanData( this, macroPlan, executionUser );
    }
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_CreateCustomOrder.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
Quintiq file version 2.0
#parent: #root
StaticMethod CreateCustomOrder (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    traverse ( globalOTDTable, Global_MappingCustomOrder, gmco ) {
      targetProduct_MP := Global_MappingCustomOrder::GetProduct_MP( macroPlan, gmco );
      targetStockingPoint_MP := Global_MappingCustomOrder::GetStockingPoing_MP( macroPlan, gmco );
      Global_MappingCustomOrder::GetSalesSegment_MP( macroPlan, gmco );
      Global_MappingCustomOrder::GetCurrency_MP( macroPlan, gmco );
      Global_MappingCustomOrder::GetUnitOfMeasure_MP( macroPlan, gmco );
      targetCustomerOrder := CustomerOrder::Create( targetProduct_MP,
                                                    targetStockingPoint_MP,
                                                    gmco.ID(),
                                                    gmco.OrderDate(),
                                                    gmco.Quantity(),
                                                    gmco.Price(),
                                                    "Normal",
                                                    gmco.SalesSegmentName(),
                                                    gmco.CurrencyID(),
                                                    gmco.UnitOfMeasureName(),
                                                    false,
                                                    gmco.Customer(),
                                                    gmco.CustomerID(),
                                                    gmco.OrderID(),
                                                    gmco.OrderLineID(),
                                                    true,
                                                    true,
                                                    false
                                                   );
      targetCustomerOrder.BusinessType( gmco.BusinessType() );
      targetCustomerOrder.OrderType( gmco.OrderType() );
      targetCustomerOrder.IsAvailable( gmco.IsAvailable() );
      targetCustomerOrder.ProductGrade( gmco.ProductGrade() );
      targetCustomerOrder.SegmentPriority( gmco.SegmentPriority() );
      targetCustomerOrder.SheetProfitability( gmco.SheetProfitability() );
      targetCustomerOrder.OrderTime( gmco.OrderTime() );
    }
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetCurrency_MP.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetCurrency_MP (
  MacroPlan macroPlan,
  Global_MappingCustomOrder gmco
)
{
  TextBody:
  [*
    isExists := exists( macroPlan, Currency_MP, tempCMP, tempCMP.ID() = gmco.CurrencyID() );
    if ( not isExists ) {
      Currency_MP::Create( gmco.CurrencyID(), macroPlan, gmco.CurrencyID(), "", false, false );
    }
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetProduct_MP.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetProduct_MP (
  MacroPlan macroPlan,
  Global_MappingCustomOrder gmco
) as Product_MP
{
  TextBody:
  [*
    targetProduct_MP := select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = gmco.ProductID() );
    if ( isnull( targetProduct_MP ) ) {
      targetProduct_MP := Product_MP::Create( gmco.ProductID(), macroPlan, null( Product_MP ), gmco.ProductID(), null( SupplyChainView ), 0, 0, false );
    }
    return targetProduct_MP;
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetSalesSegment_MP.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetSalesSegment_MP (
  MacroPlan macroPlan,
  Global_MappingCustomOrder gmco
)
{
  TextBody:
  [*
    isExists := exists( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = gmco.SalesSegmentName() );
    if ( not isExists ) {
      SalesSegment_MP::Create( macroPlan, "", gmco.SalesSegmentName(), 0, false );
    }
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetStockingPoing_MP.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetStockingPoing_MP (
  MacroPlan macroPlan,
  Global_MappingCustomOrder gmco
) as StockingPoint_MP
{
  TextBody:
  [*
    targetStockingPoint_MP := select( macroPlan, StockingPoint_MP, tempSPMP, tempSPMP.ID() = gmco.StockingPointID() );
    if ( isnull( targetStockingPoint_MP ) ) {
      targetStockingPoint_MP := StockingPoint_MP::Create( gmco.StockingPointID(), macroPlan, null( Unit ), gmco.StockingPointID(), null( SupplyChainView ), 0, 0, false );
    }
    return targetStockingPoint_MP;
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_GetUnitOfMeasure_MP.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GetUnitOfMeasure_MP (
  MacroPlan macroPlan,
  Global_MappingCustomOrder gmco
)
{
  TextBody:
  [*
    isExists := exists( macroPlan, UnitOfMeasure_MP, tempUOMMP, tempUOMMP.Name() = gmco.UnitOfMeasureName() );
    if ( not isExists ) {
      UnitOfMeasure_MP::Create( macroPlan, gmco.UnitOfMeasureName(), false, false );
    }
  *]
}
_Main/BL/Type_Global_MappingCustomOrder/StaticMethod_SynchronizeMacroPlanData.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeMacroPlanData (
  GlobalOTDTable globalOTDTable,
  MacroPlan macroPlan,
  String executionUser
)
{
  TextBody:
  [*
    global_BrokerExecuteLog := globalOTDTable.Global_BrokerExecuteLog( relnew,
                                                                       Name        := "同步订单数据",
                                                                       IsSuccess   := true,
                                                                       ExecuteUser := executionUser
                                                                      );
      Global_MappingCustomOrder::CreateCustomOrder( globalOTDTable, macroPlan );
    try {
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
      global_BrokerExecuteLog.SuccessDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
    } onerror {
      global_BrokerExecuteLog.IsSuccess( false );
      global_BrokerExecuteLog.ErrorNo( e.ErrorNr() );
      global_BrokerExecuteLog.ErrorMessage( e.GeneralInformation() );
      global_BrokerExecuteLog.ErrorDateTime( DateTime::ActualTime().Format( "Y-M-D H2:m:s" ) );
      global_BrokerExecuteLog.ExecutionStatus( "Complete" );
    }
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_ListInterfaceTest_MenuCreateShowData_OnClick.def
@@ -8,6 +8,16 @@
  CanBindMultiple: false
  DefinitionID => /ListInterfaceTest/Responsedef_ListInterfaceTest_WebMenu_OnClick
  Initiator: 'MenuCreateShowData'
  Precondition:
  [*
    flag := selection.BrokerName() = "GlobalOTDTable_CustomOrder"
    if ( not flag ) {
      feedback := "暂不支持!!!";
    }
    return flag;
  *]
  QuillAction
  {
    Body:
_Main/UI/MacroPlannerWebApp/Component_FormInterfaceTest/Response_PanelInterfaceTest_ButtonSynchronizeDataToMacroPlan_OnClick.def
@@ -14,7 +14,9 @@
    Body:
    [*
      GlobalOTDTable.SynchronizeDataToMacroPlan( MacroPlan, 
                                                 CheckboxUnitOfMeasure_MP.Checked()
                                                 ApplicationMacroPlanner.GetUserName(),
                                                 CheckboxUnitOfMeasure_MP.Checked(),
                                                 CheckboxCustomOrder.Checked()
                                                );
      
      WebMessageBox::Success( "同步成功!", true );
_Main/UI/MacroPlannerWebApp/Views/Test.vw
@@ -310,6 +310,10 @@
        }
        components
        {
          FormFillingCapacityOrder_PanelFillingCapacityOrder
          {
            sizeRatio: 1
          }
          FormFillingCapacityOrder_ListFillingCapacityOrder
          {
          }
@@ -430,523 +434,6 @@
              dataPath: 'OrderType'
              dataType: 'string'
              index: 12
              subtotals: ''
              width: 150
            }
          }
        }
      }
      form_FormPriorityPolicy
      {
        title: 'QTIANMA_JITUAN::FormPriorityPolicy'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormPriorityPolicy'
        layout
        {
          mode: 'open'
          rowPosition: 32
          rowSpan: 13
          columnPosition: 5
          columnSpan: 8
        }
        components
        {
          FormPriorityPolicy_ListPriorityPolicy
          {
          }
          FormPriorityPolicy_DataSetLevelPriorityPolicy
          {
            groupDepth: -1
            column_Name
            {
              columnId: 'Name'
              dataPath: 'Name'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_Formula
            {
              columnId: 'Formula'
              dataPath: 'Formula'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_CalculateValue
            {
              columnId: 'CalculateValue'
              dataPath: 'CalculateValue'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_Desc
            {
              columnId: 'Desc'
              dataPath: 'Desc'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
          }
          FormPriorityPolicy_PanelPriorityPolicyOperation
          {
            sizeRatio: 1
          }
          FormPriorityPolicy_PanelPriorityPolicyOperationButton
          {
            sizeRatio: 1
          }
          FormPriorityPolicy_PanelPriorityPolicyCoefficient
          {
            sizeRatio: 1
          }
        }
      }
      form_FormPriorityResult
      {
        title: 'QTIANMA_JITUAN::FormPriorityResult'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormPriorityResult'
        layout
        {
          mode: 'open'
          rowPosition: 45
          rowSpan: 17
          columnPosition: 1
          columnSpan: 12
        }
        components
        {
          FormPriorityResult_PanelPriorityResult
          {
            sizeRatio: 1
          }
          FormPriorityResult_ListPriorityResult
          {
          }
          FormPriorityResult_DataSetLevelPriorityResult
          {
            groupDepth: -1
            column_SalesSegmentName
            {
              columnId: 'SalesSegmentName'
              dataPath: 'SalesSegmentName'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_ProductID
            {
              columnId: 'ProductID'
              dataPath: 'ProductID'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_StockingPointID
            {
              columnId: 'StockingPointID'
              dataPath: 'StockingPointID'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_Customer
            {
              columnId: 'Customer'
              dataPath: 'Customer'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
            column_BusinessType
            {
              columnId: 'BusinessType'
              dataPath: 'BusinessType'
              dataType: 'string'
              index: 4
              subtotals: ''
              width: 150
            }
            column_Quantity
            {
              columnId: 'Quantity'
              dataPath: 'Quantity'
              dataType: 'real'
              index: 5
              subtotals: ''
              width: 150
            }
            column_UnitOfMeasureName
            {
              columnId: 'UnitOfMeasureName'
              dataPath: 'UnitOfMeasureName'
              dataType: 'string'
              index: 6
              subtotals: ''
              width: 150
            }
            column_DemandDate
            {
              columnId: 'DemandDate'
              dataPath: 'DemandDate'
              dataType: 'date'
              index: 7
              subtotals: ''
              width: 150
            }
            column_PriorityResultScore
            {
              columnId: 'PriorityResultScore'
              dataPath: 'PriorityResultScore'
              dataType: 'real'
              index: 8
              subtotals: ''
              width: 150
            }
          }
          FormPriorityResult_PanelPriorityResultDetails
          {
            sizeRatio: 1
          }
          FormPriorityResult_ListPriorityResultBusinessTypeDetails
          {
          }
          FormPriorityResult_DataSetLevelPriorityResultDetails
          {
            groupDepth: -1
            column_SalesSegmentName
            {
              columnId: 'SalesSegmentName'
              dataPath: 'SalesSegmentName'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_StockingPointID
            {
              columnId: 'StockingPointID'
              dataPath: 'StockingPointID'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_Customer
            {
              columnId: 'Customer'
              dataPath: 'Customer'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_BusinessType
            {
              columnId: 'BusinessType'
              dataPath: 'BusinessType'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
            column_Quantity
            {
              columnId: 'Quantity'
              dataPath: 'Quantity'
              dataType: 'real'
              index: 4
              subtotals: ''
              width: 150
            }
            column_UnitOfMeasureName
            {
              columnId: 'UnitOfMeasureName'
              dataPath: 'UnitOfMeasureName'
              dataType: 'string'
              index: 5
              subtotals: ''
              width: 150
            }
            column_DemandDate
            {
              columnId: 'DemandDate'
              dataPath: 'DemandDate'
              dataType: 'date'
              index: 6
              subtotals: ''
              width: 150
            }
            column_PriorityResultScore
            {
              columnId: 'PriorityResultScore'
              dataPath: 'PriorityResultScore'
              dataType: 'real'
              index: 7
              subtotals: ''
              width: 150
            }
            column_PriorityPolicyName
            {
              columnId: 'PriorityPolicyName'
              dataPath: 'PriorityPolicyName'
              dataType: 'string'
              index: 8
              subtotals: ''
              width: 150
            }
            column_PriorityFactorName
            {
              columnId: 'PriorityFactorName'
              dataPath: 'PriorityFactorName'
              dataType: 'string'
              index: 9
              subtotals: ''
              width: 150
            }
            column_PriorityFactorGradingName
            {
              columnId: 'PriorityFactorGradingName'
              dataPath: 'PriorityFactorGradingName'
              dataType: 'string'
              index: 10
              subtotals: ''
              width: 150
            }
            column_PriorityTotalScore
            {
              columnId: 'PriorityTotalScore'
              dataPath: 'PriorityTotalScore'
              dataType: 'real'
              index: 11
              subtotals: ''
              width: 150
            }
          }
          FormPriorityResult_ListPriorityResultGroupDetails
          {
          }
          FormPriorityResult_DataSetLevelPriorityResultDetails872
          {
            groupDepth: -1
            column_SalesSegmentName
            {
              columnId: 'SalesSegmentName'
              dataPath: 'SalesSegmentName'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_StockingPointID
            {
              columnId: 'StockingPointID'
              dataPath: 'StockingPointID'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_Customer
            {
              columnId: 'Customer'
              dataPath: 'Customer'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
            column_BusinessType
            {
              columnId: 'BusinessType'
              dataPath: 'BusinessType'
              dataType: 'string'
              index: 3
              subtotals: ''
              width: 150
            }
            column_Quantity
            {
              columnId: 'Quantity'
              dataPath: 'Quantity'
              dataType: 'real'
              index: 4
              subtotals: ''
              width: 150
            }
            column_UnitOfMeasureName
            {
              columnId: 'UnitOfMeasureName'
              dataPath: 'UnitOfMeasureName'
              dataType: 'string'
              index: 5
              subtotals: ''
              width: 150
            }
            column_DemandDate
            {
              columnId: 'DemandDate'
              dataPath: 'DemandDate'
              dataType: 'date'
              index: 6
              subtotals: ''
              width: 150
            }
            column_PriorityResultScore
            {
              columnId: 'PriorityResultScore'
              dataPath: 'PriorityResultScore'
              dataType: 'real'
              index: 7
              subtotals: ''
              width: 150
            }
            column_PriorityPolicyName
            {
              columnId: 'PriorityPolicyName'
              dataPath: 'PriorityPolicyName'
              dataType: 'string'
              index: 8
              subtotals: ''
              width: 150
            }
            column_PriorityFactorName
            {
              columnId: 'PriorityFactorName'
              dataPath: 'PriorityFactorName'
              dataType: 'string'
              index: 9
              subtotals: ''
              width: 150
            }
            column_PriorityFactorGradingName
            {
              columnId: 'PriorityFactorGradingName'
              dataPath: 'PriorityFactorGradingName'
              dataType: 'string'
              index: 10
              subtotals: ''
              width: 150
            }
            column_PriorityTotalScore
            {
              columnId: 'PriorityTotalScore'
              dataPath: 'PriorityTotalScore'
              dataType: 'real'
              index: 11
              subtotals: ''
              width: 150
            }
          }
        }
      }
      form_FormPriorityFactor
      {
        title: 'QTIANMA_JITUAN::FormPriorityFactor'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormPriorityFactor'
        layout
        {
          mode: 'open'
          rowPosition: 37
          rowSpan: 8
          columnPosition: 1
          columnSpan: 4
        }
        components
        {
          FormPriorityFactor_ListPriorityFactor
          {
          }
          FormPriorityFactor_DataSetLevelPriorityFactor
          {
            groupDepth: -1
            column_Name
            {
              columnId: 'Name'
              dataPath: 'Name'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_Coefficient
            {
              columnId: 'Coefficient'
              dataPath: 'Coefficient'
              dataType: 'real'
              index: 1
              subtotals: ''
              width: 150
            }
            column_Desc
            {
              columnId: 'Desc'
              dataPath: 'Desc'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }
          }
        }
      }
      form_FormPriorityFactorGrading
      {
        title: 'QTIANMA_JITUAN::FormPriorityFactorGrading'
        shown: true
        componentID: 'QTIANMA_JITUAN::FormPriorityFactorGrading'
        layout
        {
          mode: 'open'
          rowPosition: 32
          rowSpan: 5
          columnPosition: 1
          columnSpan: 4
        }
        components
        {
          FormPriorityFactorGrading_ListPriorityFactorGrading
          {
          }
          FormPriorityFactorGrading_DataSetLevelPriorityFactorGrading
          {
            groupDepth: -1
            column_GradingName
            {
              columnId: 'GradingName'
              dataPath: 'GradingName'
              dataType: 'string'
              index: 0
              subtotals: ''
              width: 150
            }
            column_GradeValueStr
            {
              columnId: 'GradeValueStr'
              dataPath: 'GradeValueStr'
              dataType: 'string'
              index: 1
              subtotals: ''
              width: 150
            }
            column_GradeDesc
            {
              columnId: 'GradeDesc'
              dataPath: 'GradeDesc'
              dataType: 'string'
              index: 2
              subtotals: ''
              width: 150
            }