Index: BL/MB/UGLYPicking/General.cls.xml =================================================================== diff -u -r1074 -r5059 --- BL/MB/UGLYPicking/General.cls.xml (.../General.cls.xml) (revision 1074) +++ BL/MB/UGLYPicking/General.cls.xml (.../General.cls.xml) (revision 5059) @@ -74,19 +74,43 @@ ;NON TRANSIT------------------------------------------------------------------------------------ elHandleNonTransit() New RS + If ##class(EWMS.Locations).BestaatLocatie($LI(Location,1),$LI(Location,2),$LI(Location,3),$LI(Location,4)) + { + New LocInfo + Set LocInfo = ##class(EWMS.TransLoc).GetTransLocation($LI(Location,1),$LI(Location,2),$LI(Location,3),$LI(Location,4)) + Set:(LocInfo="") LocInfo = $G(LocID)_$$LCVT^vhLib(Location) + Set Bericht = "De opgegeven locatie "_LocInfo_" bestaat niet." + Do ##class(vhLib.Logger).%New("UglyPicking").Warning("Verplaats pallet",Bericht) + Quit Bericht + } + Set RS=##class(%ResultSet).%New("EWMS.Locations:CheckIfLocationIsEmpty") Do RS.Execute($LI(Location,1),$LI(Location,2),$LI(Location,3),$LI(Location,4)) - - If 'RS.Next() Do Quit "De opgegeven locatie "_$$LCVT^vhLib(Location)_" bestaat niet of is bezet." - . Do RS.%Close() - - If $LL(Location)=4 Do - . Set Location=Location_$LB(RS.Get("LocZ")) - Else If $LI(Location,5)'=RS.Get("LocZ") Do Quit "LocZ stemt niet overeen met opgegeven waarde." - . Do RS.%Close() - - Do RS.%Close() - + + If 'RS.Next(){ + Set LocInfo = ##class(EWMS.TransLoc).GetTransLocation($LI(Location,1),$LI(Location,2),$LI(Location,3),$LI(Location,4)) + Set LocIDInfo = $G(LocID)_$$LCVT^vhLib(Location) + Set:(LocInfo="") LocInfo = LocIDInfo + Set Bericht1 = "De opgegeven locatie "_LocInfo_" is bezet." + Set Bericht2 = $C(13,10)_"Loc_id = "_LocIDInfo_$C(13,10) + Set Bericht2 = Bericht2_"Producten op "_LocInfo_" : "_$C(13,10) + Do RS.%Close() + Set RS = ##class(%ResultSet).%New("EWMS.Inventory:GetProductsOnPallet") + Do RS.Execute(LocID) + While RS.Next() + { + Set Bericht2 = Bericht2_$C(9)_"- ProductID : "_RS.Data("ProductNr")_" (# "_RS.Data("QtyPcs")_" )" + } + Do ##class(vhLib.Logger).%New("UglyPicking").Warning("Verplaats pallet",Bericht1_Bericht2) + Quit Bericht1 + }Else{ + If $LL(Location)=4 { + Set Location=Location_$LB(RS.Get("LocZ")) + }ElseIf $LI(Location,5)'=RS.Get("LocZ") { + Quit "LocZ stemt niet overeen met opgegeven waarde." + } + Do RS.%Close() + } Quit "" ]]> Index: EWMS/Locations.cls.xml =================================================================== diff -u -r2692 -r5059 --- EWMS/Locations.cls.xml (.../Locations.cls.xml) (revision 2692) +++ EWMS/Locations.cls.xml (.../Locations.cls.xml) (revision 5059) @@ -6,6 +6,7 @@ Locations GSQLStorage %Library.Persistent +0 EWMS SQL,NOCREATE @@ -445,6 +446,22 @@ ]]> + +1 +LocM:%Library.String,LocG:%Library.String,LocX:%Library.String,LocY:%Library.String +%Boolean +0) + } + Quit BestaatLocatie +]]> + + %Library.SQLQuery LocID:%Library.String,LocM:%Library.String,LocG:%Library.String,LocX:%Library.String,LocY:%Library.String,LocZ:%Library.String @@ -460,6 +477,19 @@ + +%Library.SQLQuery +LocM:%Library.String,LocG:%Library.String,LocX:%Library.String,LocY:%Library.String +SELECT Count(loc_id) As Aantal +FROM EWMS.Locations +WHERE (loc_m = :LocM) AND + (loc_g = :LocG) AND + (loc_x = :LocX) AND + (loc_y = :LocY) + + + + levert een record terug als de locatie leeg is Index: EWMS/Inventory.cls.xml =================================================================== diff -u -r1074 -r5059 --- EWMS/Inventory.cls.xml (.../Inventory.cls.xml) (revision 1074) +++ EWMS/Inventory.cls.xml (.../Inventory.cls.xml) (revision 5059) @@ -1459,6 +1459,16 @@ + +%Library.SQLQuery +PalletID:%Library.String +SELECT product,qty_pcs +FROM EWMS.Inventory AS Inv +WHERE (loc_id = :PalletID) + + + + %Library.SQLQuery paProductNr:%Library.String