xiaoding721
2024-08-26 5773247d347db0d22b867c80c857022f8d67a823
修复一些bug‘

1.产品爬坡百分比在0-100之间
2.设置产品爬坡要有一个对话框确认
已添加11个文件
已修改8个文件
已删除1个文件
222 ■■■■ 文件已修改
_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/Attribute_Type.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/Method_Use.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/StaticMethod_Create#90.qbl 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting#943.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions#646.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_UphillRouting/Attribute_Suffix.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Suffix
{
  #keys: '3[414996.1.26354666][414996.1.26354665][414996.1.26354667]'
  ValueType: String
}
_Main/BL/Type_UphillRouting/Attribute_Type.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_UphillRouting/Attribute_isUsed.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute isUsed
{
  #keys: '3[414996.1.27011002][414996.1.27011001][414996.1.27011003]'
  ValueType: Boolean
}
_Main/BL/Type_UphillRouting/DefaultValue_isUsed.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
DefaultValue
{
  ISOValue: 'false'
  TargetAttribute: isUsed
}
_Main/BL/Type_UphillRouting/Method_Use.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
Method Use
{
  TextBody:
  [*
    // Akari Aug-26-2024 (created)
    this.isUsed( true );
    copy_routing := this.Routing().Copy( this.Suffix() + this.StartDate().Format( "Y-M2-D2") );
    copy_routing.Start( this.StartDate() );
    copy_routing.End( this.EndDate() );
    traverse( copy_routing,OperationForPlanningMatrix,op){
      op.Throughput( op.Throughput() * ( this.Percentage() / 100) );
    }
    copy_routing.CopyUphillRouting( relset, this );
  *]
}
_Main/BL/Type_UphillRouting/StaticMethod_Create#90.qbl
@@ -6,29 +6,19 @@
  Date endDate,
  Real percentage,
  String suffix
)
) as UphillRouting
{
  TextBody:
  [*
    // rislai Jun-14-2024 (created)
    
    verifyData := select( owner,UphillRouting,ur,ur.Type() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate ));
    verifyData := select( owner,UphillRouting,ur,ur.Suffix() = suffix and LocalTool::IsOverlap( ur.StartDate(),ur.EndDate(),startDate,endDate ));
    if( not isnull( verifyData )){
      error( "设置的Start和End不可与已有数据的时间区间重叠。" ); 
    }
    
    data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Type := suffix );
    data := owner.UphillRouting( relnew,StartDate := startDate, EndDate := endDate,Percentage := percentage,Suffix := suffix );
    
    copy_routing := owner.Copy( suffix + startDate.Format( "Y-M2-D2") );
    copy_routing.Start( startDate );
    copy_routing.End( endDate );
    traverse( copy_routing,OperationForPlanningMatrix,op){
      op.Throughput( op.Throughput() * ( percentage / 100) );
    }
    copy_routing.CopyUphillRouting( relset, data );
    return data;
  *]
}
_Main/BL/Type_UphillRouting/StaticMethod_Create.qbl
@@ -11,7 +11,12 @@
  [*
    // rislai Jun-14-2024 (created)
    traverse( unit,Operation.RoutingForPlanningMatrix,routing , routing.IsEnabled() and LocalTool::IsOverlap( startDate,endDate,routing.Start(),routing.End())){
      UphillRouting::Create( routing,startDate,endDate,percentage,"_产线爬坡_" );
      suffix := "_产线爬坡_";
      data := UphillRouting::Create( routing,startDate,endDate,percentage,suffix );
      data.Use();
    }
  *]
}
_Main/Sys/Definitions/Sales demo/CarCo/1.0 Base/MP_ChangeoverLossSetting.xlsx
Binary files differ
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Component_pnlContent.def
@@ -61,12 +61,26 @@
      Properties:
      [
        DataBinding: 'dhDialogData.Data.Percentage'
        Label: 'Percentage'
        Label: 'Percentage*'
        Max: '99'
        Min: '1'
        PlaceHolder: 'Percentage ä¸ºå¿…填项'
        Taborder: 3
      ]
    }
    Component efPercentage
    {
      #keys: '[414996.1.29740363]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'dhDialogData.Data.Percentage'
        Enabled: false
        Label: 'Final Percentage'
        Taborder: 4
        Tooltip: '最终输入的Percentage会在这里展示'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Method_OnOK.def
@@ -14,5 +14,6 @@
    }else{
      
    }
    info( npPercentage.Number() );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlActions_btnOk_OnClick.def
@@ -13,12 +13,8 @@
  {
    Body:
    [*
      if( WebMessageBox::Warning( Form, "是否确认生成工艺路线?",Translations::MessageBox_OKCancel() ,true ) = 0 ){
        Form.OnOK();
        Form.Close(); 
      }else{
        Form.Close();
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_efPercentage_OnCreated.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: pnlContent/efPercentage
Response OnCreated () id:Response_pnlContent_efPercentage_OnCreated
{
  #keys: '[414996.1.29740670]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebComponent_OnCreated'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      if( isnull( dhDialogData.Data() )){
        this.Text( [String]90 );
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRouting/Response_pnlContent_npPercentage_OnUserChanged.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: pnlContent/npPercentage
Response OnUserChanged () id:Response_pnlContent_npPercentage_OnUserChanged
{
  #keys: '[414996.1.28611725]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebNumberPicker_OnUserChanged'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      efPercentage.Text( [String]this.Number() );
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_ListUphillRouting#943.def
@@ -12,7 +12,7 @@
      Properties:
      [
        DataType: 'Routing'
        FixedFilter: 'object.Type() = "_产品爬坡_"'
        FixedFilter: 'object.Suffix() = "_产品爬坡_"'
        Source: 'dhRouting'
        Taborder: 0
        Transformation: 'UphillRouting'
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Component_pnlActions#646.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions id:pnlActions_646
{
  #keys: '[414996.1.26570436]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[414996.1.26570437]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[414996.1.26570438]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
    Orientation: 'horizontal'
    Padding: 'true'
    Style: 'footer'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Method_UseUphillRoutings.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
Quintiq file version 2.0
#parent: #root
Method UseUphillRoutings () id:Method_DialogCreateEditUphillRoutings_UseUphillRoutings
{
  #keys: '[414996.1.26570568]'
  Body:
  [*
    traverse( dhRouting.Data(),UphillRouting,uphillRouting,not uphillRouting.isUsed() ){
      uphillRouting.Use();
    }
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnCancel_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActions_646/btnCancel
Response OnClick () id:Response_pnlActions_646_btnCancel_OnClick
{
  #keys: '[414996.1.26570434]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/Response_pnlActions_646_btnOk_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
Quintiq file version 2.0
#parent: pnlActions_646/btnOk
Response OnClick () id:Response_pnlActions_646_btnOk_OnClick
{
  #keys: '[414996.1.26570435]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      if( WebMessageBox::Warning( Form, "是否确认生成工艺路线?",Translations::MessageBox_OKCancel() ,true ) = 0 ){
        Form.UseUphillRoutings();
        Form.Close();
      }else{
        // Form.Close();
      }
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditUphillRoutings/_ROOT_Component_DialogCreateEditUphillRoutings.def
@@ -8,6 +8,7 @@
  Children:
  [
    #child: pnlContent
    #child: pnlActions_646
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormRoutings/Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick.def
@@ -2,7 +2,7 @@
#parent: ListRoutings
Response OnClick (
  Routing selection
) id:Response_MacroPlanner_ListRoutings_MenuHotTestRatio_OnClick
) id:Response_ListRoutings_MenuHotTestRatio_OnClick
{
  #keys: '[415136.0.761890849]'
  CanBindMultiple: false