Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Generate ( |
| | | MacroPlan macroplan, |
| | | InterfaceDataset interfaceDataset, |
| | | Date date, |
| | | String partno, |
| | |
| | | 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( ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | // 获取指定日期库存接口数据 |
| | | //发动机成品库存 |
| | | 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() ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeInventory ( |
| | | const MacroPlan macroPlan, |
| | | MacroPlan macroPlan, |
| | | InterfaceDataset interfaceDataset |
| | | ) |
| | | { |
| | |
| | | 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() ); |
| | | } |
| | | } |
| | | *] |
| | |
| | | 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 ); |
| | | } |
| | | } |