lazhen
2024-08-29 296fd628f1ecca7397efed30f9c4252a6cfd2a18
Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已添加3个文件
已修改7个文件
103 ■■■■ 文件已修改
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_InterfaceTime.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionFlag.qbl 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanRow/Attribute_Notes.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_CapacityRounding.qbl 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling3.qbl 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsEqualToOneDay.qbl 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_InterfaceTime.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
Quintiq file version 2.0
#parent: #root
Attribute InterfaceTime
{
  #keys: '3[415754.0.175798548][415754.0.175798547][415754.0.175798549]'
  Description: '接口推送时间'
  ValueType: DateTime
}
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/Attribute_VersionFlag.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
Quintiq file version 2.0
#parent: #root
Attribute VersionFlag
{
  #keys: '3[415754.0.176284753][415754.0.176284752][415754.0.176284754]'
  Description:
  [*
    1:发布版本
    0:汇报版本
  *]
  ValueType: Number
}
_Main/BL/Type_InterfaceProductionSchedulingPlanPush/StaticMethod_GenerateData.qbl
@@ -2,12 +2,16 @@
#parent: #root
StaticMethod GenerateData (
  MacroPlan macroPlan,
  InterfaceDataset interfaceDataset
  InterfaceDataset interfaceDataset,
  Number versionFlag
)
{
  TextBody:
  [*
    interfaceDataset.InterfaceProductionSchedulingPlanPush( relflush );
    ipspps := selectset( interfaceDataset, InterfaceProductionSchedulingPlanPush, tempIPSPP, tempIPSPP.VersionFlag() = versionFlag );
    MacroPlan::DeleteObjects( ipspps );
    actualDateTime := DateTime::ActualTime();
    
    traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() and ( pispmp.StockingPointID() = "DL-MoMo" or pispmp.StockingPointID() = "CC-MoMo" ) ) {
      info( pispmp.Name() );
@@ -18,7 +22,9 @@
                                                                PlanningQty  := [Number]pispippl.NewSupplyQuantity(),
                                                                VersionName  := macroPlan.ScenarioName(),
                                                                FactoryName  := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "大连工厂", "长春工厂" ),
                                                                Fac          := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" )
                                                                Fac          := ifexpr( pispmp.StockingPointID().Regex( "大连" ) or pispmp.StockingPointID().Regex( "DL" ), "DL", "CC" ),
                                                                InterfaceTime     := actualDateTime,
                                                                VersionFlag       := versionFlag
                                                               );
      } 
    }
_Main/BL/Type_OfflinePlanCell/StaticMethod_RefreshOfflinePlan.qbl
@@ -21,7 +21,7 @@
          oprQuantity := select( opt, OfflinePlanRow, tempOPR, tempOPR.ProductionLine() = u.ID() and tempOPR.ProductID() = ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID() and tempOPR.Type() = "1" );
          oprOrder    := select( opt, OfflinePlanRow, tempOPR, tempOPR.ProductionLine() = u.ID() and tempOPR.ProductID() = ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID() and tempOPR.Type() = "2" );
          if ( isnull( oprQuantity ) and isnull( oprOrder ) ) {
            oprQuantity := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "1" );
            oprQuantity := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "1", Notes := ns.AsProductionSupply().ProductInStockingPoint_MP().Product_MP().Notes() );
            oprOrder    := opt.OfflinePlanRow( relnew, ProductionLine := u.ID(), ProductID := ns.AsProductionSupply().ProductInStockingPoint_MP().ProductID(), Type := "2" );
          }
          
@@ -59,7 +59,7 @@
        productLineCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductionLine() );
        productLineCell.OfflinePlanRow( relset, opr );
      } else if( opr.Type() = "1" ) {
        productCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductID() );
        productCell := productOPC.OfflinePlanCell( relnew, Value := opr.ProductID() + ifexpr( opr.Notes() = "", "", "-" + opr.Notes() ) );
        productCell.OfflinePlanRow( relset, opr );
        typeCell    := typeOPC.OfflinePlanCell( relnew, Value :=  "Quantity" );
        typeCell.OfflinePlanRow( relset, opr );
