lazhen
2024-07-26 2f15110a6b35c72d993d7ea46e8a9be9868ddd81
接口数据同步到库存更新页面
已添加3个文件
已修改1个文件
已删除4个文件
111 ■■■■ 文件已修改
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineStockData/Attribute_Date.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineStockData/Attribute_Inventory.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineStockData/Attribute_Product.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MachineStockData/Attribute_Unit.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryInterfaceData/Component_listContextMenuInventoryInterfaceData.def 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormInventoryInterfaceData/Response_listContextMenuInventoryInterfaceData_MenuSynchronizeInventory_OnCl.def 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_InventoryInterfaceData/StaticMethod_Generate.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
Quintiq file version 2.0
#parent: #root
StaticMethod Generate (
  InterfaceDataset interfaceDataset,
  Date date,
  String partno,
  String inventory,
  Number quantitiy
)
{
  TextBody:
  [*
    // ç”„兰鸽 Jul-26-2024 (created)
    iid := selectobject( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date and iid.PartNumber() = partno );
    if( isnull( iid ) ){
      iid := interfaceDataset.InventoryInterfaceData( relnew, Date := date, PartNumber := partno );
    }
    iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory );
    if( isnull( iidl ) ){
      iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Quantity := quantitiy );
    }
  *]
}
_Main/BL/Type_InventoryInterfaceData/StaticMethod_SynchronizeInventory.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
Quintiq file version 2.0
#parent: #root
StaticMethod SynchronizeInventory (
  const MacroPlan macroPlan,
  InterfaceDataset interfaceDataset
)
{
  TextBody:
  [*
    //清空原有的库存更新数据
    //traverse( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date ){
    //  iid.Delete();
    //}
    // èŽ·å–æŒ‡å®šæ—¥æœŸåº“å­˜æŽ¥å£æ•°æ®
    traverse( interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Last()
              and ( loginfo.Name() = Translations::InterfaceDataset_MachineStockData_Name()
                    or loginfo.Name() = Translations::InterfaceDataset_FinishedEngineInventory_Name() ) ){
      //机加库存
      traverse( loginfo, MachineStockData, inventory ){
        InventoryInterfaceData::Generate( interfaceDataset, inventory.DDay(), inventory.MaterialNo(), inventory.LineType(), [Number]inventory.Total() );
      }
      //发动机成品库存
      traverse( loginfo, FinishedEngineInventory, inventory ){
        product    := select( macroPlan, Product_MP, product, product.Notes() = inventory.FourCode() );
        InventoryInterfaceData::Generate( interfaceDataset, inventory.DDay(), product.ID(), inventory.BIPlace(), [Number]inventory.Total() );
      }
    }
  *]
}
_Main/BL/Type_MachineStockData/Attribute_Date.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_MachineStockData/Attribute_Inventory.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_MachineStockData/Attribute_Product.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_MachineStockData/Attribute_Unit.qbl
ÎļþÒÑɾ³ý
_Main/UI/MacroPlannerWebApp/Component_FormInventoryInterfaceData/Component_listContextMenuInventoryInterfaceData.def
@@ -16,6 +16,17 @@
        Title: '测试使用'
      ]
    }
    Component MenuSynchronizeInventory
    {
      #keys: '[415136.0.952610516]'
      BaseType: 'WebMenu'
      Properties:
      [
        Image: 'ARROW_CIRCLE2'
        Taborder: 4
        Title: 'Synchronize inventory'
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_FormInventoryInterfaceData/Response_listContextMenuInventoryInterfaceData_MenuSynchronizeInventory_OnCl.def
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
Quintiq file version 2.0
#parent: listContextMenuInventoryInterfaceData/MenuSynchronizeInventory
Response OnClick () id:Response_listContextMenuInventoryInterfaceData_MenuSynchronizeInventory_OnClick
{
  #keys: '[415136.0.953720206]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMenu_OnClick'
  QuillAction
  {
    Body:
    [*
      InventoryInterfaceData::SynchronizeInventory( MacroPlan, InterfaceDataset );
    *]
    GroupServerCalls: false
  }
}