admin
2024-08-28 586d3f703f5dd28c5ab6265338e75028cc8a40af
生产排产计划接口优化
已添加3个文件
已修改3个文件
45 ■■■■ 文件已修改
_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/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/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( "推送成功!" );
    *]