| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-30-2024 (created) |
| | | loginfo := maxobject( interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_CustomerDemandPPAIDS_Name(), loginfo.InterfaceDateTime() ); |
| | | loginfo := maxobject( interfaceDataset, InterfaceLoginfo, loginfo, loginfo.Name() = Translations::InterfaceDataset_InventoryReport_Name(), loginfo.InterfaceDateTime() ); |
| | | if( not isnull( loginfo ) ){ |
| | | if( not loginfo.IsShow() ){ |
| | | loginfo.Delete(); |
| | | }else{ |
| | | loginfo.Last( false ); |
| | | } |
| | | interfaceDataset.CustomerDemandPPAIDS( relflush ); |
| | | interfaceDataset.InventoryReport( relflush ); |
| | | } |
| | | nowdate := DateTime::ActualTime(); |
| | | loginfo := interfaceDataset.InterfaceLoginfo( relnew, ExecuteUser := executor |
| | | , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() |
| | | , Name := Translations::InterfaceDataset_InventoryReport_Name() |
| | | , InterfaceDateTime := nowdate |
| | | , Message := '客æ·éæ±ï¼PPA+IDSï¼æ°æ®æ¨é' |
| | | , Message := 'åºåæ¥è¡¨- æ°æ®ä¸å°' |
| | | , Last := true |
| | | , IsShow := false |
| | | , ReturnSuccess := true |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | traverse( macroplan, SalesDemand.astype( Forecast ), forecast ){ |
| | | cd :=interfaceDataset.CustomerDemandPPAIDS( relnew, Product := forecast.ProductID() |
| | | , DemandDate := forecast.StartDate() |
| | | , DemandQty := [Number]forecast.Quantity() |
| | | traverse( macroplan, InventorySummarySource.InventorySummaryReport, report, not report.IsShow() ){ |
| | | traverse( report,InventroySummaryRow, row ){ |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = row.Name() ); |
| | | traverse( row, InventorySummaryCell, cell ){ |
| | | column := cell.InventorySummaryColumn(); |
| | | inventory :=interfaceDataset.InventoryReport( relnew, Category := column.TimeUnit() |
| | | , Generation := product.Generation() |
| | | , MLBMQB := product.MQBMLB() |
| | | , Power := product.Power() |
| | | , Product := product.ID() |
| | | , InventoryDate := column.Period() |
| | | , InventoryEndQty := cell.EndingInventory() |
| | | , InventoryMinQty := cell.MinimumInventory() |
| | | , InventoryMaxQty := cell.MaximumInventory() |
| | | , InventoryAveQty := cell.AverageInventory() |
| | | , FactoryName := row.Unit() |
| | | , VersionName := macroplan.ScenarioName() |
| | | , InterfaceTime := nowdate |
| | | , VersionFlag := versionflag |
| | | ); |
| | | loginfo.CustomerDemandPPAIDS( relinsert, cd ); |
| | | loginfo.InventoryReport( relinsert, inventory ); |
| | | } |
| | | loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) ); |
| | | } |
| | | } |
| | | loginfo.TotalRow( loginfo.InventoryReport( relsize ) ); |
| | | *] |
| | | } |