Index: vhDeploy/D20201008xMaakAansturingsActieMVXPickingZijkanten.cls.xml =================================================================== diff -u --- vhDeploy/D20201008xMaakAansturingsActieMVXPickingZijkanten.cls.xml (revision 0) +++ vhDeploy/D20201008xMaakAansturingsActieMVXPickingZijkanten.cls.xml (revision 62444) @@ -0,0 +1,19 @@ + + + +vhDeploy.Deploy + + +%String +Maak aansturingsactie Overzichtbatch voor MVX + + + +1 + + + + + + Index: vhDeploy/Maatwerk/MVX/MaakAansturingActiePickingZijkanten.cls.xml =================================================================== diff -u --- vhDeploy/Maatwerk/MVX/MaakAansturingActiePickingZijkanten.cls.xml (revision 0) +++ vhDeploy/Maatwerk/MVX/MaakAansturingActiePickingZijkanten.cls.xml (revision 62444) @@ -0,0 +1,33 @@ + + + +vhDeploy.Maatwerk.Aansturing + + + +Oproepen vanuit een 'echte' deploy-klasse OF via telnet-command : + Do ##class(vhDeploy.Maatwerk.MVX.MaakAansturingActiePickingZijkanten).VoegToeAansturingsActie() +1 + + + + +Categorie:%String + + + + + + Index: APPS/Halux/PPS/Document/impl/common/LadeZijkantenPickingLijst.cls.xml =================================================================== diff -u -r60899 -r62444 --- APPS/Halux/PPS/Document/impl/common/LadeZijkantenPickingLijst.cls.xml (.../LadeZijkantenPickingLijst.cls.xml) (revision 60899) +++ APPS/Halux/PPS/Document/impl/common/LadeZijkantenPickingLijst.cls.xml (.../LadeZijkantenPickingLijst.cls.xml) (revision 62444) @@ -79,7 +79,7 @@ do ..VoegToeLadeZijkantenUitvoeringInfo(UitvoeringInfoIt.Next(), .RijenLijst) } #dim GesorteerdeLijst As list Of APPS.Halux.common.dto.LadeZijkanten = RijenLijst - If (RijenLijst.Count() > 0) { + If ((RijenLijst.Count() > 0) && $$$Not(..Batch.GeefCategorie() = ##class(APPS.Halux.common.enu.Categorie).Merivobox())) { Set GesorteerdeLijst = ..ZetOpeenvolgendeSequentienummers(RijenLijst) Set GesorteerdeLijst = ..SorteerVolgensLoopvolgordeNr(RijenLijst) Set GesorteerdeLijst = ..SorteerPerVeertig(GesorteerdeLijst) Index: APPS/Halux/PPS/Document/impl/MVX/dto/LadeZijkanten.cls.xml =================================================================== diff -u --- APPS/Halux/PPS/Document/impl/MVX/dto/LadeZijkanten.cls.xml (revision 0) +++ APPS/Halux/PPS/Document/impl/MVX/dto/LadeZijkanten.cls.xml (revision 62444) @@ -0,0 +1,28 @@ + + + +APPS.Halux.common.dto.LadeZijkanten + + +MVX.LadeZijkanten + + + +DOM.PM.enu.MVXZijWandType + + + +%String + + + +%Integer + + + +%String + + + + + Index: APPS/Halux/PPS/Activiteit/impl/MVX/PickingLadeZijkanten.cls.xml =================================================================== diff -u --- APPS/Halux/PPS/Activiteit/impl/MVX/PickingLadeZijkanten.cls.xml (revision 0) +++ APPS/Halux/PPS/Activiteit/impl/MVX/PickingLadeZijkanten.cls.xml (revision 62444) @@ -0,0 +1,74 @@ + + + +APPS.Halux.PPS.Activiteit.ProductieSequentieAwareActiviteit + + +MVXPickingLadeZijkanten + + + +%String +MVXPickingLadeZijkanten + + + +%String +Merivobox picking zijkanten + + + +1 +ActiviteitGroepID:%String +APPS.Halux.PPS.Activiteit.Activiteit + + + + +1 + + + + +APPS.Halux.PPS.dto.SequentieGebaseerdeUitvoeringInfo + + + + +Item:APPS.Halux.common.ProductieSequentieItem + + + + +Item:APPS.Halux.common.ProductieSequentieItem +%Boolean + + + + +%Library.CacheStorage + + + + + Index: APPS/Halux/PPS/DocumentDefinitie/MVX/PickingLadeZijkantenLijst.cls.xml =================================================================== diff -u --- APPS/Halux/PPS/DocumentDefinitie/MVX/PickingLadeZijkantenLijst.cls.xml (revision 0) +++ APPS/Halux/PPS/DocumentDefinitie/MVX/PickingLadeZijkantenLijst.cls.xml (revision 62444) @@ -0,0 +1,31 @@ + + + + +1 +APPS.common.Print.DocumentDefinitieTemplate + + +1 +%String + + + + +1 + + + + + + Index: APPS/Halux/PPS/Document/impl/MVX/LadeZijkanten.cls.xml =================================================================== diff -u --- APPS/Halux/PPS/Document/impl/MVX/LadeZijkanten.cls.xml (revision 0) +++ APPS/Halux/PPS/Document/impl/MVX/LadeZijkanten.cls.xml (revision 62444) @@ -0,0 +1,436 @@ + + + +APPS.Halux.PPS.Document.impl.common.LadeZijkantenPickingLijst + + +%Integer +80000 + + + +%Integer +40 + + + +%String +MVX_LadeZijkantenLijst + + + +%String +MVX pickinglijst zijkanten + + + +%Integer + + + + + + + +1 +1 +%Status +1 + + + + + +1 + + + + +LadeZijkant:APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten +1 + + + + + ((HuidigeKar-1)*..#AantalZijkantenPerKar))) { + Set LadeZijkantData.SequentieNummer = ..GeefVereenvoudigdSequentieNr(LadeZijkantData.SequentieNummer) + Do Rijen.Insert(LadeZijkantData) + } + } + Set TotaleLijst = ..VoegToeRijenAanTotaleLijst(Rijen, TotaleLijst) + + Set HuidigeKar = HuidigeKar + 1 + Set Rijen = ##class(%ListOfObjects).%New() + + Do RijenLijstIterator.Reset() + } + + Quit TotaleLijst +} + +Method SorteerVolgensSequentieNr(RijenLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim GesorteerdeLijst As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim HulpLijst As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim LadeZijkantData As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten + #dim HuidigTeVergelijkenLoopvolgordeNr, Index As %Integer + + For Index = 1:1:RijenLijst.Count() + { + Set LadeZijkantData = RijenLijst.GetAt(Index) + + If HulpLijst.Count() = 0 { + Do HulpLijst.Insert(LadeZijkantData) + Set HuidigTeVergelijkenLoopvolgordeNr = LadeZijkantData.LoopvolgordeNr + } ElseIf ((HuidigTeVergelijkenLoopvolgordeNr = LadeZijkantData.LoopvolgordeNr) && (HulpLijst.Count() < ..#AantalZijkantenPerKar) && ($$$Not(..IsNieuweBladzijde(Index)))) { + Do HulpLijst.Insert(LadeZijkantData) + } Else { + Set HulpLijst = ..SorteerLijstVolgensSequentieNummer(HulpLijst) + Set HulpLijst = ..BehoudVerkorteKorttekstEnkelVoorEersteProduct(HulpLijst) + Set GesorteerdeLijst = ..VoegToeRijenAanTotaleLijst(HulpLijst, GesorteerdeLijst) + + Do HulpLijst.Clear() + Do HulpLijst.Insert(LadeZijkantData) + + Set HuidigTeVergelijkenLoopvolgordeNr = LadeZijkantData.LoopvolgordeNr + } + } + Set HulpLijst = ..SorteerLijstVolgensSequentieNummer(HulpLijst) + Set HulpLijst = ..BehoudVerkorteKorttekstEnkelVoorEersteProduct(HulpLijst) + Set GesorteerdeLijst = ..VoegToeRijenAanTotaleLijst(HulpLijst, GesorteerdeLijst) + Quit GesorteerdeLijst +} + +Method SorteerLijstVolgensSequentieNummer(RijenLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + Quit ##class(TECH.Algo.Sort.MergeSort).Sort(RijenLijst, ##class(APPS.Halux.PPS.Document.impl.LBX.LadeZijkanten.SequentienummerComparator).%New()) +} + +Method GroepeerEenBladzijdePerLijstPerKar(RijenLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim Rijen As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim LadeZijkantData As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten + #dim RijenIterator As TECH.Iterator = ##class(TECH.ListIterator).%New(RijenLijst) + #dim TellerAantalProducten,TellerAantalStippelijnen As %Integer = 0 + #dim MagLijnenToevoegen As %Boolean = $$$False + #dim MaximaalAantalWitregels = ..AantalBeschrijfbareRegelsOpDocument - ..#AantalZijkantenPerKar + #dim IsLadeToegevoegd As %Boolean = $$$False + + while RijenIterator.HasNext() { + Set LadeZijkantData = RijenIterator.Next() + Set IsLadeToegevoegd = $$$False + + If ($Extract(LadeZijkantData.SequentieNummer, 1,2) = "--") { + Set TellerAantalStippelijnen = TellerAantalStippelijnen +1 + If (TellerAantalProducten = ..#AantalZijkantenPerKar) { + //Deze conditie voorkomt dat een extra pagina wordt afgedrukt met enkel en alleen een stippelijn op + If (($$$Not((..AantalBeschrijfbareRegelsOpDocument - ##class(TECH.Math).Abs(MaximaalAantalWitregels-TellerAantalStippelijnen)) = (..AantalBeschrijfbareRegelsOpDocument - 1))) || (TellerAantalStippelijnen = (MaximaalAantalWitregels - 1))) { + Do Rijen.Insert(LadeZijkantData) + } + Set IsLadeToegevoegd = $$$True + If TellerAantalStippelijnen <= MaximaalAantalWitregels { + Set Rijen = ..VoegToeAantalLegeLijnen(MaximaalAantalWitregels-TellerAantalStippelijnen, Rijen) + } Else { + Set Rijen = ..VoegToeAantalLegeLijnen(..AantalBeschrijfbareRegelsOpDocument - ##class(TECH.Math).Abs(MaximaalAantalWitregels-TellerAantalStippelijnen), Rijen) + } + Set MagLijnenToevoegen = $$$False + Set TellerAantalStippelijnen = 0 + Set TellerAantalProducten = 0 + } + + If $$$Not(IsLadeToegevoegd) { + Do Rijen.Insert(LadeZijkantData) + } + + } Else { + Do Rijen.Insert(LadeZijkantData) + Set TellerAantalProducten = TellerAantalProducten +1 + } + } + Quit Rijen +} + +Method BehoudVerkorteKorttekstEnkelVoorEersteProduct(RijenLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim Rijen As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim LadeZijkantData As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten + #dim IsEersteProductVanReeks = $$$True + #dim RijenIterator As TECH.Iterator = ##class(TECH.ListIterator).%New(RijenLijst) + #dim HuidigTeVergelijkenLadeZijkantType As %String + + If $$$Not(..IsFureAMesureProduct(RijenLijst.GetAt(1))) { + while RijenIterator.HasNext() { + Set LadeZijkantData = RijenIterator.Next() + If IsEersteProductVanReeks { + Set LadeZijkantData.Korttekst = ..GeefVerkorteKorttekst(LadeZijkantData.Korttekst) + Set HuidigTeVergelijkenLadeZijkantType = LadeZijkantData.Type + } Else { + Set LadeZijkantData.Korttekst="" + If (LadeZijkantData.Type = HuidigTeVergelijkenLadeZijkantType) { + Set LadeZijkantData = ..ZetLegeVeldenLadezijkant(LadeZijkantData, $$$False) + } Else { + Set LadeZijkantData = ..ZetLegeVeldenLadezijkant(LadeZijkantData, $$$True) + Set HuidigTeVergelijkenLadeZijkantType = LadeZijkantData.Type + } + + } + Set IsEersteProductVanReeks = $$$False + Do Rijen.Insert(LadeZijkantData) + } + Do Rijen.Insert(..GeefLijnVolStippelijnen()) + } Else { + Set Rijen = ..GeefVerkorteKorttekstVoorFureAMesureProducten(.RijenLijst) + } + Quit Rijen +} + +Method ZetLegeVeldenLadezijkant(LadeZijkant As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten, IsAnderSoortZijwandType As %Boolean) As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten [ Private ] +{ + Set LadeZijkant.LadeKleur = "" + Set LadeZijkant.LadeDiepte = "" + Set LadeZijkant.LadeHoogte = "" + + If $$$Not(IsAnderSoortZijwandType) { + Set LadeZijkant.Type = "" + } + + Quit LadeZijkant +} + +Method GeefVerkorteKorttekstVoorFureAMesureProducten(RijenLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim Rijen As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim TotaleLijst As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = ##class(%ListOfObjects).%New() + #dim LadeZijkantData As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten + #dim IsEersteProductVanReeks = $$$True + #dim RijenIterator As TECH.Iterator = ##class(TECH.ListIterator).%New(RijenLijst) + #dim KorttekstVorigProductVanLijst As %String + #dim HuidigTeVergelijkenLadeZijkantType As %String + + while RijenIterator.HasNext() { + Set LadeZijkantData = RijenIterator.Next() + If IsEersteProductVanReeks { + Set KorttekstVorigProductVanLijst = LadeZijkantData.Korttekst + Set LadeZijkantData.Korttekst = ..GeefVerkorteKorttekst(LadeZijkantData.Korttekst) + Set HuidigTeVergelijkenLadeZijkantType = LadeZijkantData.Type + } ElseIf (KorttekstVorigProductVanLijst = LadeZijkantData.Korttekst) { + Set LadeZijkantData.Korttekst="" + If (LadeZijkantData.Type = HuidigTeVergelijkenLadeZijkantType) { + Set LadeZijkantData = ..ZetLegeVeldenLadezijkant(LadeZijkantData, $$$False) + } Else { + Set LadeZijkantData = ..ZetLegeVeldenLadezijkant(LadeZijkantData, $$$True) + Set HuidigTeVergelijkenLadeZijkantType = LadeZijkantData.Type + } + } Else { + Do Rijen.Insert(..GeefLijnVolStippelijnen()) + Do ..VoegToeRijenAanTotaleLijst(Rijen, TotaleLijst) + Set Rijen = ##class(%ListOfObjects).%New() + Set KorttekstVorigProductVanLijst = LadeZijkantData.Korttekst + Set LadeZijkantData.Korttekst = ..GeefVerkorteKorttekst(LadeZijkantData.Korttekst) + Set HuidigTeVergelijkenLadeZijkantType = LadeZijkantData.Type + } + Set IsEersteProductVanReeks = $$$False + Do Rijen.Insert(LadeZijkantData) + } + Do Rijen.Insert(..GeefLijnVolStippelijnen()) + Do ..VoegToeRijenAanTotaleLijst(Rijen, TotaleLijst) + + Quit TotaleLijst +} + +Method GeefVerkorteKorttekst(Korttekst As %String) As %String [ Private ] +{ + #dim VerkorteKorttekst As %String = $Extract(Korttekst, 1, 7) + + If (##class(TECH.StringUtils).Contains(Korttekst, "R+L")) { + Set VerkorteKorttekst = VerkorteKorttekst_" R+L" + } + Quit VerkorteKorttekst +} + +Method VoegToeRijenAanTotaleLijst(Rijen As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten"), TotaleLijst As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim RijenIterator As TECH.Iterator = ##class(TECH.ListIterator).%New(Rijen) + + while RijenIterator.HasNext() { + Do TotaleLijst.Insert(RijenIterator.Next()) + } + Quit TotaleLijst +} + +Method VoegToeAantalLegeLijnen(AantalRijen As %Integer, Rijen As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten")) As %ListOfObjects(ELEMENTTYPE="APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten") [ Private ] +{ + #dim RijenLijst As List of APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten = Rijen + #dim AantalLegeLijnen As %Integer + + If AantalRijen = (..AantalBeschrijfbareRegelsOpDocument-1) { + Set AantalRijen = 0 + } + + For AantalLegeLijnen = 1:1:AantalRijen + { + Do RijenLijst.Insert(##class(APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten).%New()) + } + Quit RijenLijst +} + +Method GeefLijnVolStippelijnen() As APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten +{ + Set ObjectGevuldMetStippelijn = ##class(APPS.Halux.PPS.Document.impl.MVX.dto.LadeZijkanten).%New() + + Set ObjectGevuldMetStippelijn.SequentieNummer = "--------" + Set ObjectGevuldMetStippelijn.LadeKleur = "--------" + Set ObjectGevuldMetStippelijn.LadeHoogte = "--------" + Set ObjectGevuldMetStippelijn.LadeDiepte = "--------" + Set ObjectGevuldMetStippelijn.Type = "--------" + Set ObjectGevuldMetStippelijn.Korttekst = "---------------" + Set ObjectGevuldMetStippelijn.ToeleveringDossierCode = "-----------" + + Quit ObjectGevuldMetStippelijn +} + +Method GeefLoopVolgordeNr(ProductId As %String) As %Integer [ Private ] +{ + #dim LoopvolgordeNrHuidigProduct As %Integer = 0 + + Try { + #dim LoopvolgordeNrHuidigProductIterator = ..LadeZijkantenRepository.ZoekLoopvolgordeNrViaProductId(ProductId) + Set LoopvolgordeNrHuidigProduct = LoopvolgordeNrHuidigProductIterator.Next().LoopvolgordeNr + } Catch { + #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() + #dim Logger = ##class(vhLib.Logger).%New("PICKING ZIJKANT MVX").WarningMail("Product met ProductId "_ProductId_" werd niet gevonden in de MVXPickingZijkantenLoopvolgorde tabel") + Do ..VerstuurWarningMail(ProductId) + } + + Quit LoopvolgordeNrHuidigProduct +} + +Method GeefVereenvoudigdSequentieNr(SequentieNr As %Integer) As %Integer [ Private ] +{ + #dim NieuwSequentieNr = SequentieNr # ..#AantalZijkantenPerKar + If $$$Not(NieuwSequentieNr = 0) { + Set SequentieNr = NieuwSequentieNr + } + If ((NieuwSequentieNr = 0) && (SequentieNr > ..#AantalZijkantenPerKar)) { + Set SequentieNr = ..#AantalZijkantenPerKar + } + Quit SequentieNr +} + +Method IsNieuweBladzijde(Index As %Integer) As %Boolean [ Private ] +{ + #dim IsNieuweBladzijde as %Boolean = $$$False + If (((Index # ..#AantalZijkantenPerKar) - 1) = 0 && ($$$Not(Index = 1))) + { + Set IsNieuweBladzijde = $$$True + } + Quit IsNieuweBladzijde +} + +Method VerstuurWarningMail(ProductId As %String) [ Private ] +{ + #dim MailTo As %ListOfDataTypes = $listbuild("nathalie.boone@halux.be") + #dim Subject As %String = "MVX Picking Zijkant: Product met ProductId "_ProductId_" werd niet gevonden." + + #dim Body As %String = ##class(%GlobalCharacterStream).%New() + #dim Message As %String = "Product met ProductId "_ProductId_" werd niet gevonden in de databank en werd hierdoor vooraan in de pickinglijst geplaatst. " + Set Message = Message_"Om dit een volgende keer te voorkomen dient het product upgedate te worden in de tabel, momenteel doet ICT dit nog. " + Set Message = Message_"Bezorg hen het productId en de plaats waar het product ligt in de gang." + Do Body.WriteLine(Message) + + Do SendMiniMail^vhLib($$$SystemMail("MVX Pickinglijst Zijkanten"),MailTo,Subject,Body,1,1) + + Quit +} +*/ +]]> + + + + +