admin
2024-10-08 5734a79352c273282e48cbc9db5c0ed7cdfc8c9c
上线计划优化
已重命名2个文件
已修改6个文件
已添加1个文件
78 ■■■■ 文件已修改
_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AssemblyOnlinePlanRow/Method_Filter.qbl 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Component_MatrixEditor951#480.def 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Component_pHeader.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Response_pHeader_bGenerateReport_OnClick#774.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/_ROOT_Component_FormAssemblyOnlinePlan.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Component_pHeader1#799.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Response_pHeader1_799_bRefresh_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/_ROOT_Component_FormOfflinePlan.def 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_AssemblyOnlinePlanCell/StaticMethod_RefreshData.qbl
@@ -12,7 +12,9 @@
    
    // æ‰¾è£…配线行
    oprs := selectsortedset( opt, OfflinePlanRow, tempOPR, 
                             tempOPR.ProductionLine() = "DL MoMo" or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM",
                             tempOPR.ProductionLine() = "DL MoMo"
    //                         or tempOPR.ProductionLine() = "CC MoMo" or tempOPR.ProductionLine() = "DL ZKM"
                             ,
                             tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() );
    opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() );
    
@@ -34,5 +36,42 @@
    }
    
    // å¤„理日历事件
    pls := selectuniquevalues( macroPlan, AssemblyOnlinePlanRow, tempAOPR, true, tempAOPR.ProductionLine() );
    traverse ( pls, Elements, pl ) {
      targetQuantity := ifexpr( pl = "CC MoMo", guard( macroPlan.AssemblyOnlineQuantity().CCMoMo(), 0 ),
                                ifexpr( pl = "DL MoMo", guard( macroPlan.AssemblyOnlineQuantity().DLMoMo(), 0 ), guard( macroPlan.AssemblyOnlineQuantity().DLZKM(), 0 ) )
                               );
      u           := select( macroPlan, Unit, tempU, tempU.ID() = pl );
      drainPs     := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "排空", false ) );
      lineLyingPs := selectset( u, UnitCalendar.Participation, tempP, guard( tempP.Event().Subject() = "铺线", false ) );
      // å¤„理排空
      info( "当前产线:", pl, "    å¤„理排空--------------------------" );
      traverse ( drainPs, Elements, p ) {
        traverse ( p, ExplicitTimeInterval, eti ) {
          info( "开始时间:", eti.Start().Format( "Y-M2-D2" ), "    ç»“束时间:", eti.End().Format( "Y-M2-D2" ) );
          // å‰ä¸€å¤©æ—¥åކ
          aopc := select( macroPlan, AssemblyOnlinePlanColumn, tempAOPC, tempAOPC.ColumnDate() = ( eti.Start().Date() - 1 ) );
          info( "需要排空的上线计划时间:", aopc.ColumnDate().Format( "Y-M2-D2" ) );
          aoprs := selectset( macroPlan, AssemblyOnlinePlanRow, tempAOPR, tempAOPR.ProductionLine() = pl and tempAOPR.Type() = "2" and
                              exists( tempAOPR, AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc and tempAOPC.Value() <> "" ) );
          aopr  := maxselect( aoprs, Elements.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanColumn() = aopc,
                              [Number]tempAOPC.Value().ReplaceAll( "#0", "" ) );
          cell  := select( macroPlan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, tempAOPC, tempAOPC.AssemblyOnlinePlanRow().ProductionLine() = pl and tempAOPC.AssemblyOnlinePlanColumn() = aopc and
                           tempAOPC.AssemblyOnlinePlanRow().Type() = "1" and tempAOPC.AssemblyOnlinePlanRow().ProductID() = aopr.AssemblyOnlinePlanRow().ProductID() );
          cell.Value( [String] ( [Number]cell.Value() - targetQuantity ) );
        }
      }
      info( "当前产线:", pl, "    å¤„理铺线--------------------------" );
      // å¤„理铺线
      traverse ( lineLyingPs, Elements, p ) {
        traverse ( p, ExplicitTimeInterval, eti ) {
          info( "开始时间:", eti.Start().Format( "Y-M2-D2" ), "    ç»“束时间:", eti.End().Format( "Y-M2-D2" ) );
        }
      }
    }
  *]
}
_Main/BL/Type_AssemblyOnlinePlanRow/Method_Filter.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
Quintiq file version 2.0
#parent: #root
Method Filter (
  Entitys entitys
) declarative remote as Boolean
{
  TextBody:
  [*
    flag := false;
    traverse ( entitys, Elements.astype( Unit ), u, not flag ) {
      flag := u.Name() = this.ProductionLine();
    }
    return flag;
  *]
}
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Component_MatrixEditor951#480.def
@@ -45,6 +45,8 @@
          Properties:
          [
            DataType: 'MacroPlan'
            FilterArguments: 'entities:QLibMacroPlannerWebUI::ApplicationMacroPlanner.DataHolderCheckedEntities'
            FixedFilter: 'object.Filter( entities )'
            Source: 'MacroPlan'
            Taborder: 0
            Transformation: 'AssemblyOnlinePlanRow'
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Component_pHeader.def
@@ -25,13 +25,13 @@
        Taborder: 2
      ]
    }
    Component bRefresh id:bRefresh_187
    Component bGenerateReport
    {
      #keys: '[413988.0.1351403370]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Refresh'
        Label: 'Generate'
        Taborder: 0
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Response_pHeader_bGenerateReport_OnClick#774.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/Response_pHeader_bRefresh_OnClick#774.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: pHeader/bRefresh_187
Response OnClick () id:Response_pHeader_bRefresh_OnClick_774
#parent: pHeader/bGenerateReport
Response OnClick () id:Response_pHeader_bGenerateReport_OnClick_774
{
  #keys: '[413988.0.1351403369]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_FormAssemblyOnlinePlan/_ROOT_Component_FormAssemblyOnlinePlan.def
@@ -12,6 +12,7 @@
  ]
  Properties:
  [
    Description: '装配上线计划'
    Title: 'Assembly online plan'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Component_pHeader1#799.def
@@ -5,13 +5,13 @@
  BaseType: 'WebPanel'
  Children:
  [
    Component bGenerateReport
    Component bRefresh
    {
      #keys: '[413988.0.1568330589]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Generate report'
        Label: 'Refresh'
        Taborder: 0
      ]
    }
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Response_pHeader1_799_bRefresh_OnClick.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/Response_pHeader1_799_bGenerateReport_OnClick.def ÐÞ¸Ä
@@ -1,6 +1,6 @@
Quintiq file version 2.0
#parent: pHeader1_799/bGenerateReport
Response OnClick () id:Response_pHeader1_799_bGenerateReport_OnClick
#parent: pHeader1_799/bRefresh
Response OnClick () id:Response_pHeader1_799_bRefresh_OnClick
{
  #keys: '[413988.0.1568330587]'
  CanBindMultiple: false
_Main/UI/MacroPlannerWebApp/Component_FormOfflinePlan/_ROOT_Component_FormOfflinePlan.def
@@ -12,6 +12,7 @@
  ]
  Properties:
  [
    Description: '装配下线计划'
    Image: 'WIND_ENGINE_OFFSHORE'
    Title: 'OfflinePlan'
  ]