| | |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | //traverse( macroplan, AssemblyOnlinePlanRow.AssemblyOnlinePlanCell, cell ){ |
| | | // cd :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product := forecast.ProductID() |
| | | // , PlanningDate := forecast.StartDate() |
| | | // , DemandQty := [Number]forecast.Quantity() |
| | | // , VersionName := macroplan.ScenarioName() |
| | | // , InterfaceTime := nowdate |
| | | // , VersionFlag := versionflag |
| | | // ); |
| | | // loginfo.CustomerDemandPPAIDS( relinsert, cd ); |
| | | //} |
| | | traverse( macroplan, AssemblyOnlinePlanColumn, column ){ |
| | | traverse( column, AssemblyOnlinePlanCell, cell, cell.Value() <> '' and cell.AssemblyOnlinePlanRow().RowNr() = '1' ){ |
| | | quantityrow := cell.AssemblyOnlinePlanRow(); |
| | | ordercell := selectobject( column, AssemblyOnlinePlanCell, ocell, ocell.AssemblyOnlinePlanRow().ProductID() = quantityrow.ProductID() |
| | | and ocell.AssemblyOnlinePlanRow().ProductionLine() = quantityrow.ProductionLine() |
| | | and ocell.AssemblyOnlinePlanRow().RowNr() = '2' ); |
| | | |
| | | cd :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product := quantityrow.ProductID() |
| | | , PlanningDate := column.ColumnDate() |
| | | , PlanningQty := [Number]cell.Value() |
| | | , Sequence := ordercell.Value() |
| | | , VersionName := macroplan.ScenarioName() |
| | | , InterfaceTime := nowdate |
| | | , VersionFlag := versionflag |
| | | ); |
| | | loginfo.AssemblyOnlinePlanPPPSPush( relinsert, cd ); |
| | | } |
| | | } |
| | | loginfo.TotalRow( loginfo.AssemblyOnlinePlanPPPSPush( relsize ) ); |
| | | *] |
| | | } |
| | |
| | | cnv2.SetCustomConversion(); |
| | | cnv2.CustomFormatString( 'yyyy-MM-dd' ); |
| | | |
| | | // sadatalist := construct( ShippingActualDatas ); |
| | | sadatalist := construct( FinishedEngineInventorys ); |
| | | for( seq := 0;seq < data.Size();seq++){ |
| | | item := data.Get(seq); |
| | | FinishedEngineInventory::GenerateData( loginfo, cnv2, item ); |
| | | // sadatalist.Add( sadata ); |
| | | sadata := FinishedEngineInventory::GenerateData( loginfo, cnv2, item ); |
| | | sadatalist.Add( sadata ); |
| | | } |
| | | |
| | | options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets. |
| | | mdskey := DatasetController::FindUnique( options ); |
| | | |
| | | MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::SynchronizeInventory( owner, sadatalist ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod SynchronizeInventory ( |
| | | MacroPlan macroplan, |
| | | InterfaceDataset owner, |
| | | const FinishedEngineInventorys inventorys |
| | | ) |
| | | { |
| | | Description: 'å卿ºæååºå' |
| | | TextBody: |
| | | [* |
| | | |
| | | //æ¸
空åæçåºåæ´æ°æ°æ® |
| | | //traverse( interfaceDataset, InventoryInterfaceData, iid, iid.Date() = date ){ |
| | | // iid.Delete(); |
| | | //} |
| | | // è·åæå®æ¥æåºåæ¥å£æ°æ® |
| | | //å卿ºæååºå |
| | | traverse( inventorys, Elements, inventory ){ |
| | | product := select( macroplan, Product_MP, product, product.Notes() = inventory.FourCode() ); |
| | | InventoryInterfaceData::Generate( owner, inventory.DDay(), product.ID(), inventory.BIPlace(), [Number]inventory.Total() ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | |
| | | // sadatalist := construct( ShippingActualDatas ); |
| | | for( seq := 0;seq < data.Size();seq++){ |
| | | item := data.Get(seq); |
| | | MachineStockData::GenerateData( loginfo, cnv2, item ); |
| | | item := data.Get(seq); |
| | | inventory :=MachineStockData::GenerateData( loginfo, cnv2, item ); |
| | | inventoryname := inventory.Lgort(); |
| | | if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){ |
| | | inventoryname := inventory.LineType(); |
| | | } |
| | | InventoryInterfaceData::Generate( owner, inventory.DDay(), inventory.MaterialNo(), inventoryname, [Number]inventory.Total() ); |
| | | // sadatalist.Add( sadata ); |
| | | } |
| | | } |