lihongji
2024-12-03 77dc40157d7ebff272f55055708cc8d2a1ae71ce
Merge remote-tracking branch 'origin/dev' into dev
已修改4个文件
20 ■■■■ 文件已修改
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory#575.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineStockData/StaticMethod_Synchronize.qbl 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
@@ -1,6 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Generate (
  MacroPlan macroplan,
  InterfaceDataset interfaceDataset,
  Date date,
  String partno,
@@ -16,9 +17,15 @@
    if( isnull( iid ) ){
      iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno );
    }
    product    := selectobject( macroplan, Product_MP, product, product.ID() = partno );
    if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){
      quantitiy   := floor( [Real]quantitiy / 4 );
    }
    iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac );
    if( isnull( iidl ) ){
      iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy );
    }else{
      iidl.Quantity( );
    }
  *]
}
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory#575.qbl
@@ -17,7 +17,7 @@
    // 获取指定日期库存接口数据
    //发动机成品库存
    traverse( inventorys, Elements, inventory ){
      InventoryInterfaceData::Generate( owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() );
      InventoryInterfaceData::Generate( macroplan, owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() );
    }
  *]
}
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl
@@ -1,7 +1,7 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeInventory (
  const MacroPlan macroPlan,
  MacroPlan macroPlan,
  InterfaceDataset interfaceDataset
)
{
@@ -22,11 +22,11 @@
        if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){
          inventoryname := inventory.LineType();
        }
        InventoryInterfaceData::Generate( interfaceDataset, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() );
        InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() );
      }
      //发动机成品库存
      traverse( loginfo, FinishedEngineInventory, inventory ){
        InventoryInterfaceData::Generate( interfaceDataset, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() );
        InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() );
      }
    }
  *]
_Main/BL/Type_MachineStockData/StaticMethod_Synchronize.qbl
@@ -30,7 +30,10 @@
        if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){
          inventoryname := inventory.LineType();
        }
        InventoryInterfaceData::Generate( owner, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() );
        options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets.
        mdskey := DatasetController::FindUnique( options );
        MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::Generate( owner, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() );
    //    sadatalist.Add( sadata );
      }
    }