| | |
| | | sadata := FinishedEngineInventory::GenerateData( loginfo, cnv2, item ); |
| | | sadatalist.Add( sadata ); |
| | | } |
| | | |
| | | options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets. |
| | | options := DatasetFindOptions::Construct( 'ScenarioManager' );//.IncludeOffline( true ); //to load we must search offline datasets. |
| | | mdskey := DatasetController::FindUnique( options ); |
| | | |
| | | MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::SynchronizeInventory( owner, sadatalist ); |
| | | MDSScenarioManager::Root( mdskey ) -> ( scenariomanager ) { |
| | | traverse( scenariomanager, ScenarioMP, smp ){ |
| | | MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::SynchronizeInventory( owner, sadatalist ); |
| | | } |
| | | } |
| | | // 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 Generate ( |
| | | ScenarioManager scenariomanager, |
| | | InterfaceDataset interfaceDataset, |
| | | Date date, |
| | | String partno, |
| | | String inventory, |
| | | String fac, |
| | | Number quantitiy |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-26-2024 (created) |
| | | traverse( scenariomanager, ScenarioMP, smp ){ |
| | | MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::Generate( interfaceDataset, date, partno, inventory, fac, quantitiy ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | daycells := selectset( row, InventorySummaryCell, cell, cell.InventorySummaryColumn().TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | cell.InventorySummaryColumn().StartDate() >= column.StartDate() and |
| | | cell.InventorySummaryColumn().StartDate() <= column.EndaDate() ); |
| | | |
| | | endinginventory := maxobject( daycells, Elements, e, e.InventorySummaryColumn().StartDate() ).EndingInventory(); |
| | | minimuminventory := min( daycells, Elements, e, e.MinimumInventory() ); |
| | | maximuminventory := max( daycells, Elements, e, e.MaximumInventory() ); |
| | | averageinventory := [Number]average( daycells, Elements, e, e.AverageInventory() ); |
| | | |
| | | showcell := column.InventorySummaryCell( relnew, EndingInventory := endinginventory, MinimumInventory := minimuminventory, MaximumInventory := maximuminventory, AverageInventory := averageinventory ); |
| | | showrow.InventorySummaryCell( relinsert, showcell ); |
| | | |
| | | sumcell.EndingInventory( sumcell.EndingInventory() + endinginventory ); |
| | | sumcell.MinimumInventory( sumcell.MinimumInventory() + minimuminventory ); |
| | | sumcell.MaximumInventory( sumcell.MaximumInventory() + maximuminventory); |
| | | sumcell.AverageInventory( sumcell.AverageInventory() + averageinventory ); |
| | | if( daycells.Size() > 0 ){ |
| | | endinginventory := maxobject( daycells, Elements, e, e.InventorySummaryColumn().StartDate() ).EndingInventory(); |
| | | minimuminventory := min( daycells, Elements, e, e.MinimumInventory() ); |
| | | maximuminventory := max( daycells, Elements, e, e.MaximumInventory() ); |
| | | averageinventory := [Number]average( daycells, Elements, e, e.AverageInventory() ); |
| | | |
| | | showcell := column.InventorySummaryCell( relnew, EndingInventory := endinginventory, MinimumInventory := minimuminventory, MaximumInventory := maximuminventory, AverageInventory := averageinventory ); |
| | | showrow.InventorySummaryCell( relinsert, showcell ); |
| | | |
| | | sumcell.EndingInventory( sumcell.EndingInventory() + endinginventory ); |
| | | sumcell.MinimumInventory( sumcell.MinimumInventory() + minimuminventory ); |
| | | sumcell.MaximumInventory( sumcell.MaximumInventory() + maximuminventory); |
| | | sumcell.AverageInventory( sumcell.AverageInventory() + averageinventory ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){ |
| | | inventoryname := inventory.LineType(); |
| | | } |
| | | options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets. |
| | | |
| | | options := DatasetFindOptions::Construct( 'ScenarioManager' );//.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() ); |
| | | MDSScenarioManager::Root( mdskey ) -> 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 ); |
| | | } |
| | | } |