lazhen
2024-06-19 22ce1cb2ac0fbaaaebb741c4f5390166531e8017
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已重命名2个文件
已添加37个文件
已修改7个文件
1136 ■■■■■ 文件已修改
_Main/BL/Dataset_WholeShift/_ROOT_Dataset_WholeShift.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Relations/Relation_TempDependentDemandInputGroup_MacroPlan_MacroPlan_TempDependentDema.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_DMF_CustomLogic/Method_OnFinished.qbl 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_BalanceAxis.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_ConnectingRod.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_Crankshaft.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_CylinderBlock.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/Attribute_CylinderHead.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_Divisor.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_PeriodTask.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_ProductInStockingName.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_UnitID.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_id.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_TempDependentDemandInputGroup/_ROOT_Type_TempDependentDemandInputGroup.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_CapacityRounding.qbl 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling3.qbl 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsEqualToOneDay.qbl 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsGreaterThanOneDay.qbl 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_UnifiedProcessingOfComplementZeroLogic.qbl 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_UnifiedProcessingOfRoundingLogic.qbl 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_ZeroCapacityReplenishment.qbl 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/StaticMethod_GenerateDailyCapacity.qbl 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/StaticMethod_OnServerStartup.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/_ROOT_Type_WholeShift.qbl 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/Sys/ImgAttr/Entity.dme 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_MacroPlanner_mbMainMenu_MenuWholeShift_OnClick.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_abgWholeShiftSystem_bWholeShiftSystem_OnClick.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Component_pnlActions.def 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Component_pnlContent.def 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Response_pnlActions_btnCancel_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/_ROOT_Component_DialogTransferMinimumQuantity.def 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_ListEntity.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_listContextMenu902#1.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActions.def 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActionsLeft#522.def 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActionsRight#106.def 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Method_OnOK.def 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_ListEntity_mDisable_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_ListEntity_mEnable_OnClick.def 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsLeft_522_bTransferMinimumQuantity_OnClick.def 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsRight_106_btnCancel_OnClick#836.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsRight_106_btnOk_OnClick#393.def 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/_ROOT_Component_DialogWholeShiftSystem.def 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Dataset_WholeShift/_ROOT_Dataset_WholeShift.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Dataset WholeShift
{
  #keys: '2[413988.0.1256611421][413988.0.1256611420]'
  DefaultMDSName: 'WholeShift'
  InstanceType: WholeShift
}
_Main/BL/Relations/Relation_TempDependentDemandInputGroup_MacroPlan_MacroPlan_TempDependentDema.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
Relation TempDependentDemandInputGroup_MacroPlan_MacroPlan_TempDependentDemandInputGroup
{
  #keys: '1[413988.0.1270630140]'
  DefaultRelationStrategy
  {
  }
  RelationSide.LeftSide MacroPlan
  {
    #keys: '3[413988.0.1270630142][413988.0.1270630141][413988.0.1270630143]'
    Cardinality: '0to1'
    ObjectDefinition: TempDependentDemandInputGroup
    OwningSide: 'Reference'
  }
  RelationSide.RightSide TempDependentDemandInputGroup
  {
    #keys: '3[413988.0.1270630145][413988.0.1270630144][413988.0.1270630146]'
    Cardinality: '1toN'
    ObjectDefinition: MacroPlan
    OwningSide: 'Owned'
  }
}
_Main/BL/Type_DMF_CustomLogic/Method_OnFinished.qbl
@@ -21,6 +21,9 @@
    // åˆ›å»ºæŽ¥å£æ•°æ®é›†
    InterfaceDataset::OnServerStartup();
    
    // æ•´ç­æ•°æ®é›†
    WholeShift::OnServerStartup();
    // Create MPDomainHandler
    MPDomainHandler::OnServerStartup();
    
