Index: APPS/Halux/PPS/Document/impl/common/BatchNaarObjective.cls.xml
===================================================================
diff -u -r71827 -r74859
--- APPS/Halux/PPS/Document/impl/common/BatchNaarObjective.cls.xml (.../BatchNaarObjective.cls.xml) (revision 71827)
+++ APPS/Halux/PPS/Document/impl/common/BatchNaarObjective.cls.xml (.../BatchNaarObjective.cls.xml) (revision 74859)
@@ -30,6 +30,34 @@
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
@@ -42,6 +70,7 @@
Set ..MESService = ##class(APPS.Halux.PPS.MES.MESService).%New()
Set ..Logger = ##class(vhLib.Logger).%New("APPS.Halux.PPS.Document.impl.LBX.BatchNaarObjective")
Set ..MailApi = $$$Inject(MailApi, ##class(TECH.Context).Instance().GeefMailAPI())
+ Set ..BatchPitchExportedRepository = ##class(APPS.Halux.Planning.Pitching.impl.BatchPitchExportedRepository).%New()
Quit $$$OK
]]>
@@ -55,21 +84,43 @@
-Lijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst
+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
+UitvoeringInfoLijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst,SuffixId:%String,UitvoeringLijstNummer:%Integer,FilterToeleveringId:%String=""
%ListOfObjects
ELEMENTTYPE="APPS.Halux.PPS.Document.impl.common.BatchNaarObjective.dto.BatchNaarObjectiveData"
-Batch:APPS.Halux.common.Batch,UitvoeringInfoLijstIterator:TECH.Iterator
+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, 1)
+ #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().GeefID()
+ 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
+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
]]>
-
-AantalLades:%Integer,BatchId:%String,UitvoeringInfoLijst:APPS.Halux.PPS.dto.UitvoeringInfoLijst,ToeleveringId:%String=""
+
+ToeleveringId:%String,UitvoeringInfoLijstIterator:TECH.Iterator
1
-%Boolean
+%Integer
AantalLadesToegestaan) {
- #dim ErrorBoodschap As %String = "Batch '" _ BatchId _ "'"
- Set:($$$Not(..BevatBatchVhoss(UitvoeringInfoLijst))) ErrorBoodschap = ErrorBoodschap _ " voor toelevering '" _ ToeleveringId _ "' "
- Set ErrorBoodschap = ErrorBoodschap _ "kan niet doorgestuurd worden naar Objective, want deze bevat '" _ AantalLades _ "' lades. Dit is meer dan het toegelaten maximum aantal lades ('" _ AantalLadesToegestaan _ "')."
-
- Set Exception = ##class(TECH.Exceptions.IllegalArgumentException).%New(ErrorBoodschap)
- Do ..Logger.ErrorMail("VerifieerIsAantalLadesToegestaan", Exception.GeefErrorInformatie())
- Do ..ZendMailNaarHalux(Exception.GeefErrorInformatie())
-
- Set IsToegestaan = $$$False
+ Do UitvoeringInfoLijstIterator.Reset()
+ While (UitvoeringInfoLijstIterator.HasNext()) {
+ #dim UitvoeringInfo As APPS.Halux.PPS.Activiteit.impl.common.dto.BatchNaarObjectiveUitvoeringInfo = UitvoeringInfoLijstIterator.Next()
+ If (UitvoeringInfo.ToeleveringID = ToeleveringId) {
+ Set AantalLades = AantalLades + 1
+ }
}
+ Do UitvoeringInfoLijstIterator.Reset()
- Quit IsToegestaan
+ Quit AantalLades
]]>
@@ -200,36 +286,37 @@
BatchDataLijst:%ListOfObjects
1
-BatchId:%String,Index:%Integer,Extensie:TECH.String
+BatchId:%String,BatchIndex:%Integer,Extensie:TECH.String
1
TECH.String
@@ -253,27 +340,64 @@
]]>
-
-Inhoud:%String
+
+1
+ProductId:%String
1
+%Boolean
+
+
+
+ToeleveringID:%String,MaximumAantalLadesProductieOrder:%Integer
+1
-
-1
-ProductId:%String
+
+BatchID:%String,MaximumAantalLadesProductieOrder:%Integer
1
+
+
+
+
+Opties:%ListOfObjects
%Boolean
+