Index: WSimpl/Halux/AAP/AfdrukService.cls.xml =================================================================== diff -u -r60749 -r74853 --- WSimpl/Halux/AAP/AfdrukService.cls.xml (.../AfdrukService.cls.xml) (revision 60749) +++ WSimpl/Halux/AAP/AfdrukService.cls.xml (.../AfdrukService.cls.xml) (revision 74853) @@ -23,8 +23,43 @@ 1 + +APPS.Halux.common.impl.BatchService +1 + + + +APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.PrinterFactory +1 + + + +APPS.Halux.common.impl.SequentieService +1 + + + +APPS.Halux.PPS.Activiteit.impl.TAOR.Verpakking.KlantEtiketWerklijstItemMaker +1 + + + +APPS.Halux.PPS.Activiteit.impl.TAOR.LijstVerwerkers.KlantEtiketten +1 + + + +CHUI.Prod.ProductLabel +1 + + + +DOM.common.ProjectSettingsAPI +1 + + -DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",DocsV1:BL.PPS.TBX.DocsV1="",EtiketAfdrukkenHelper:WSimpl.Halux.AAP.AfdrukService.EtiketAfdrukkenHelper +DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",DocsV1:BL.PPS.TBX.DocsV1="",EtiketAfdrukkenHelper:WSimpl.Halux.AAP.AfdrukService.EtiketAfdrukkenHelper,BatchService:APPS.Halux.common.impl.BatchService="",PrinterFactory:APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.PrinterFactory="",SequentieService:APPS.Halux.common.impl.SequentieService="",WerklijstItemMaker:APPS.Halux.PPS.Activiteit.impl.TAOR.Verpakking.KlantEtiketWerklijstItemMaker="",Verwerker:APPS.Halux.PPS.Activiteit.impl.TAOR.LijstVerwerkers.KlantEtiketten="",ProductLabel:CHUI.Prod.ProductLabel="",ProjectSettingsAPI:DOM.common.ProjectSettingsAPI="" 1 1 %Status @@ -33,6 +68,13 @@ Set ..DnaCodeRepository = $$$Inject(DnaCodeRepository, ##class(DOM.Halux.AAP.DnaCodeRepository).%New()) Set ..DocsV1 = $$$Inject(DocsV1, ##class(BL.PPS.TBX.DocsV1).%New()) Set ..EtiketAfdrukkenHelper = $$$Inject(EtiketAfdrukkenHelper, ##class(WSimpl.Halux.AAP.AfdrukService.EtiketAfdrukkenHelper).%New()) + Set ..BatchService = $$$Inject(BatchService, ##class(APPS.Halux.common.impl.BatchService).%New()) + Set ..PrinterFactory = $$$Inject(PrinterFactory, ##class(APPS.Halux.PPS.impl.AansturingActie.common.KlantEtiket.PrinterFactory).%New()) + Set ..SequentieService = $$$Inject(SequentieService, ##class(APPS.Halux.common.impl.SequentieService).%New()) + Set ..WerklijstItemMaker = WerklijstItemMaker + Set ..Verwerker = Verwerker + Set ..ProductLabel = $$$Inject(ProductLabel, ##class(CHUI.Prod.ProductLabel).%New()) + Set ..ProjectSettingsAPI = $$$Inject(ProjectSettingsAPI, ##class(DOM.DomeinContext).Instance().GeefProjectSettingsAPI()) Quit $$$OK ]]> @@ -50,16 +92,33 @@ } #dim DnaCodeIterator As TECH.Iterator = ..EtiketAfdrukkenHelper.MaakDnaCodeIteratorVanDnaCodeStringLijst(ProboxEtiketAfdrukkenRequest.DnaCodes) - #dim DnaCode As TECH.Iterator = DnaCodeIterator.Next() - Do DnaCodeIterator.Reset() + #dim DnaCode As DOM.Halux.AAP.DnaCode = DnaCodeIterator.Next() - #dim TeGebruikenPrinter = ..EtiketAfdrukkenHelper.MapProductieLijnOpPrinter(..EtiketAfdrukkenHelper.GeefWerkpost(DnaCode)) + #dim TeGebruikenPrinter = "" + If $$$HasLength(ProboxEtiketAfdrukkenRequest.LijnWaaropGeprintMoetWorden) { + Set TeGebruikenPrinter = ..EtiketAfdrukkenHelper.MapLijnOpPrinter(ProboxEtiketAfdrukkenRequest.LijnWaaropGeprintMoetWorden) + } Else { + Set TeGebruikenPrinter = ..EtiketAfdrukkenHelper.MapWerkpostOpPrinter(..EtiketAfdrukkenHelper.GeefWerkpost(DnaCode)) + + If (TeGebruikenPrinter = "Halux_LadeAfw_BWK") { + Set TeGebruikenPrinter = ..EtiketAfdrukkenHelper.VervangPrinterDoorLijnPrinter(TeGebruikenPrinter, DnaCode) + } + } + Do DnaCodeIterator.Reset() + If TeGebruikenPrinter = "" { Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Geen printer gevonden voor DnaCode '"_DnaCode.DnaCode_"'")) } + Do ..DocsV1.Init(,"",TeGebruikenPrinter,"","") Do ..DocsV1.ProboxInhoudEtiket(DnaCodeIterator) + + Do DnaCodeIterator.Reset() + + #dim KlantId As TECH.String = DnaCode.KlantNummer + Set Klant = ##class(DOM.VKP.enu.Klant.AutoComplete).%New() + Set Response.Header.Status = "200" } Catch { #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() @@ -80,33 +139,20 @@ If ProductEtiketAfdrukkenRequest.DnaCodes.Count() = 0 { Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.InvalidInputException).%New("Geen DnaCodes aangeleverd om af te drukken")) } - #dim DnaCodeIterator As TECH.Iterator = ..EtiketAfdrukkenHelper.MaakDnaCodeIteratorVanDnaCodeStringLijst(ProductEtiketAfdrukkenRequest.DnaCodes) - #dim DnaCode As TECH.Iterator = DnaCodeIterator.Next() - Do DnaCodeIterator.Reset() - #dim TeGebruikenPrinter = ..EtiketAfdrukkenHelper.MapProductieLijnOpPrinter(..EtiketAfdrukkenHelper.GeefWerkpost(DnaCode)) - - If TeGebruikenPrinter = "" { - Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Geen printer gevonden voor DnaCode '"_DnaCode.DnaCode_"'")) - } - - - // TODO iplementatie + #dim DnaCodeIterator As TECH.Iterator = ..EtiketAfdrukkenHelper.MaakDnaCodeIteratorVanDnaCodeStringLijst(ProductEtiketAfdrukkenRequest.DnaCodes) + While DnaCodeIterator.HasNext() { #dim DnaCodeInfo As DOM.Halux.AAP.DnaCode = DnaCodeIterator.Next() - //Set PRNr = DnaCodeInfo.ProductNummer - - //Do ##class(CHUI.Prod.ProductLabel).DoOne(DnaCodeInfo.ProductNummer) //PRNr - //Do ##class(CHUI.Prod.ProductLabel).PrintProductEtiketMetDnaCode(DnaCodeInfo) //PRNr + Do ..ProductLabel.PrintMaatwerkMetDnaCodes(DnaCodeInfo) } - + Set Response.Header.Status = "200" } Catch { #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() Set Response.Header.Status = Exception.GeefExceptionCode() Set Response.Header.Omschrijving = Exception.GeefOmschrijving() } - Quit Response ]]> @@ -126,23 +172,9 @@ #dim DnaCode As TECH.Iterator = DnaCodeIterator.Next() Do DnaCodeIterator.Reset() - - //#dim TeGebruikenPrinter = ..EtiketAfdrukkenHelper.MapProductieLijnOpPrinter(..EtiketAfdrukkenHelper.GeefWerkpost(DnaCode)) - //If TeGebruikenPrinter = "" { - // Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Geen printer gevonden voor DnaCode '"_DnaCode.DnaCode_"'")) - //} + Do ..VerwerkKlantEtiketAfdrukken(DnaCodeIterator) - // TODO iplementatie - #dim resultaat = ..VerwerkKlantEtiketAfdrukken(DnaCodeIterator) - - If (resultaat = "") { - Set Response.Header.Status = "200" - } Else { - Set Response.Header.Status = "422" - Set Response.Header.Omschrijving = "resultaat" - } - - + Set Response.Header.Status = "200" } Catch { #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() Set Response.Header.Status = Exception.GeefExceptionCode() @@ -153,21 +185,9 @@ ]]> - -aantalDnaCodes:%Integer -%Boolean - - DnaCodeIterator:TECH.Iterator -%String + +DnaCode:DOM.Halux.AAP.DnaCode +1 +APPS.Halux.common.Batch + + + DnaCodeIterator:TECH.Iterator,KaderdeurDnaCodesLijst:%ListOfDataTypes,MatDnaCodesLijst:%ListOfDataTypes,InpakDnaCodesLijst:%ListOfDataTypes,OnbepaaldDnaCodesLijst:%ListOfDataTypes,ProductOpMaatDnaCodesLijst:%ListOfDataTypes,KastDnaCodesLijst:%ListOfDataTypes,TAORboxDnaCodesLijst:%ListOfDataTypes,MaatwerkDnaCodesLijst:%ListOfDataTypes KaderdeurDnaCodesLijst:%ListOfDataTypes,MatDnaCodesLijst:%ListOfDataTypes,InpakDnaCodesLijst:%ListOfDataTypes,OnbepaaldDnaCodesLijst:%ListOfDataTypes,ProductOpMaatDnaCodesLijst:%ListOfDataTypes,KastDnaCodesLijst:%ListOfDataTypes,TAORboxDnaCodesLijst:%ListOfDataTypes,MaatwerkDnaCodesLijst:%ListOfDataTypes +1 TECH.Iterator IteratorVanDnaCodesIterators:TECH.Iterator +1 %String + + +DnaCodeIterator:TECH.Iterator +1 +APPS.Halux.PPS.dto.UitvoeringInfoLijst + + + + +DnaCode:DOM.Halux.AAP.DnaCode +1 +%Boolean + +