_Main/BL/Type_MacroPlan/Attribute_BalanceAxis.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute BalanceAxis
{
  #keys: '3[413988.0.1273364842][413988.0.1273364841][413988.0.1273364843]'
  Description: '平衡轴'
  ValueType: Number
}
_Main/BL/Type_MacroPlan/Attribute_ConnectingRod.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute ConnectingRod
{
  #keys: '3[413988.0.1273364822][413988.0.1273364821][413988.0.1273364823]'
  Description: '连杆'
  ValueType: Number
}
_Main/BL/Type_MacroPlan/Attribute_Crankshaft.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute Crankshaft
{
  #keys: '3[413988.0.1273364832][413988.0.1273364831][413988.0.1273364833]'
  Description: '曲轴'
  ValueType: Number
}
_Main/BL/Type_MacroPlan/Attribute_CylinderBlock.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute CylinderBlock
{
  #keys: '3[413988.0.1273381359][413988.0.1273381358][413988.0.1273381360]'
  Description: '缸体'
  ValueType: Number
}
_Main/BL/Type_MacroPlan/Attribute_CylinderHead.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute CylinderHead
{
  #keys: '3[413988.0.1273364812][413988.0.1273364811][413988.0.1273364813]'
  Description: '缸盖'
  ValueType: Number
}
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_Divisor.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Divisor
{
  #keys: '3[413988.0.1270554768][413988.0.1270554767][413988.0.1270554769]'
  ValueType: Real
}
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_PeriodTask.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute PeriodTask
{
  #keys: '3[413988.0.1270554778][413988.0.1270554777][413988.0.1270554779]'
  ValueType: String
}
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_ProductInStockingName.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ProductInStockingName
{
  #keys: '3[413988.0.1270630162][413988.0.1270630161][413988.0.1270630163]'
  ValueType: String
}
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_UnitID.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute UnitID
{
  #keys: '3[413988.0.1270630172][413988.0.1270630171][413988.0.1270630173]'
  ValueType: String
}
_Main/BL/Type_TempDependentDemandInputGroup/Attribute_id.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ID
{
  #keys: '3[413988.0.1270554752][413988.0.1270554751][413988.0.1270554753]'
  ValueType: String
}
_Main/BL/Type_TempDependentDemandInputGroup/_ROOT_Type_TempDependentDemandInputGroup.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type TempDependentDemandInputGroup
{
  #keys: '5[413988.0.1270630137][413988.0.1270630135][0.0.0][413988.0.1270630136][413988.0.1270630138]'
  BaseType: Object
  StructuredName: 'TempDependentDemandInputGroups'
}
_Main/BL/Type_WholeShift/Method_CapacityRounding.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,114 @@
Quintiq file version 2.0
#parent: #root
Method CapacityRounding (
  MacroPlan macroPlan,
  Real timeDifference,
  UnitPeriodTimeBase uptb,
  UnitPeriodTimeBases uptbs
)
{
  TextBody:
  [*
    debuginfo( "需要圆整的时间(单位:小时)", timeDifference, "    éœ€è¦åœ†æ•´çš„产能周期的开始时间:", uptb.StartDate().Format( "Y-M2-D2" ) );
    nextUnitPeriodTimeBase := ifexpr( isnull( uptb.Next().astype( UnitPeriodTimeBase ) ), select( uptbs, Elements, tempUPTB, tempUPTB.Start() = uptb.End() ), uptb.Next().astype( UnitPeriodTimeBase ) );
    //debuginfo( "考虑库存和lotsize" );
    //while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) ) {
    //  debuginfo( "开始向时间为:", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), "的产能周期借" );
    //
    //  traverse ( nextUnitPeriodTimeBase, PeriodTaskOperation, pto, guard( pto.Operation().RoutingStep().Routing().Start(), uptb.StartDate() ) <= uptb.StartDate() and
    //                                                               guard( pto.Operation().RoutingStep().Routing().End(), uptb.End().Date() ) >= uptb.End().Date() and
    //                                                               timeDifference > 0 ) {
    //    minimumQuantityThatCanBeBorrowed := Real::MaxReal();
    //    minimumCapacityThatCanBeBorrowed := Real::MaxReal();
    //    traverse ( pto, NewSupply, ns, true ) {
    //      targetBorrowSplitShiftLotsizeLimit := select( scenarioManager, SplitShiftLotsizeLimit, tempSSLL, tempSSLL.unitID() = unitPeriodTimeBase.UnitID() and
    //                                                                                                       tempSSLL.productID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() and
    //                                                                                                       tempSSLL.startTime() <= ns.Start().Date() and
    //                                                                                                       tempSSLL.endTime() >= ns.End().Date() );
    //      minimumQuantityThatCanBeBorrowed := minvalue(
    //                                                    minvalue( ifexpr( not isnull( targetBorrowSplitShiftLotsizeLimit ) and targetBorrowSplitShiftLotsizeLimit.lotsize() < ns.Quantity(),
    //                                                                      ns.Quantity() - targetBorrowSplitShiftLotsizeLimit.lotsize(),
    //                                                                      Real::MaxReal() ),
    //                                                              minvalue(
    //                                                                        ifexpr( ( ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel() ) > 0,
    //                                                                                  ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(),
    //                                                                                  0.0
    //                                                                               ),
    //                                                                        ns.Quantity()
    //                                                                       )
    //                                                             ),
    //                                                    minimumCapacityThatCanBeBorrowed
    //                                                   );
    //      debuginfo( "nextUnitPeriodTimeBase的当前周期任务供应的产品名:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(), String::Tab(),
    //                 "最小库存:", ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(), String::Tab(),
    //                 "现有库存:", ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd(), String::Tab(),
    //                 "供应数量:", ns.Quantity(), String::Tab(),
    //                 "是否存在lotsize:", ifexpr( isnull( targetBorrowSplitShiftLotsizeLimit ), "不存在", "存在" ), String::Tab(),
    //                 "lotsize数量:", ifexpr( isnull( targetBorrowSplitShiftLotsizeLimit ), -1, targetBorrowSplitShiftLotsizeLimit.lotsize() )
    //                );
    //
    //      sourceProductInStockingPointInPeriodPlanningLeaf := select( ns, ProductInStockingPointInPeriodPlanningLeaf.ProductInStockingPoint_MP.ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), tempPISPIPPL, tempPISPIPPL.Start() = unitPeriodTimeBase.Start() );
    //      sourceNewSupply := select( sourceProductInStockingPointInPeriodPlanningLeaf, NewSupply, tempNS, tempNS.Process_MP().AsProcess_MP().ID() = unitPeriodTimeBase.UnitID() );
    //      targetReturnSplitShiftLotsizeLimit := select( scenarioManager, SplitShiftLotsizeLimit, tempSSLL, tempSSLL.unitID() = unitPeriodTimeBase.UnitID() and
    //                                                                                                       tempSSLL.productID() = sourceProductInStockingPointInPeriodPlanningLeaf.ProductInStockingPoint_MP().ProductID() and
    //                                                                                                       tempSSLL.startTime() <= sourceProductInStockingPointInPeriodPlanningLeaf.Start().Date() and
    //                                                                                                       tempSSLL.endTime() >= sourceProductInStockingPointInPeriodPlanningLeaf.End().Date() );
    //      minimumAcceptableQuantity := minvalue( ifexpr( not isnull( targetReturnSplitShiftLotsizeLimit ) and not isnull( sourceNewSupply ) and targetReturnSplitShiftLotsizeLimit.lotsize() > sourceNewSupply.Quantity(),
    //                                                     targetReturnSplitShiftLotsizeLimit.lotsize() - sourceNewSupply.Quantity(),
    //                                                     Real::MaxReal()
    //                                                    ),
    //                                             ifexpr( ( sourceProductInStockingPointInPeriodPlanningLeaf.MaxInventoryLevel() - sourceProductInStockingPointInPeriodPlanningLeaf.InventoryLevelEnd() ) > 0,
    //                                                       sourceProductInStockingPointInPeriodPlanningLeaf.MaxInventoryLevel() - sourceProductInStockingPointInPeriodPlanningLeaf.InventoryLevelEnd(),
    //                                                       0.0
    //                                                    )
    //                                            );
    //      debuginfo( "要圆整的时间:", sourceProductInStockingPointInPeriodPlanningLeaf.Start().Date().Format( "Y-M2-D2" ), String::Tab(),
    //                 "要圆整的最大库存:", sourceProductInStockingPointInPeriodPlanningLeaf.MaxInventoryLevel(), String::Tab(),
    //                 "要圆整的现有库存:", sourceProductInStockingPointInPeriodPlanningLeaf.InventoryLevelEnd(), String::Tab(),
    //                 "要圆整的供应数量:", guard( sourceNewSupply.Quantity(), 0 ), String::Tab(),
    //                 "是否存在lotsize:", ifexpr( isnull( targetReturnSplitShiftLotsizeLimit ), "不存在", "存在" ), String::Tab(),
    //                 "lotsize数量:", ifexpr( isnull( targetReturnSplitShiftLotsizeLimit ), -1, targetReturnSplitShiftLotsizeLimit.lotsize() ), String::Tab(),
    //                 "要圆整的最小接纳数量:", minimumAcceptableQuantity
    //                );
    //
    //      minimumQuantityThatCanBeBorrowed := minvalue( minimumQuantityThatCanBeBorrowed, minimumAcceptableQuantity );
    //    }
    //    debuginfo( "nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    å‘¨æœŸä»»åŠ¡èƒ½å€Ÿçš„æœ€ä½Žæ•°é‡ï¼š", minimumQuantityThatCanBeBorrowed );
    //
    //    minimumCapacityThatCanBeBorrowed := minimumQuantityThatCanBeBorrowed / pto.Operation().Throughput();
    //    unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed );
    //    debuginfo( "剩余圆整的产能:", timeDifference, "    nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    èƒ½å€Ÿçš„产能:", minimumCapacityThatCanBeBorrowed, " ç»Ÿä¸€å€Ÿçš„产能:", unifiedProcessingTimeOfRounding );
    //    this.A_unifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, unitPeriodTimeBase, pto, macroPlan );
    //    timeDifference := timeDifference - unifiedProcessingTimeOfRounding;
    //  }
    //
    //  if ( isnull( nextUnitPeriodTimeBase.Next() ) ) {
    //    nextUnitPeriodTimeBase := select( unitPeriodTimeBases, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() );
    //  } else {
    //    nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
    //  }
    //  debuginfo( "。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。" );
    //}
    debuginfo( "不考虑任何条件圆整使其到达整班" );
    nextUnitPeriodTimeBase := ifexpr( isnull( uptb.Next().astype( UnitPeriodTimeBase ) ), select( uptbs, Elements, tempUPTB, tempUPTB.Start() = uptb.End() ), uptb.Next().astype( UnitPeriodTimeBase ) );
    while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) ) {
      debuginfo( "开始向时间为:", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), "的产能周期借" );
      traverse ( nextUnitPeriodTimeBase, PeriodTaskOperation, pto, guard( pto.Operation().RoutingStep().Routing().Start(), uptb.StartDate() ) <= uptb.StartDate() and
                                                                   guard( pto.Operation().RoutingStep().Routing().End(), uptb.End().Date() ) >= uptb.End().Date() and
                                                                   timeDifference > 0 ) {
        minimumCapacityThatCanBeBorrowed := pto.Quantity() / pto.Operation().Throughput();
        unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed );
        debuginfo( "剩余圆整的产能:", timeDifference, "    nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    èƒ½å€Ÿçš„产能:", minimumCapacityThatCanBeBorrowed, " ç»Ÿä¸€å€Ÿçš„产能:", unifiedProcessingTimeOfRounding );
        this.UnifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, uptb, pto, macroPlan );
        timeDifference := timeDifference - unifiedProcessingTimeOfRounding;
      }
      if ( isnull( nextUnitPeriodTimeBase.Next() ) ) {
        nextUnitPeriodTimeBase := select( uptbs, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() );
      } else {
        nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
      }
    }
  *]
}
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling3.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: #root
Method IsRoundingOrZeroFilling3 (
  MacroPlan macroPlan,
  UnitPeriodTimeBases uptbs
)
{
  TextBody:
  [*
    traverse ( uptbs, Elements, uptb, true ) {
      if ( ( uptb.End().Date() - uptb.StartDate() ) > 1 ) {
        debuginfo( "开始时间:", uptb.StartDate().Format( "Y-M2-D2" ), "    ç»“束时间:", uptb.End().Date().Format( "Y-M2-D2" ), "    æ—¶é—´åŒºé—´ï¼š", ( uptb.End().Date() - uptb.StartDate() ) );
        this.ProcessingTimeIntervalIsGreaterThanOneDay( macroPlan, uptb, uptbs );
      } else if ( ( uptb.End().Date() - uptb.StartDate() ) = 1 ) {
        debuginfo( "开始时间:", uptb.StartDate().Format( "Y-M2-D2" ), "    ç»“束时间:", uptb.End().Date().Format( "Y-M2-D2" ), "    æ—¶é—´åŒºé—´ï¼š", ( uptb.End().Date() - uptb.StartDate() ) );
        this.ProcessingTimeIntervalIsEqualToOneDay( macroPlan, uptb, uptbs );
      }
      debuginfo( "--------------------------------------------------------------------------------" );
      Transaction::Transaction().Propagate();
    }
  *]
}
_Main/BL/Type_WholeShift/Method_PostProcessing2.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
Quintiq file version 2.0
#parent: #root
Method PostProcessing2 (
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    // äº§çº¿æ•´ç­
    traverse ( macroPlan, Unit, unit, unit.IsToFill() and unit.HasCapacityTypeTime() ) {
      unitName := unit.Name();
      debuginfo( "整班产线: ", unitName );
      // æŒ‰æ—¶é—´ç»™UnitPeriodTimeBase排序
      uptbs    := selectsortedset( unit, UnitPeriod.astype( UnitPeriodTimeBase ), tempUPTB, not tempUPTB.IsPeriodFrozen() and tempUPTB.IsPlanning(), tempUPTB.Start() );
      // åœ†æ•´æˆ–补零当前产线下所生产的产品
      this.IsRoundingOrZeroFilling3( macroPlan, uptbs ); // å€Ÿè¿˜é€»è¾‘
      Transaction::Transaction().Propagate();
    //        // å¹³è¡¡å½“前产线下所生产的产品库存(库存 < æœ€å¤§åº“存)
    //        // this.A_balanceInventory( macroPlan, unitPeriodTimeBases );
    //        // Transaction::Transaction().Propagate();
    //
    //        // è®¾ç½®å½“前产线在期间为日的计划中每天只生产一类产品
    //        // this.A_produceAProductForAPeriodOfTime( macroPlan, unitPeriodTimeBases );
    //
    //        // Lotsize逻辑处理
    //        // this.A_lotsize( macroPlan, scenarioManager, unitPeriodTimeBases );
    //        info( "逻辑三==>拆成班次-----------------------------------------------------------------------------------------------------------------------" );
    //
    //        // æ‹†æˆç­æ¬¡
    //        this.A_processingShift( macroPlan, unitPeriodTimeBases, unitPeriodTimeBases.Element( 0 ).StartDate(), true );
    //        Transaction::Transaction().Propagate();
    //
    //        info( "逻辑四=>处理班次,实现一个班次只生产一类产品-----------------------------------------------------------------------------------------------------------------------" );
    //
    //        // å¤„理班次,实现一个班次只生产一类产品
    //    //    this.A_processingShiftToProduceClassProducts( macroPlan, unitPeriodTimeBases, unitName );
    //        this.A_processingShiftToProduceClassProducts2( macroPlan, unitPeriodTimeBases, unitName );
    //        Transaction::Transaction().Propagate();
    //
    //        // é‡ç½®éœ€æ±‚
    //        this.A_generateRequirements( macroPlan, unit.ID() );
    //        Transaction::Transaction().Propagate();
    //      }
    }
    // è½¦é“整班
    traverse ( macroPlan, Unit, unit, unit.IsToFill() and unit.HasCapacityTypeTransportQuantity() ) {
      unitName := unit.Name();
      debuginfo( "车道产线: ", unitName );
    }
  *]
}
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsEqualToOneDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
Quintiq file version 2.0
#parent: #root
Method ProcessingTimeIntervalIsEqualToOneDay (
  MacroPlan macroPlan,
  UnitPeriodTimeBase uptb,
  UnitPeriodTimeBases uptbs
)
{
  Description: '处理时间区间等于1天'
  TextBody:
  [*
    if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() ) {
      debuginfo( "天已经是整班,无需处理(使用产能等于可用产能)" );
    } else if ( uptb.UsedCapacity().HoursAsReal() = 0 ) {
      debuginfo( "天已经是整班,无需处理(使用产能等于0)" );
    } else if ( uptb.UsedCapacity() < uptb.TotalAvailableCapacity() and uptb.UsedCapacity().HoursAsReal() > 0 ) {
      whetherToFillInZero := true; // åˆå§‹åŒ–默认补零条件
      debuginfo( "天不是整班,需要处理" );
      traverse ( uptb, PeriodTaskOperation, pto, whetherToFillInZero ) {
        debuginfo( "当前周期任务输出的产品个数:", pto.NewSupply( relsize ) );
        traverse( pto, NewSupply, ns, whetherToFillInZero ) {
          debuginfo( "当前供应的产品:", ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID(), "    å½“前供应的产品的剩余库存:", ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd(), "    å½“前供应的产品的最小库存:", ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(), "    å½“前供应的产品的最大库存:", ns.ProductInStockingPointInPeriodPlanningLeaf().MaxInventoryLevel(),"    å½“前产品在该周期任务的供应量:", ns.Quantity() );
          if ( ( ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.Quantity() ) < ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel() ) {
            debuginfo( "当前周期任务不能补零" );
            whetherToFillInZero := false;
          }
        }
        debuginfo( ".........." );
      }
      //  whetherToFillInZero := false;
      if ( whetherToFillInZero ) {
        debuginfo( "执行补零" );
        this.ZeroCapacityReplenishment( macroPlan, uptb.UsedCapacity().HoursAsReal(), uptb, uptbs );
      } else {
        debuginfo( "执行圆整" );
        this.CapacityRounding( macroPlan, uptb.TotalAvailableCapacity().HoursAsReal() - uptb.UsedCapacity().HoursAsReal(), uptb, uptbs );
      }
    } else {
      debuginfo( "天出现异常" );
    }
  *]
}
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsGreaterThanOneDay.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
Quintiq file version 2.0
#parent: #root
Method ProcessingTimeIntervalIsGreaterThanOneDay (
  MacroPlan macroPlan,
  UnitPeriodTimeBase uptb,
  UnitPeriodTimeBases uptbs
)
{
  Description: '处理时间区间大于1天'
  TextBody:
  [*
    if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() ) {
      debuginfo( "周已经是整班,无需处理" );
    } else if ( uptb.UsedCapacity() < uptb.TotalAvailableCapacity() and uptb.UsedCapacity().HoursAsReal() > 0 ) {
      roundedCapacity             := 0.0;
      capacityForZeroCompensation := 0.0;
      indexStartTime              := uptb.StartDate();
      indexEndTime                := uptb.End().Date();
      remainingCapacity           := uptb.UsedCapacity().HoursAsReal();
      debuginfo( "使用的产能:", remainingCapacity );
      while ( indexStartTime < indexEndTime and roundedCapacity = 0 and capacityForZeroCompensation = 0 ) {
        indexStartTimeAvailableCapacity := WholeShift::GenerateDailyCapacity( macroPlan, indexStartTime, uptb.UnitID() ).HoursAsReal();
        if ( ( remainingCapacity - indexStartTimeAvailableCapacity ) < 0 ) {
          roundedCapacity := abs( remainingCapacity - indexStartTimeAvailableCapacity );
          capacityForZeroCompensation := remainingCapacity;
          remainingCapacity := remainingCapacity - indexStartTimeAvailableCapacity;
        } else {
          remainingCapacity := remainingCapacity - indexStartTimeAvailableCapacity;
        }
        debuginfo( "索引开始时间:", indexStartTime, "    å¯ç”¨äº§èƒ½ï¼š", indexStartTimeAvailableCapacity, "    ä½¿ç”¨çš„产能-可用产能(剩余产能):", remainingCapacity );
        indexStartTime := indexStartTime + 1;
      }
      debuginfo( "圆整产能:", roundedCapacity, "    è¡¥é›¶äº§èƒ½ï¼š", capacityForZeroCompensation );
      if ( roundedCapacity = 0 and capacityForZeroCompensation = 0 ) {
        debuginfo( "已到达整班效果" );
      } else {
        whetherToFillInZero := true;
        tempCapacityForZeroCompensation := capacityForZeroCompensation;
        traverse ( uptb, PeriodTaskOperation, pto, whetherToFillInZero ) {
          quantityOfMinimumSupplyRound := Real::MaxReal();
          traverse ( pto, NewSupply, ns, whetherToFillInZero ) {
            quantityOfMinimumSupplyRound := minvalue( minvalue( ifexpr( ( ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel() ) > 0, ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(), 0.0 ),
                                                                        ns.Quantity()
                                                               ) / pto.Operation().Throughput(),
                                                      quantityOfMinimumSupplyRound
                                                     );
          }
          tempCapacityForZeroCompensation := tempCapacityForZeroCompensation - quantityOfMinimumSupplyRound;
          if ( tempCapacityForZeroCompensation  < 0 ) {
            whetherToFillInZero := false;
          }
          debuginfo( "当前周期任务供应数量:", pto.Quantity(), "    æœ€å°è¡¥é›¶äº§èƒ½ï¼š", quantityOfMinimumSupplyRound, "    è¡¥é›¶åŽè¿˜å‰©ï¼š", tempCapacityForZeroCompensation );
        }
        //    whetherToFillInZero := true;
        if ( not whetherToFillInZero ) {
          debuginfo( "执行补零" );
          this.ZeroCapacityReplenishment( macroPlan, capacityForZeroCompensation, uptb, uptbs );
        } else {
          debuginfo( "执行圆整" );
          this.CapacityRounding( macroPlan, roundedCapacity, uptb, uptbs );
        }
      }
    } else {
      debuginfo( "周出现异常" );
    }
  *]
}
_Main/BL/Type_WholeShift/Method_UnifiedProcessingOfComplementZeroLogic.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
#parent: #root
Method UnifiedProcessingOfComplementZeroLogic (
  Real unifiedProcessingTimeOfRounding,
  PeriodTaskOperation sourcePeriodTaskOperation,
  UnitPeriodTimeBase targetUnitPeriodTimeBase,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    targetPeriodTaskOperation := select( targetUnitPeriodTimeBase, PeriodTaskOperation, tempOTO, tempOTO.Operation() = sourcePeriodTaskOperation.Operation() );
    if ( isnull( targetPeriodTaskOperation ) ) {
      debuginfo( "目标产能周期不存在目标周期任务" );
      sourcePeriodTaskOperation.Update( sourcePeriodTaskOperation.Quantity() - ( sourcePeriodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      targetPeriodTaskOperation := PeriodTaskOperation::Create( sourcePeriodTaskOperation.Operation(), targetUnitPeriodTimeBase, sourcePeriodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding, false );
      Transaction::Transaction().Propagate();
    //  info( "新创建的周期任务有几个需求:", targetPeriodTaskOperation.DependentDemand( relsize ), "    å‘¨æœŸä»»åŠ¡ID为:", targetPeriodTaskOperation.Key().AsQUILL() );
      traverse ( targetPeriodTaskOperation, DependentDemand, dd, true ) {
        targetDependentDemand := select( sourcePeriodTaskOperation, DependentDemand, tempDD, tempDD.ProcessInput().astype( OperationInput ).Name() = dd.ProcessInput().astype( OperationInput ).Name() );
        targetTempDependentDemandInputGroup := select( macroPlan, TempDependentDemandInputGroup, tempTDDIG, tempTDDIG.ID() = guard( targetDependentDemand.Key().AsQUILL(), "" ) );
        if ( not isnull( targetTempDependentDemandInputGroup ) ) {
    //      info( "创建了依赖需求,ID为:", dd.Key().AsQUILL() );
          macroPlan.TempDependentDemandInputGroup( relnew, ID                    := dd.Key().AsQUILL(),
                                                           Divisor               := targetTempDependentDemandInputGroup.Divisor(),
                                                           UnitID                := targetTempDependentDemandInputGroup.UnitID(),
                                                           ProductInStockingName := targetTempDependentDemandInputGroup.ProductInStockingName() );
        }
      }
      Transaction::Transaction().Propagate();
    } else {
      debuginfo( "目标产能周期存在目标周期任务" );
      sourcePeriodTaskOperation.Update( sourcePeriodTaskOperation.Quantity() - ( sourcePeriodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      targetPeriodTaskOperation.Update( targetPeriodTaskOperation.Quantity() + ( targetPeriodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      Transaction::Transaction().Propagate();
    }
  *]
}
_Main/BL/Type_WholeShift/Method_UnifiedProcessingOfRoundingLogic.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
#parent: #root
Method UnifiedProcessingOfRoundingLogic (
  Real unifiedProcessingTimeOfRounding,
  UnitPeriodTimeBase sourceUnitPeriodTimeBase,
  PeriodTaskOperation periodTaskOperation,
  MacroPlan macroPlan
)
{
  TextBody:
  [*
    sourcePeriodTaskOperation := select( sourceUnitPeriodTimeBase, PeriodTaskOperation, tempOTO, tempOTO.Operation() = periodTaskOperation.Operation() );
    if ( isnull( sourcePeriodTaskOperation ) ) {
      debuginfo( "源产能周期不存在目标周期任务" );
      periodTaskOperation.Update( periodTaskOperation.Quantity() - ( periodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      sourcePeriodTaskOperation := PeriodTaskOperation::Create( periodTaskOperation.Operation(), sourceUnitPeriodTimeBase, periodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding, false );
      Transaction::Transaction().Propagate();
    //  info( "新创建的周期任务有几个需求:", sourcePeriodTaskOperation.DependentDemand( relsize ), "    å‘¨æœŸä»»åŠ¡ID为:", sourcePeriodTaskOperation.Key().AsQUILL() );
      traverse ( sourcePeriodTaskOperation, DependentDemand, dd, true ) {
        targetDependentDemand := select( periodTaskOperation, DependentDemand, tempDD, tempDD.ProcessInput().astype( OperationInput ).Name() = dd.ProcessInput().astype( OperationInput ).Name() );
        targetTempDependentDemandInputGroup := select( macroPlan, TempDependentDemandInputGroup, tempTDDIG, tempTDDIG.ID() = guard( targetDependentDemand.Key().AsQUILL(), "" ) );
        if ( not isnull( targetTempDependentDemandInputGroup ) ) {
    //      info( "创建了依赖需求,ID为:", dd.Key().AsQUILL() );
          macroPlan.TempDependentDemandInputGroup( relnew, ID                    := dd.Key().AsQUILL(),
                                                           Divisor               := targetTempDependentDemandInputGroup.Divisor(),
                                                           UnitID                := targetTempDependentDemandInputGroup.UnitID(),
                                                           ProductInStockingName := targetTempDependentDemandInputGroup.ProductInStockingName() );
        }
      }
      Transaction::Transaction().Propagate();
    } else {
      debuginfo( "源产能周期存在目标周期任务" );
      periodTaskOperation.Update( periodTaskOperation.Quantity() - ( periodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      sourcePeriodTaskOperation.Update( sourcePeriodTaskOperation.Quantity() + ( sourcePeriodTaskOperation.Operation().Throughput() * unifiedProcessingTimeOfRounding ), false );
      Transaction::Transaction().Propagate();
    }
  *]
}
_Main/BL/Type_WholeShift/Method_ZeroCapacityReplenishment.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,100 @@
Quintiq file version 2.0
#parent: #root
Method ZeroCapacityReplenishment (
  MacroPlan macroPlan,
  Real timeDifference,
  UnitPeriodTimeBase uptb,
  UnitPeriodTimeBases uptbs
)
{
  TextBody:
  [*
    debuginfo( "需要补零的时间(单位:小时)", timeDifference, "    éœ€è¦è¡¥é›¶çš„产能周期的开始时间:", uptb.StartDate().Format( "Y-M2-D2" ) );
    //debuginfo( "考虑库存、lotsize" );
    //traverse ( unitPeriodTimeBase, PeriodTaskOperation, pto, timeDifference > 0 ) {
    //  minimumQuantityThatCanBeBorrowed := Real::MaxReal();
    //  minimumCapacityThatCanBeBorrowed := Real::MaxReal();
    //  traverse ( pto, NewSupply, ns, true ) {
    //    targetBorrowSplitShiftLotsizeLimit := select( scenarioManager, SplitShiftLotsizeLimit, tempSSLL, tempSSLL.unitID() = unitPeriodTimeBase.UnitID() and
    //                                                                                                     tempSSLL.productID() = ns.ProductInStockingPointInPeriodPlanningLeaf().ProductInStockingPoint_MP().ProductID() and
    //                                                                                                     tempSSLL.startTime() <= ns.Start().Date() and
    //                                                                                                     tempSSLL.endTime() >= ns.End().Date() );
    //    minimumQuantityThatCanBeBorrowed := minvalue(
    //                                                  minvalue( ifexpr( not isnull( targetBorrowSplitShiftLotsizeLimit ) and targetBorrowSplitShiftLotsizeLimit.lotsize() < ns.Quantity(),
    //                                                                    ns.Quantity() - targetBorrowSplitShiftLotsizeLimit.lotsize(),
    //                                                                    Real::MaxReal() ),
    //                                                            minvalue(
    //                                                                      ifexpr( ( ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel() ) > 0,
    //                                                                                ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(),
    //                                                                                0.0
    //                                                                             ),
    //                                                                      ns.Quantity()
    //                                                                     )
    //                                                           ),
    //                                                  minimumQuantityThatCanBeBorrowed
    //                                                 );
    //  }
    //  minimumCapacityThatCanBeBorrowed := minimumQuantityThatCanBeBorrowed / pto.Operation().Throughput();
    //  nextUnitPeriodTimeBase := ifexpr( isnull( unitPeriodTimeBase.Next().astype( UnitPeriodTimeBase ) ), select( unitPeriodTimeBases, Elements, tempUPTB, tempUPTB.Start() = unitPeriodTimeBase.End() ), unitPeriodTimeBase.Next().astype( UnitPeriodTimeBase ) );
    //  while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) and minimumCapacityThatCanBeBorrowed > 0 ) {
    //    acceptableCapacity := ifexpr( ( nextUnitPeriodTimeBase.TotalAvailableCapacity().HoursAsReal() - nextUnitPeriodTimeBase.UsedCapacity().HoursAsReal() ) > 0,
    //                                    nextUnitPeriodTimeBase.TotalAvailableCapacity().HoursAsReal() - nextUnitPeriodTimeBase.UsedCapacity().HoursAsReal(),
    //                                    0.0 );
    //    unifiedProcessingTimeOfComplementZero := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed, acceptableCapacity );
    //    debuginfo( "接纳的周期时间:", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), String::Tab(),
    //               "接纳的周期能接受的产能:", acceptableCapacity, String::Tab(),
    //               "剩余补零的产能:", timeDifference, String::Tab(),
    //               "统一转移的产能:", unifiedProcessingTimeOfComplementZero, String::Tab()
    //              );
    //    this.A_unifiedProcessingOfComplementZeroLogic( unifiedProcessingTimeOfComplementZero, pto, nextUnitPeriodTimeBase, macroPlan );
    //    minimumCapacityThatCanBeBorrowed := minimumCapacityThatCanBeBorrowed - unifiedProcessingTimeOfComplementZero;
    //    timeDifference := timeDifference - unifiedProcessingTimeOfComplementZero;
    //    if ( isnull( nextUnitPeriodTimeBase.Next() ) ) {
    //      nextUnitPeriodTimeBase := select( unitPeriodTimeBases, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() );
    //    } else {
    //      nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
    //    }
    //  }
    //}
    debuginfo( "不考虑库存、lotsize使其达到整班" );
    traverse ( uptb, PeriodTaskOperation, pto, timeDifference > 0 ) {
      minimumQuantityThatCanBeBorrowed := Real::MaxReal();
      minimumCapacityThatCanBeBorrowed := Real::MaxReal();
      traverse ( pto, NewSupply, ns, true ) {
        minimumQuantityThatCanBeBorrowed := minvalue(
                                                      minvalue(
                                                                ifexpr( ( ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel() ) > 0,
                                                                          ns.ProductInStockingPointInPeriodPlanningLeaf().InventoryLevelEnd() - ns.ProductInStockingPointInPeriodPlanningLeaf().MinInventoryLevel(),
                                                                          0.0
                                                                       ),
                                                                ns.Quantity()
                                                               ),
                                                      minimumQuantityThatCanBeBorrowed
                                                     );
      }
      minimumCapacityThatCanBeBorrowed := minimumQuantityThatCanBeBorrowed / pto.Operation().Throughput();
      nextUnitPeriodTimeBase := ifexpr( isnull( uptb.Next().astype( UnitPeriodTimeBase ) ), select( uptbs, Elements, tempUPTB, tempUPTB.Start() = uptb.End() ), uptb.Next().astype( UnitPeriodTimeBase ) );
      while ( timeDifference > 0 and not isnull( nextUnitPeriodTimeBase ) and minimumCapacityThatCanBeBorrowed > 0 ) {
        acceptableCapacity := ifexpr( ( nextUnitPeriodTimeBase.TotalAvailableCapacity().HoursAsReal() - nextUnitPeriodTimeBase.UsedCapacity().HoursAsReal() ) > 0,
                                        nextUnitPeriodTimeBase.TotalAvailableCapacity().HoursAsReal() - nextUnitPeriodTimeBase.UsedCapacity().HoursAsReal(),
                                        0.0 );
        unifiedProcessingTimeOfComplementZero := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed, acceptableCapacity );
        debuginfo( "接纳的周期时间:", nextUnitPeriodTimeBase.StartDate().Format( "Y-M2-D2" ), String::Tab(),
                   "接纳的周期能接受的产能:", acceptableCapacity, String::Tab(),
                   "剩余补零的产能:", timeDifference, String::Tab(),
                   "统一转移的产能:", unifiedProcessingTimeOfComplementZero, String::Tab()
                  );
        this.UnifiedProcessingOfComplementZeroLogic( unifiedProcessingTimeOfComplementZero, pto, uptb, macroPlan );
        minimumCapacityThatCanBeBorrowed := minimumCapacityThatCanBeBorrowed - unifiedProcessingTimeOfComplementZero;
        timeDifference := timeDifference - unifiedProcessingTimeOfComplementZero;
        if ( isnull( nextUnitPeriodTimeBase.Next() ) ) {
          nextUnitPeriodTimeBase := select( uptbs, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() );
        } else {
          nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
        }
      }
    }
  *]
}
_Main/BL/Type_WholeShift/StaticMethod_GenerateDailyCapacity.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,103 @@
Quintiq file version 2.0
#parent: #root
StaticMethod GenerateDailyCapacity (
  MacroPlan macroPlan,
  Date indexDate,
  String unitID
) as Duration
{
  TextBody:
  [*
    returnCapacity := Duration::Zero();
    traverse ( macroPlan, Unit.UnitPeriod.astype( UnitPeriodTimeBase ), this, this.UnitID() = unitID and
                                                                              this.StartDate() <= indexDate and
                                                                              this.End().Date() > indexDate and
                                                                              /*this.IsBase() and*/
                                                                              this.IsPlanning() ) {
      // Determined by the used shift pattern, the efficiency rate, maintenance considering its maintenance factor, allocation, max load percentage and calendar elements.
      //  debuginfo( "遍历的时间节点(开始时间):", this.StartDate(), "    ç»“束时间:", this.End() );
      value := Duration::Zero();
      datetimevector := DateTimeVector::Construct();
      durationvector := RealVector::Construct();
      if( this.IsPlanning() or this.IsBase() )
      {
        planningup := ifexpr( this.IsPlanning(),
                              this,                                             // Case 1: planning UnitPeriod: aggregate values from associated period tasks
                              this.PlanningUP().astype( UnitPeriodTimeBase ) ); // Case 2: base, non planning UnitPeriod: disaggregate value from planning UnitPeriod
        if( not isnull( planningup ) )
        {
          if( not isnull( planningup.Period_MP() )
              and not isnull( planningup.ShiftPattern() )
              and not planningup.Period_MP().IsInHour() ) //gdn1 HourlyPeriod is not applicable for ShiftPattern
          {
             lastshiftday := planningup.StartDate() - planningup.Period_MP().Start().StartOfWeek().Date() + 1
             nrdaysinthisperiod := planningup.Duration().DaysAsReal();
             firstday := planningup.Period_MP().Start();
             numberofshiftday := planningup.ShiftPattern().ShiftDay( relsize );
             if( not isnull( planningup.Previous() ) )
             {
               lastshiftday := planningup.Previous().astype( UnitPeriodTimeBase ).PreviousPeriodLastShiftDay() + 1;
             }
             for( i := 0; i < nrdaysinthisperiod and firstday + Duration::Days( i ) >= planningup.Unit().StartDate().DateTime() ; i++ )
             {
               shiftday := lastshiftday + i;
               if( shiftday > numberofshiftday )
               {
                 shiftday := shiftday mod numberofshiftday;
                 if( shiftday = 0 )
                 {
                   shiftday := numberofshiftday;
                 }
               }
               shift := select( planningup.ShiftPattern(), ShiftDay, shift, shift.Day() = shiftday, true );
               unavailable := planningup.Unit().UnavailableTime( firstday + Duration::Days( i ), firstday + Duration::Days( i + 1 ) );
               if( not isnull( shift ) )
               {
                 shiftduration := maxvalue( ( shift.Capacity() - unavailable ), Duration::Zero() );
                 //value := value + shiftduration;
                 datetimevector.Append( firstday + Duration ::Days( i ) );
                 durationvector.Append( shiftduration.HoursAsReal() );
               }
               if ( /*this.UnitID() = unitID and this.IsBase() and this.IsPlanning() and*/ ( this.StartDate() + i ) = indexDate ) {
          //          debuginfo( "当前开始时间:", this.StartDate() + i, "    å½“前产能:", maxvalue( ( shift.Capacity() - unavailable ), Duration::Zero() ) );
          //          this.MacroPlan().UnitPeriodTimeBaseDailyCapacity( relnew, startDate := this.StartDate() + i,
          //                                                                    capacity := maxvalue( ( shift.Capacity() - unavailable ), Duration::Zero() ) );
                    returnCapacity := maxvalue( ( shift.Capacity() - unavailable ), Duration::Zero() );
                }
             } // for
             value := this.GetPlanningCapacity( datetimevector, durationvector );
       }// if planning period not in hour
       else if ( planningup.Period_MP().DurationInDays() < 1 )   //gdn1 HourlyPeriod is always same as PeriodDuration
              {
                value := planningup.Unit().UnitCalendar().AvailableTime( planningup.Start(), planningup.End(), 0.00000001 ); // Check calendar to make hourly period work with the calendar
              }
              value := maxvalue( ( value * planningup.Efficiency() * planningup.Allocation()  -  ( planningup.Maintenance() * this.PlanningSystemRatio() ) )* planningup.NrOfOpen(), Duration::Zero() );
        }
      }
      else
      {
        value := sum( this.GetChildrenOfPeriodDimension(), Elements.astype( UnitPeriodTimeBase ), e, e.BaseAvailableCapacity() );
      }
      //  this.BaseAvailableCapacity( value );
    }
    return returnCapacity;
  *]
}
_Main/BL/Type_WholeShift/StaticMethod_OnServerStartup.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
StaticMethod OnServerStartup
{
  TextBody:
  [*
    // lihongji May-15-2024 (created)
    folder := DomainModel::Domain().MDSFolderDefinitions().FindFolder( "/root" );
    datasetName := typeof( WholeShift ).Name();
    oinfo := MDSEditor::Editor().ObjectInfos( datasetName, folder.FolderID(), datasetName );
    o := select( oinfo, Elements, o, not o.IsLoaded() );
    emptydataset := isnull( o );
    if ( emptydataset ) {
      MDSWholeShift::CreateMDS( datasetName, DMF_Utility::GetStorageState() );
    } else {
      MDSWholeShift::LoadMDSAndConvert( o.MDSID(), DMF_Utility::GetStorageState() );
    }
  *]
}
_Main/BL/Type_WholeShift/_ROOT_Type_WholeShift.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
Quintiq file version 2.0
#root
#parent: #DomainModel
Type WholeShift
{
  #keys: '5[413988.0.1256611417][413988.0.1256611415][0.0.0][413988.0.1256611416][413988.0.1256611418]'
  BaseType: Object
  StructuredName: 'WholeShifts'
}
_Main/Sys/ImgAttr/Entity.dme
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
Quintiq file version 2.0
#parent: #root
TypeDataInterface Entity
{
  TypeKey: '[127710.1.1013709077]'
  ImageDataMember ImgIsToFill
  {
    #keys: '1[413988.0.1254350815]'
    ImageSpecifications:
    [
      ImageDataMemberImageSpecification
      {
        Image: 'CHECKEDCHECKBOX'
        Quill: "( object.DisplayCapacityType() = 'Time' or object.DisplayCapacityType() = 'Transport quantity' ) and object.IsToFill()"
        Value: 'Fill'
      }
      ImageDataMemberImageSpecification
      {
        Image: 'EMPTYCHECKBOX'
        Quill: "( object.DisplayCapacityType() = 'Time' or object.DisplayCapacityType() = 'Transport quantity' ) and not object.IsToFill()"
        Value: 'NotFill'
      }
    ]
  }
}
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
@@ -83,6 +83,8 @@
        Component ComponentMenu347 { #keys: '[413988.0.1172464302]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'FormTest1' Text: '' ] }
        Component ComponentMenu357 { #keys: '[414996.0.395684386]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'frmStandardAnalysis589' Text: 'Archive Execution Status' ] }
        Component ComponentMenu702 { #keys: '[413988.0.1234424010]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'frmStandardAnalysis822' Text: 'Interface Dataset' ] }
        Component menuSeparator891 { #keys: '[413988.0.1263894630]' BaseType: 'Menu' Properties: [ Separator: true ] }
        Component MenuWholeShift { #keys: '[413988.0.1263894682]' BaseType: 'Menu' Properties: [ Image: 'FISH_BOWL' Text: '测试整班' ] }
      ]
      Properties:
      [
@@ -104,6 +106,8 @@
          c: ComponentMenu702
          c: menuSeparator222
          c: ComponentMenu347
          c: menuSeparator891
          c: MenuWholeShift
        }
      ]
    }
_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Response_MacroPlanner_mbMainMenu_MenuWholeShift_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: mbMainMenu/MenuWholeShift
Response OnClick () id:Response_MacroPlanner_mbMainMenu_MenuWholeShift_OnClick
{
  #keys: '[413988.0.1263894734]'
  Body:
  [*
    WholeShift.PostProcessing2( MacroPlan );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_Menu_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and not isnull( WholeShift );
  *]
}
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_abgWholeShiftSystem_bWholeShiftSystem_OnClick.def
@@ -5,6 +5,10 @@
  #keys: '[414702.2.1843141002]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan ) and not isnull( WholeShift );
  *]
  QuillAction
  {
    Body:
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Component_pnlActions.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,40 @@
Quintiq file version 2.0
Component pnlActions
{
  #keys: '[413988.0.1274023099]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[413988.0.1274023103]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[413988.0.1274023105]'
      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_DialogTransferMinimumQuantity/Component_pnlContent.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
Quintiq file version 2.0
Component pnlContent
{
  #keys: '[413988.0.1274023097]'
  BaseType: 'WebPanel'
  Children:
  [
    Component npCylinderBlock
    {
      #keys: '[413988.0.1273522242]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'MacroPlan.CylinderBlock'
        Label: '缸体(pcs)'
        Taborder: 0
      ]
    }
    Component npCylinderHead
    {
      #keys: '[413988.0.1273522255]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'MacroPlan.CylinderHead'
        Label: '缸盖(pcs)'
        Taborder: 1
      ]
    }
    Component npConnectingRod
    {
      #keys: '[413988.0.1273522267]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'MacroPlan.ConnectingRod'
        Label: '连杆(pcs)'
        Taborder: 2
      ]
    }
    Component npCrankshaft
    {
      #keys: '[413988.0.1273522280]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'MacroPlan.Crankshaft'
        Label: '曲轴(pcs)'
        Taborder: 3
      ]
    }
    Component npBalanceAxis
    {
      #keys: '[413988.0.1273522292]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'MacroPlan.BalanceAxis'
        Label: '平衡轴(pcs)'
        Taborder: 4
      ]
    }
  ]
  Properties:
  [
    Padding: 'true'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Response_pnlActions_btnCancel_OnClick.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActions_btnCancel_OnClick.def ÐÞ¸Ä
@@ -2,7 +2,7 @@
#parent: pnlActions/btnCancel
Response OnClick () id:Response_pnlActions_btnCancel_OnClick
{
  #keys: '[414702.2.1844994368]'
  #keys: '[413988.0.1274023109]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/Response_pnlActions_btnOk_OnClick.def
ÎļþÃû´Ó _Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActions_btnOk_OnClick.def ÐÞ¸Ä
@@ -2,7 +2,7 @@
#parent: pnlActions/btnOk
Response OnClick () id:Response_pnlActions_btnOk_OnClick
{
  #keys: '[414702.2.1844994367]'
  #keys: '[413988.0.1274023108]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
_Main/UI/MacroPlannerWebApp/Component_DialogTransferMinimumQuantity/_ROOT_Component_DialogTransferMinimumQuantity.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
Quintiq file version 2.0
#root
#parent: MacroPlannerWebApp
OrphanComponent DialogTransferMinimumQuantity
{
  #keys: '[413988.0.1274023095]'
  BaseType: 'WebForm'
  Children:
  [
    #child: pnlContent
    #child: pnlActions
  ]
  Properties:
  [
    Alignment: 'trailing'
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    Padding: 'false'
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_ListEntity.def
@@ -31,7 +31,7 @@
          BaseType: 'WebDataSetLevel'
          Properties:
          [
            Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":-1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayName","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayCapacityType","title":"Capacity type","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayCapacityType"}}]'
            Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":-1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayName","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayCapacityType","title":"Capacity type","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayCapacityType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsToFill","title":"ImgIsToFill","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsToFill"}}]'
            ContextMenu: 'listContextMenu902'
            FixedFilter: 'not object.GetIsSystem() and object.IsUnit();'
            RelationFromParent: 'ChildEntity'
@@ -43,7 +43,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":-1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayName","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayCapacityType","title":"Capacity type","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayCapacityType"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeAllConstraint","columnid":"All constraints","title":"All constraints","subtotals":"","tooltip":"","width":-1,"display":"shown"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayName","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DisplayCapacityType","title":"Capacity type","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DisplayCapacityType"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ImgIsToFill","title":"ImgIsToFill","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ImgIsToFill"}}]'
        ContextMenu: 'listContextMenu902'
        RelationFromParent: 'ChildEntity'
        SortCriteria: 'DisplayIndex'
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_listContextMenu902#1.def
@@ -27,6 +27,28 @@
        Title: 'Select all'
      ]
    }
    Component mEnable
    {
      #keys: '[413988.0.1257262758]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'CHECKEDCHECKBOX'
        Taborder: 4
        Title: 'Enable'
      ]
    }
    Component mDisable
    {
      #keys: '[413988.0.1254331512]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'EMPTYCHECKBOX'
        Taborder: 5
        Title: 'Disable'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActions.def
@@ -5,30 +5,11 @@
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk
    {
      #keys: '[414702.2.1844994362]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel
    {
      #keys: '[414702.2.1844994364]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
    #child: pnlActionsRight_106
    #child: pnlActionsLeft_522
  ]
  Properties:
  [
    Alignment: 'trailing'
    Border: true
    ExcludeFromActiveComponent: true
    FixedSize: true
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActionsLeft#522.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
Quintiq file version 2.0
Component pnlActionsLeft id:pnlActionsLeft_522
{
  #keys: '[413988.0.1271132689]'
  BaseType: 'WebPanel'
  Children:
  [
    Component bTransferMinimumQuantity
    {
      #keys: '[413988.0.1271132690]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: '调拨最小包装数量'
        Taborder: 0
      ]
    }
  ]
  Properties:
  [
    Orientation: 'horizontal'
    Taborder: 0
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Component_pnlActionsRight#106.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
Quintiq file version 2.0
Component pnlActionsRight id:pnlActionsRight_106
{
  #keys: '[413988.0.1271132759]'
  BaseType: 'WebPanel'
  Children:
  [
    Component btnOk id:btnOk_568
    {
      #keys: '[413988.0.1273560747]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'OK'
        Taborder: 0
      ]
    }
    Component btnCancel id:btnCancel_925
    {
      #keys: '[413988.0.1273560814]'
      BaseType: 'WebButton'
      Properties:
      [
        Label: 'Cancel'
        Taborder: 1
      ]
    }
  ]
  Properties:
  [
    Alignment: 'trailing'
    FixedSize: true
    Orientation: 'horizontal'
    Taborder: 1
  ]
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Method_OnOK.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogWholeShiftSystem_OnOK
{
  #keys: '[413988.0.1261831139]'
  Body:
  [*
    Form.ApplyChanges();
    WholeShift.PostProcessing2( MacroPlan );
    Form.Close();
  *]
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_ListEntity_mDisable_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: ListEntity
Response OnClick (
  Entity selection
) id:Response_ListEntity_mDisable_OnClick
{
  #keys: '[413988.0.1254381266]'
  DefinitionID => /ListEntity/Responsedef_ListEntity_WebMenu_OnClick
  Initiator: 'mDisable'
  QuillAction
  {
    Body:
    [*
      selection.IsToFill( false );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_ListEntity_mEnable_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
Quintiq file version 2.0
#parent: ListEntity
Response OnClick (
  Entity selection
) id:Response_ListEntity_mEnable_OnClick
{
  #keys: '[413988.0.1256872893]'
  DefinitionID => /ListEntity/Responsedef_ListEntity_WebMenu_OnClick
  Initiator: 'mEnable'
  QuillAction
  {
    Body:
    [*
      selection.IsToFill( true );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsLeft_522_bTransferMinimumQuantity_OnClick.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
Quintiq file version 2.0
#parent: pnlActionsLeft_522/bTransferMinimumQuantity
Response OnClick () id:Response_pnlActionsLeft_522_bTransferMinimumQuantity_OnClick
{
  #keys: '[413988.0.1271132688]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return not isnull( MacroPlan );
  *]
  QuillAction
  {
    Body:
    [*
      dlg := construct( DialogTransferMinimumQuantity );
      ApplicationMacroPlanner.ShowFormModal( dlg );
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsRight_106_btnCancel_OnClick#836.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActionsRight_106/btnCancel_925
Response OnClick () id:Response_pnlActions_btnCancel_OnClick_836
{
  #keys: '[413988.0.1273560813]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  GroupServerCalls: true
  QuillAction
  {
    Body:
    [*
      Form.Close();
    *]
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/Response_pnlActionsRight_106_btnOk_OnClick#393.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
Quintiq file version 2.0
#parent: pnlActionsRight_106/btnOk_568
Response OnClick () id:Response_pnlActions_btnOk_OnClick_393
{
  #keys: '[413988.0.1273560746]'
  DefinitionID: 'Responsedef_WebButton_OnClick'
  QuillAction
  {
    Body:
    [*
      Form.OnOK();
    *]
    GroupServerCalls: false
  }
}
_Main/UI/MacroPlannerWebApp/Component_DialogWholeShiftSystem/_ROOT_Component_DialogWholeShiftSystem.def
@@ -16,8 +16,8 @@
    EnterButton: 'btnOk'
    EscapeButton: 'btnCancel'
    ExcludeFromActiveComponent: true
    MinimumColumns: 100
    MinimumRows: 100
    MinimumColumns: 110
    MinimumRows: 35
    Padding: 'false'
    Title: 'WholeShiftSystem'
  ]