Index: vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/ZoekAlleVhossLadesBijDnaCode/Test.cls.xml
===================================================================
diff -u
--- vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/ZoekAlleVhossLadesBijDnaCode/Test.cls.xml (revision 0)
+++ vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/ZoekAlleVhossLadesBijDnaCode/Test.cls.xml (revision 61053)
@@ -0,0 +1,88 @@
+
+
+
+vhUnitTest.TestCase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: WSimpl/Halux/AAP/DnaCodeService.cls.xml
===================================================================
diff -u -r61050 -r61053
--- WSimpl/Halux/AAP/DnaCodeService.cls.xml (.../DnaCodeService.cls.xml) (revision 61050)
+++ WSimpl/Halux/AAP/DnaCodeService.cls.xml (.../DnaCodeService.cls.xml) (revision 61053)
@@ -59,7 +59,7 @@
-DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",PalletCodeValidator:WSimpl.Halux.AAP.DnaCodeService.PalletCodeValidator="",InventarisService:APPS.MAG.Inventaris.impl.InventarisService,DocsV1:BL.PPS.TBX.DocsV1="",ProboxEtiketAfdrukkenHelper:WSimpl.Halux.AAP.DnaCodeService.ProboxEtiketAfdrukkenHelper="",UGLYPickingWrapper:WSimpl.Halux.AAP.DnaCodeService.UGLYPickingWrapper="",KlantinstellingenRepository:DOM.Halux.AAP.KlantinstellingenRepository="",VerkoopAPI:DOM.VKP.VerkoopAPI
+DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",PalletCodeValidator:WSimpl.Halux.AAP.DnaCodeService.PalletCodeValidator="",InventarisService:APPS.MAG.Inventaris.impl.InventarisService,DocsV1:BL.PPS.TBX.DocsV1="",ProboxEtiketAfdrukkenHelper:WSimpl.Halux.AAP.DnaCodeService.ProboxEtiketAfdrukkenHelper="",UGLYPickingWrapper:WSimpl.Halux.AAP.DnaCodeService.UGLYPickingWrapper="",KlantinstellingenRepository:DOM.Halux.AAP.KlantinstellingenRepository="",VerkoopAPI:DOM.VKP.VerkoopAPI="",AantalGescandeVhossSequentieItemsBepaler:WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler=""
1
1
%Status
@@ -74,7 +74,7 @@
Set ..UGLYPickingWrapper = $$$Inject(UGLYPickingWrapper, ##class(WSimpl.Halux.AAP.DnaCodeService.UGLYPickingWrapper).%New())
Set ..KlantinstellingenRepository = $$$Inject(KlantinstellingenRepository, ##class(DOM.Halux.AAP.KlantinstellingenRepository).%New())
Set ..VerkoopAPI = $$$Inject(VerkoopAPI, ##class(DOM.VKP.impl.VerkoopAPI).%New())
- Set ..AantalGescandeVhossSequentieItemsBepaler = ##class(WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler).%New()
+ Set ..AantalGescandeVhossSequentieItemsBepaler = $$$Inject(AantalGescandeVhossSequentieItemsBepaler,##class(WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler).%New())
Quit $$$OK
]]>
@@ -139,29 +139,27 @@
Set Response = ##class(WS.Halux.AAP.ZoekAlleVhossLadesBijDnaCodeResponse).%New()
Try {
- #dim PalletCode = ##class(TECH.StringUtils).ToUpper(ZoekAlleVhossLadesBijDnaCode.PalletCode)
#dim DnaCodeIterator As TECH.Iterator
- If $$$HasLength(ZoekAlleVhossLadesBijDnaCode.GuiVhossVolgnummer) {
- #dim AfmeldenResponse As WS.Halux.AAP.DnaCodeAfmeldenResponse
- #dim TempDnaCodeIterator As TECH.Iterator
- Set TempDnaCodeIterator = ..DnaCodeRepository.ZoekViaDnaCode(ZoekAlleVhossLadesBijDnaCode.DnaCode)
- If TempDnaCodeIterator.HasNext() {
- #dim DnaCode As DOM.Halux.AAP.DnaCode = TempDnaCodeIterator.Next()
- Set AfmeldenResponse = ..AantalGescandeVhossSequentieItemsBepaler.BepaalAantalGescandeVhossSequentieItems(DnaCode, ZoekAlleVhossLadesBijDnaCode.GuiVhossVolgnummer)
- Set DnaCodeIterator = ##class(TECH.ListIterator).%New(AfmeldenResponse.DnaCodes)
- }
- } Else {
- Set DnaCodeIterator = ..DnaCodeRepository.ZoekViaPalletCodeEnRecent(PalletCode)
- }
+ #dim AfmeldenResponse As WS.Halux.AAP.DnaCodeAfmeldenResponse
+ #dim TempDnaCodeIterator As TECH.Iterator
+ Set TempDnaCodeIterator = ..DnaCodeRepository.ZoekViaDnaCode(ZoekAlleVhossLadesBijDnaCode.DnaCode)
+ If TempDnaCodeIterator.HasNext() {
+ #dim DnaCode As DOM.Halux.AAP.DnaCode = TempDnaCodeIterator.Next()
+ Set AfmeldenResponse = ..AantalGescandeVhossSequentieItemsBepaler.BepaalAantalGescandeVhossSequentieItems(DnaCode, ZoekAlleVhossLadesBijDnaCode.GuiVhossVolgnummer)
+ Set DnaCodeIterator = ##class(TECH.ListIterator).%New(AfmeldenResponse.DnaCodes)
- If DnaCodeIterator.HasNext() {
- Set Response.Header.Status = "200"
- While DnaCodeIterator.HasNext() {
- Do Response.DnaCodes.Insert(..DnaCodeNaarDto(DnaCodeIterator.Next()))
+ If DnaCodeIterator.HasNext() {
+ Set Response.Header.Status = "200"
+ While DnaCodeIterator.HasNext() {
+ Do Response.DnaCodes.Insert(..DnaCodeNaarDto(DnaCodeIterator.Next()))
+ }
+ } Else {
+ Set Response.Header.Status = ##class(TECH.enu.ExceptionCode).DataNotFound()
+ Set Response.Header.Omschrijving = "Geen Vhoss-data gevonden voor DnaCode '"_ZoekAlleVhossLadesBijDnaCode.DnaCode_"'"
}
} Else {
Set Response.Header.Status = ##class(TECH.enu.ExceptionCode).DataNotFound()
- Set Response.Header.Omschrijving = "Geen data gevonden voor pallet '"_PalletCode_"'"
+ Set Response.Header.Omschrijving = "Geen Vhoss-data gevonden voor DnaCode '"_ZoekAlleVhossLadesBijDnaCode.DnaCode_"'"
}
} Catch {
#dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch()