1 vhLib.Macro APPS.Halux.PPS.Activiteit.impl.UitvoeringInfoLijstVerwerkerBasis DOM.AKP.ToeleveringAPI 1 APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.BatchNaarObjectiveDataGenerator 1 APPS.Halux.PPS.MES.MESService 1 vhLib.Logger 1 TECH.Mail.MailAPI 1 APPS.Halux.Planning.Pitching.impl.BatchPitchExportedRepository 1 %Integer 0 1 %String 1 %Integer 1 1 %Integer 0 1 ToeleveringApi:DOM.AKP.ToeleveringAPI="",BatchNaarObjectiveDataGenerator:APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.BatchNaarObjectiveDataGenerator="",MailApi:TECH.Mail.MailAPI="" 1 1 %Status 1 1 1 APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.BatchNaarObjectiveDataGenerator Lijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst,ActiviteitParameters:APPS.Halux.PPS.Activiteit.ActiviteitParameters,ActieParameters:%ListOfDataTypes="",IsTriggerResetBatch:%Boolean=0 APPS.Halux.PPS.dto.UitvoeringResultaat UitvoeringInfoLijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst,SuffixId:%String,UitvoeringLijstNummer:%Integer,FilterToeleveringId:%String="" %ListOfObjects ELEMENTTYPE="APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.dto.BatchNaarObjectiveData" 0) { #dim BatchId As %String = UitvoeringInfoLijst.GetAt(1).BatchID #dim Batch As APPS.Halux.common.Batch = ##class(APPS.ApplicatieContext).Instance().GeefProductieAPI().GeefBatchService().GeefBatch(BatchId) #dim UitvoeringInfoLijstIterator As TECH.Iterator = ##class(TECH.ListIterator).%New(UitvoeringInfoLijst) #dim CategorTLM As %Boolean = ((Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Tandembox()) ||(Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Legrabox()) ||(Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Merivobox())) If (..MESService.IsActiefVoorMes(Batch.GeefLijn(), MesFaseActief) && CategorTLM) { If (..BevatBatchVhoss(UitvoeringInfoLijst)) { Set BatchDataLijst = ..GeefVhossBatchDataLijst(Batch, UitvoeringInfoLijstIterator, UitvoeringInfoLijst.Size, SuffixId, UitvoeringLijstNummer) } Else { Set BatchDataLijst = ..GeefStandaardBatchDataLijst(Batch, UitvoeringInfoLijstIterator, SuffixId, FilterToeleveringId) } } } Quit BatchDataLijst ]]> Batch:APPS.Halux.common.Batch,UitvoeringInfoLijstIterator:TECH.Iterator,AantalLades:%Integer,SuffixId:%String,UitvoeringLijstNummer:%Integer 1 MaximumAantalLadesProductieOrder) { Do ..ZendMailMaxAantalLadeBatchOverschreden(Batch.GeefID(), MaximumAantalLadesProductieOrder) } Else { #dim ToeleveringenIterator As TECH.Iterator = ..GeefLijstIteratorVanToeleveringenInVolgordeVanSequentieNummer(UitvoeringInfoLijstIterator) #dim ToeleveringId As %String = ToeleveringenIterator.Next() #dim Toelevering As DOM.AKP.Toelevering = ..ToeleveringApi.GeefToelevering(ToeleveringId) #dim BatchData As APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.dto.BatchNaarObjectiveData = ..BatchNaarObjectiveDataGenerator.GenereerDataVoorBatch(Batch, Toelevering, UitvoeringLijstNummer, AantalLades, SuffixId) Set BatchData.GebruikersVelden.Vlag.IsProductionLineFixed = "false" Do ##class(TECH.ListUtils).AppendList(BatchData.Opties, ..BatchNaarObjectiveDataGenerator.GenereerAlgemeneInfoOptiesVoorBatch(Batch)) Do ##class(TECH.ListUtils).AppendList(BatchData.Opties, ..GeefOptiesVoorToelevering(Toelevering, UitvoeringInfoLijstIterator)) While ToeleveringenIterator.HasNext() { Set ToeleveringId = ToeleveringenIterator.Next() Set Toelevering = ..ToeleveringApi.GeefToelevering(ToeleveringId) Do ##class(TECH.ListUtils).AppendList(BatchData.Opties, ..GeefOptiesVoorToelevering(Toelevering, UitvoeringInfoLijstIterator)) Set BatchData.GebruikersVelden.Vlag.IsProductionLineFixed = $Select((BatchData.GebruikersVelden.Vlag.IsProductionLineFixed || ..GeefIsMinstensEenStalenRugFastMover(BatchData.Opties)) : "true", 1:"false") } Do BatchDataLijst.Insert(BatchData) } Quit BatchDataLijst ]]> UitvoeringInfoLijstIterator:TECH.Iterator 1 TECH.Iterator Batch:APPS.Halux.common.Batch,UitvoeringInfoLijstIterator:TECH.Iterator,SuffixId:%String,FilterToeleveringId:%String="" 1 MaximumAantalLadesProductieOrder) { Do ..ZendMailMaxAantalLadesToeleveringOverschreden(ToeleveringId, MaximumAantalLadesProductieOrder) Set Minstens1ToelevMetTeVeelLades = $$$True } ElseIf (AantalLadesInToelevering > 0) { Set ..IndexBestanden = ..IndexBestanden + 1 #dim BatchData As APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.dto.BatchNaarObjectiveData = ..BatchNaarObjectiveDataGenerator.GenereerDataVoorToelevering(Batch, Toelevering, ..IndexBestanden, AantalLadesInToelevering, SuffixId) Do ##class(TECH.ListUtils).AppendList(BatchData.Opties, ..BatchNaarObjectiveDataGenerator.GenereerAlgemeneInfoOptiesVoorToelevering(Toelevering, Batch.GeefCategorie())) Do ##class(TECH.ListUtils).AppendList(BatchData.Opties, ..GeefOptiesVoorToelevering(Toelevering, UitvoeringInfoLijstIterator)) Set BatchData.GebruikersVelden.Vlag.IsProductionLineFixed = $Select(..GeefIsMinstensEenStalenRugFastMover(BatchData.Opties) : "true", 1:"false") Do BatchDataLijst.Insert(BatchData) } } } If (Minstens1ToelevMetTeVeelLades) { Do BatchDataLijst.Clear() } Quit BatchDataLijst ]]> ToeleveringId:%String,UitvoeringInfoLijstIterator:TECH.Iterator 1 %Integer Toelevering:DOM.AKP.Toelevering,UitvoeringInfoLijstIterator:TECH.Iterator 1 BatchDataLijst:%ListOfObjects 1 BatchId:%String,BatchIndex:%Integer,Extensie:TECH.String 1 TECH.String UitvoeringInfoLijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst 1 %Boolean 0) { #dim UitvoeringInfo As APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfo = UitvoeringInfoLijst.GetAt(1) #dim ProductId As %String = UitvoeringInfo.ProductID Set BevatBatchVhoss = ..BevatVhossVerpakking(ProductId) } Quit BevatBatchVhoss ]]> 1 ProductId:%String 1 %Boolean ToeleveringID:%String,MaximumAantalLadesProductieOrder:%Integer 1 BatchID:%String,MaximumAantalLadesProductieOrder:%Integer 1 Opties:%ListOfObjects %Boolean