Index: WS/Halux/AAP/RondAfVhossBatch/VhossKastenMetAantallen.cls.xml
===================================================================
diff -u -r62509 -r62517
--- WS/Halux/AAP/RondAfVhossBatch/VhossKastenMetAantallen.cls.xml (.../VhossKastenMetAantallen.cls.xml) (revision 62509)
+++ WS/Halux/AAP/RondAfVhossBatch/VhossKastenMetAantallen.cls.xml (.../VhossKastenMetAantallen.cls.xml) (revision 62517)
@@ -7,11 +7,11 @@
%String
-
+
%String
-
+
%String
Index: vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/RondAfVhossBatch/Test.cls.xml
===================================================================
diff -u
--- vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/RondAfVhossBatch/Test.cls.xml (revision 0)
+++ vhUnitTest/WSimpl/Halux/AAP/DnaCodeService/RondAfVhossBatch/Test.cls.xml (revision 62517)
@@ -0,0 +1,98 @@
+
+
+
+vhUnitTest.TestCase
+
+
+
+
+
+
+
+
+
+
+
+
Index: WSimpl/Halux/AAP/DnaCodeService.cls.xml
===================================================================
diff -u -r62509 -r62517
--- WSimpl/Halux/AAP/DnaCodeService.cls.xml (.../DnaCodeService.cls.xml) (revision 62509)
+++ WSimpl/Halux/AAP/DnaCodeService.cls.xml (.../DnaCodeService.cls.xml) (revision 62517)
@@ -63,8 +63,13 @@
1
+
+APPS.Halux.common.impl.SequentieService
+1
+
+
-DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",PalletCodeValidator:WSimpl.Halux.AAP.DnaCodeService.PalletCodeValidator="",InventarisService:APPS.MAG.Inventaris.impl.InventarisService,DocsV1:BL.PPS.TBX.DocsV1="",UGLYPickingWrapper:WSimpl.Halux.AAP.DnaCodeService.UGLYPickingWrapper="",KlantinstellingenRepository:DOM.Halux.AAP.KlantinstellingenRepository="",VerkoopAPI:DOM.VKP.VerkoopAPI="",AantalGescandeVhossSequentieItemsBepaler:WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler="",DnaCodeInVhossKastBepaler:WSimpl.Halux.AAP.DnaCodeService.DnaCodeInVhossKastBepaler=""
+DnaCodeRepository:DOM.Halux.AAP.DnaCodeRepository="",PalletCodeValidator:WSimpl.Halux.AAP.DnaCodeService.PalletCodeValidator="",InventarisService:APPS.MAG.Inventaris.impl.InventarisService,DocsV1:BL.PPS.TBX.DocsV1="",UGLYPickingWrapper:WSimpl.Halux.AAP.DnaCodeService.UGLYPickingWrapper="",KlantinstellingenRepository:DOM.Halux.AAP.KlantinstellingenRepository="",VerkoopAPI:DOM.VKP.VerkoopAPI="",AantalGescandeVhossSequentieItemsBepaler:WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler="",DnaCodeInVhossKastBepaler:WSimpl.Halux.AAP.DnaCodeService.DnaCodeInVhossKastBepaler="",SequentieService:APPS.Halux.common.impl.SequentieService=""
1
1
%Status
@@ -81,6 +86,7 @@
Set ..AantalGescandeVhossSequentieItemsBepaler = $$$Inject(AantalGescandeVhossSequentieItemsBepaler,##class(WSimpl.Halux.AAP.DnaCodeService.AantalGescandeVhossSequentieItemsBepaler).%New())
Set ..DnaCodeInVhossKastBepaler = $$$Inject(DnaCodeInVhossKastBepaler,##class(WSimpl.Halux.AAP.DnaCodeService.DnaCodeInVhossKastBepaler).%New())
Set ..VerzendDirectControleur = ##class(BL.MB.UGLYPicking.VerzendDirectControleur).%New()
+ Set ..SequentieService = $$$Inject(SequentieService,##class(APPS.Halux.common.impl.SequentieService).%New())
Quit $$$OK
]]>
@@ -746,12 +752,57 @@
Try {
Set Response = ##class(WS.Halux.AAP.RondAfVhossBatchResponse).%New()
+ #dim DnaCodeViaBatchIterator As TECH.Iterator = ..DnaCodeRepository.ZoekViaBatchId(RondAfVhossBatchRequest.BatchId)
+ #dim DnaCodeTemp As DOM.Halux.AAP.DnaCode
+
+ Set AantallenPerVhoss = ##class(TECH.FrequentieTabel).%New()
+ Set AantallenGescandPerVhoss = ##class(TECH.FrequentieTabel).%New()
+ Set DnaCodeTemp = DnaCodeViaBatchIterator.Next()
+ If ##class(TECH.StringUtils).StartsWith(DnaCodeTemp.DnaCode,"T") {
+ } Else {
+ #dim ProductieSequentie As APPS.Halux.common.ProductieSequentie = ..SequentieService.GeefProductieSequentie(RondAfVhossBatchRequest.BatchId)
+ }
+ Set DnaCodeViaBatchIterator = ..DnaCodeRepository.ZoekViaBatchId(RondAfVhossBatchRequest.BatchId)
+
+ While DnaCodeViaBatchIterator.HasNext() {
+ Set DnaCodeTemp = DnaCodeViaBatchIterator.Next()
+ #dim ProductieItem As APPS.Halux.common.VHOSSProductieSequentieItem = ProductieSequentie.GeefVHOSSProductieSequentieItemViaSequentieNummer(DnaCodeTemp.SequentieNummer)
+
+ If $$$HasLength(DnaCodeTemp.ScanTijdstip) {
+ Do AantallenGescandPerVhoss.Verhoog(DnaCodeTemp.PalletCode)
+ Do AantallenPerVhoss.Verhoog(DnaCodeTemp.PalletCode)
+ } Else {
+ If ##class(TECH.StringUtils).StartsWith(DnaCodeTemp.DnaCode,"T") {
+ } Else {
+ Do ##class(Tools.Wlip).%New(127).ObjToXML(ProductieItem)
+ Do AantallenPerVhoss.Verhoog(ProductieItem.VHOSSID)
+ }
+ }
+
+ }
+
+ #dim FrequentieItemIterator As TECH.ListIterator = AantallenPerVhoss.GeefItemIterator()
+ While FrequentieItemIterator.HasNext(){
+ #dim Aantal As %Double = FrequentieItemIterator.Next()
+ Set VhossKastMetAantallen = ##class(WS.Halux.AAP.RondAfVhossBatch.VhossKastenMetAantallen).%New()
+ Set VhossKastMetAantallen.Vhosskast = FrequentieItemIterator.Key()
+ Set VhossKastMetAantallen.AantalLades = Aantal
+ Set VhossKastMetAantallen.AantalLadesGescand = AantallenGescandPerVhoss.GeefFrequentieVanItem(VhossKastMetAantallen.Vhosskast)
+ If $$$Not(VhossKastMetAantallen.AantalLades = VhossKastMetAantallen.AantalLadesGescand) {
+ Do Response.VhossKastenMetAantallen.Insert(VhossKastMetAantallen)
+ }
+ }
+
+ Do ##class(Tools.Wlip).%New(127).String(AantallenPerVhoss.ToString())
+ Do ##class(Tools.Wlip).%New(127).String(AantallenGescandPerVhoss.ToString())
+
Set Response.Header.Status = "200"
} Catch {
#dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch()
+ Do ##class(Tools.Wlip).%New(127).String(Exception.ToString())
Set Response.Header.Status = Exception.GeefExceptionCode()
Set Response.Header.Omschrijving = Exception.GeefOmschrijving()
}