_Main/BL/Type_OfflinePlanRow/Attribute_Notes.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute Notes
{
  #keys: '3[415754.0.180041713][415754.0.180041712][415754.0.180041714]'
  ValueType: String
}
_Main/BL/Type_WholeShift/Method_CapacityRounding.qbl
@@ -90,8 +90,34 @@
    //  }
    //  debuginfo( "。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。" );
    //}
    sourceChangeover := uptb.ChangeoverDuration();
    targetChangeover := Duration::Zero();
    debuginfo( "需要圆整的时间(单位:小时)", timeDifference, "    è€ƒè™‘ChangeOver条件圆整使其达到整班" );
    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
                                                                   exists( uptb, PeriodTaskOperation.Operation, tempO, tempO = pto.Operation() )                  and
                                                                   timeDifference > 0 ) {
        minimumCapacityThatCanBeBorrowed := pto.Quantity() / pto.Operation().Throughput();
        unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed );
        debuginfo( "剩余圆整的产能:", timeDifference, "    nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    èƒ½å€Ÿçš„产能:", minimumCapacityThatCanBeBorrowed, " ç»Ÿä¸€å€Ÿçš„产能:", unifiedProcessingTimeOfRounding, "    å€Ÿä¹‹å‰changeover时间:", uptb.ChangeoverDuration() );
        this.UnifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, uptb, pto, macroPlan );
        targetChangeover := uptb.ChangeoverDuration();
        timeDifference   := timeDifference - unifiedProcessingTimeOfRounding;
      }
      if ( isnull( nextUnitPeriodTimeBase.Next() ) ) {
        nextUnitPeriodTimeBase := select( uptbs, Elements, tempUPTB, tempUPTB.Start() = nextUnitPeriodTimeBase.End() );
      } else {
        nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
      }
    }
        
    debuginfo( "不考虑任何条件圆整使其到达整班" );
    debuginfo( "需要圆整的时间(单位:小时)", timeDifference, "    ä¸è€ƒè™‘任何条件圆整使其到达整班" );
    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" ), "的产能周期借" );
@@ -100,7 +126,7 @@
                                                                   timeDifference > 0 ) {
        minimumCapacityThatCanBeBorrowed := pto.Quantity() / pto.Operation().Throughput();
        unifiedProcessingTimeOfRounding := minvalue( timeDifference, minimumCapacityThatCanBeBorrowed ); 
        debuginfo( "剩余圆整的产能:", timeDifference, "    nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    èƒ½å€Ÿçš„产能:", minimumCapacityThatCanBeBorrowed, " ç»Ÿä¸€å€Ÿçš„产能:", unifiedProcessingTimeOfRounding );
        debuginfo( "剩余圆整的产能:", timeDifference, "    nextUnitPeriodTimeBase的当前周期任务供应数量:", pto.Quantity(), "    èƒ½å€Ÿçš„产能:", minimumCapacityThatCanBeBorrowed, " ç»Ÿä¸€å€Ÿçš„产能:", unifiedProcessingTimeOfRounding, "    å½“前changeover时间:", uptb.ChangeoverDuration().HoursAsReal() );
        this.UnifiedProcessingOfRoundingLogic( unifiedProcessingTimeOfRounding, uptb, pto, macroPlan );  
        timeDifference := timeDifference - unifiedProcessingTimeOfRounding;                                                 
      }
@@ -111,5 +137,9 @@
        nextUnitPeriodTimeBase := nextUnitPeriodTimeBase.Next().astype( UnitPeriodTimeBase );
      }
    }
    if ( ( targetChangeover - sourceChangeover ).HoursAsReal() > 0.0 ) {
      this.ZeroCapacityReplenishment( macroPlan, ( targetChangeover - sourceChangeover ).HoursAsReal(), uptb, uptbs );
    }
  *]
}
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling3.qbl
@@ -7,7 +7,10 @@
{
  TextBody:
  [*
    traverse ( uptbs, Elements, uptb, true/*uptb.StartDate() <= Date::Construct( 2024, 4, 23 )*/ ) {
    traverse ( uptbs, Elements, uptb,
               true
    //           uptb.StartDate() <= Date::Construct( 2024, 5, 8 )
               ) {
      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 );
_Main/BL/Type_WholeShift/Method_IsRoundingOrZeroFilling4.qbl
@@ -10,17 +10,18 @@
  [*
    traverse ( unit, Lane.LaneLeg.Trip, t ) {
      traverse ( t, ProductInTrip, pit, pit.Quantity() > 0.0 ) {
        info( pit.Product_MP().ParentID() );
        // èŽ·å–äº§å“lotsize倍数
        lotsize := 1;
        if ( pit.Product_MP().ParentID().Regex( "缸体" ) ) {
        if ( pit.Product_MP().ParentID().Regex( "ZKG" ) ) {
          lotsize := macroPlan.CylinderBlock();
        } else if ( pit.Product_MP().ParentID().Regex( "缸盖" ) ) {
        } else if ( pit.Product_MP().ParentID().Regex( "ZKM" ) ) {
          lotsize := macroPlan.CylinderHead();
        } else if ( pit.Product_MP().ParentID().Regex( "连杆" ) ) {
        } else if ( pit.Product_MP().ParentID().Regex( "PL" ) ) {
          lotsize := macroPlan.ConnectingRod();
        } else if ( pit.Product_MP().ParentID().Regex( "曲轴" ) ) {
        } else if ( pit.Product_MP().ParentID().Regex( "KW" ) ) {
          lotsize := macroPlan.Crankshaft();
        } else if ( pit.Product_MP().ParentID().Regex( "曲轴" ) ) {
        } else if ( pit.Product_MP().ParentID().Regex( "AGW" ) ) {
          lotsize := macroPlan.BalanceAxis();
        }
        
_Main/BL/Type_WholeShift/Method_ProcessingTimeIntervalIsEqualToOneDay.qbl
@@ -9,7 +9,7 @@
  Description: '处理时间区间等于1天'
  TextBody:
  [*
    if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() or ( uptb.UtilizationPercentage() * uptb.MaximumLoadPercentage() / 100 ) = 100 or uptb.FreeCapacity().HoursAsReal() = 0 ) {
    if ( uptb.UsedCapacity() = uptb.TotalAvailableCapacity() or [Number]( uptb.UtilizationPercentage() * uptb.MaximumLoadPercentage() / 100 ) = 100 or uptb.FreeCapacity().HoursAsReal() = 0 ) {
      debuginfo( "天已经是整班,无需处理(使用产能等于可用产能)" );
    } else if ( uptb.UsedCapacity().HoursAsReal() = 0 ) {
      debuginfo( "天已经是整班,无需处理(使用产能等于0)" );
@@ -27,12 +27,12 @@
        }
        debuginfo( ".........." );             
      }
      //  whetherToFillInZero := false;
      whetherToFillInZero := false;
      if ( whetherToFillInZero ) {
        debuginfo( "执行补零" );
        debuginfo( "开始执行补零------------" );
        this.ZeroCapacityReplenishment( macroPlan, uptb.UsedCapacity().HoursAsReal(), uptb, uptbs ); 
      } else {
        debuginfo( "执行圆整" );
        debuginfo( "开始执行圆整------------" );
        this.CapacityRounding( macroPlan, uptb.TotalAvailableCapacity().HoursAsReal() - ( uptb.UsedCapacity() + uptb.ChangeoverDuration() ).HoursAsReal(), uptb, uptbs );
      }
    } else {
_Main/UI/MacroPlannerWebApp/Component_ApplicationMacroPlanner/Response_MacroPlanner_ContextMenuInterface_mInterfaceProductionSchedulingPla.def
@@ -13,7 +13,7 @@
  {
    Body:
    [*
      InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset );
      InterfaceProductionSchedulingPlanPush::GenerateData( MacroPlan, InterfaceDataset, Number::Random( 0, 1 ) );
      
      WebMessageBox::Success( "推送成功!" );
    *]