lazhen
2025-01-02 20093dec32a0c814f1db43e87c904890fd8a086f
库存更新Dtype逻辑修改
已修改4个文件
17 ■■■■ 文件已修改
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate0.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory#575.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
@@ -7,7 +7,8 @@
  String partno,
  String inventory,
  String fac,
  Number quantitiy
  Number quantitiy,
  String dtype
) as InventoryInterfaceDataDetail
{
  TextBody:
@@ -21,9 +22,9 @@
    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 );
    iidl          := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac and detail.Dtype() = dtype );
    if( isnull( iidl ) ){
      iidl        := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy );
      iidl        := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy, Dtype := dtype );
    }else{
      iidl.Quantity( quantitiy );
    }
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate0.qbl
@@ -14,7 +14,7 @@
  [*
    // 甄兰鸽 Jul-26-2024 (created)
    traverse( scenariomanager, ScenarioMP, smp ){
      MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::Generate( interfaceDataset, date, partno, inventory, fac, quantitiy );
      MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::Generate( interfaceDataset, date, partno, inventory, fac, quantitiy, '' );
    }
  *]
}
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory#575.qbl
@@ -17,8 +17,8 @@
    // 获取指定日期库存接口数据
    //发动机成品库存
    traverse( inventorys, Elements, inventory ){
      iidl              := InventoryInterfaceData::Generate( macroplan, owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() );
      iidl.Dtype( inventory.DType() );
      InventoryInterfaceData::Generate( macroplan, owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total(), inventory.DType() );
    //  iidl.Dtype( inventory.DType() );
    }
  *]
}
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl
@@ -22,11 +22,11 @@
        if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){
          inventoryname := inventory.LineType();
        }
        InventoryInterfaceData::Generate( macroPlan, 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( macroPlan, 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(), inventory.DType() );
      }
    }
  *]