Index: APPS/MAG/InventarisService.cls.xml
===================================================================
diff -u -r2142 -r2359
--- APPS/MAG/InventarisService.cls.xml (.../InventarisService.cls.xml) (revision 2142)
+++ APPS/MAG/InventarisService.cls.xml (.../InventarisService.cls.xml) (revision 2359)
@@ -253,15 +253,15 @@
If ('##class(EWMS.ToReceive).PalletIsInToReceive(PalletID))
{
- Do ResultSet.Prepare("SELECT rtrim(product) as ProductID, CAST(qty_pcs AS INT) as Aantal, I.loc_m, (SELECT count(1) FROM EWMS.Inventory WHERE loc_id = I.loc_id) as AantalSecties, T.Loc_Trans As LocatieID"
+ Do ResultSet.Prepare("SELECT rtrim(product) as ProductID, CAST(qty_pcs AS INT) as Aantal, I.loc_m, (SELECT count(1) FROM EWMS.Inventory WHERE loc_id = I.loc_id) as AantalSecties, T.Loc_Trans As LocatieID, T.Loc_IsPickbaar As IsPickbaar"
_" FROM EWMS.Inventory I"
_" JOIN EWMS.Locations L ON I.loc_m = L.loc_m and I.loc_id = L.loc_id"
_" LEFT JOIN EWMS.TransLoc T ON T.loc_m = L.loc_m AND T.loc_g = L.loc_g AND T.loc_x = L.loc_x AND T.loc_y = L.loc_y"
_" WHERE I.loc_id = ? AND I.loc_m < 5 AND I.Product <> 'EMPTY'")
}
Else
{
- Do ResultSet.Prepare("SELECT rtrim(product) as ProductID, CAST(qtytoreceive AS INT) as Aantal, I.locm As loc_m, (SELECT count(1) FROM EWMS.ToReceive WHERE loc_id = I.locid) as AantalSecties, T.Loc_Trans As LocatieID"
+ Do ResultSet.Prepare("SELECT rtrim(product) as ProductID, CAST(qtytoreceive AS INT) as Aantal, I.locm As loc_m, (SELECT count(1) FROM EWMS.ToReceive WHERE loc_id = I.locid) as AantalSecties, T.Loc_Trans As LocatieID, T.Loc_IsPickbaar As IsPickbaar"
_" FROM EWMS.ToReceive I"
_" LEFT JOIN EWMS.Locations L ON I.locm = L.loc_m and I.locid = L.loc_id"
_" LEFT JOIN EWMS.TransLoc T ON T.loc_m = L.loc_m AND T.loc_g = L.loc_g AND T.loc_x = L.loc_x AND T.loc_y = L.loc_y"
@@ -275,6 +275,7 @@
Set ProductOpPallet.Aantal = ResultSet.Data("Aantal")
Set ProductOpPallet.PalletID = PalletID
Set ProductOpPallet.LocatieID = ResultSet.Data("LocatieID")
+ Set ProductOpPallet.IsPickbaar = ResultSet.Data("IsPickbaar")
Set ProductOpPallet.MagazijnOmschrijving = ##class(Prod.Product).GetMagViaOpslagzone(ResultSet.Data("loc_m"))
Set ProductOpPallet.AantalSecties = ResultSet.Data("AantalSecties")
Do ProductenOpPallet.Insert(ProductOpPallet)
@@ -303,7 +304,7 @@
Set DataService = ##class(APPS.common.DataService).%New()
Set ResultSet = ##class(%ResultSet).%New()
- Do ResultSet.Prepare("SELECT CAST(qty_pcs AS INT) as Aantal, I.loc_id As PalletID, I.loc_m, (SELECT count(1) FROM EWMS.Inventory WHERE loc_id = I.loc_id GROUP BY loc_id) as AantalSecties, T.Loc_Trans As LocatieID"
+ Do ResultSet.Prepare("SELECT CAST(qty_pcs AS INT) as Aantal, I.loc_id As PalletID, I.loc_m, (SELECT count(1) FROM EWMS.Inventory WHERE loc_id = I.loc_id GROUP BY loc_id) as AantalSecties, T.Loc_Trans As LocatieID, T.Loc_IsPickbaar As IsPickbaar"
_" FROM EWMS.Inventory I"
_" JOIN EWMS.Locations L ON I.loc_m = L.loc_m and I.loc_id = L.loc_id"
_" LEFT JOIN EWMS.TransLoc T ON T.loc_m = L.loc_m AND T.loc_g = L.loc_g AND T.loc_x = L.loc_x AND T.loc_y = L.loc_y"
@@ -316,6 +317,7 @@
Set ProductOpPallet.Aantal = ResultSet.Data("Aantal")
Set ProductOpPallet.PalletID = ResultSet.Data("PalletID")
Set ProductOpPallet.LocatieID = ResultSet.Data("LocatieID")
+ Set ProductOpPallet.IsPickbaar = ResultSet.Data("IsPickbaar")
Set ProductOpPallet.MagazijnOmschrijving = ##class(Prod.Product).GetMagViaOpslagzone(ResultSet.Data("loc_m"))
Set ProductOpPallet.AantalSecties = ResultSet.Data("AantalSecties")
Do ProductenOpPallet.Insert(ProductOpPallet)
@@ -557,5 +559,118 @@
}
]]>
+
+
+
+Geeft lijst met APPS.MAG.Inventaris.dto.BijladenProductInfo
+BijladenTotTimeStamp:%TimeStamp
+%ListOfObjects
+ arAantalPickbaar.GetAt(ProductID))){
+ If ((arAantalPickbaar.GetAt(ProductID))>0){
+ Set TePickenProduct.AantalPickbaar = arAantalPickbaar.GetAt(ProductID)
+ }Else{
+ Set TePickenProduct.AantalPickbaar = 0
+ }
+
+ /// Pickbare en niet pickbare locaties instellen.
+ Set ProductOpPalletIt = ##class(TECH.ListIterator).%New(InventarisService.GeefPallettenMetProduct(ProductID))
+ While ProductOpPalletIt.HasNext()
+ {
+ Set ProductOpPallet = ProductOpPalletIt.Next()
+ Set TePickenProduct.ProductData = ProductOpPallet.ProductData
+ If ProductOpPallet.IsPickbaar {
+ Do TePickenProduct.PickbareLocaties.Insert(ProductOpPallet)
+ }Else {
+ Do TePickenProduct.NietPickbareLocaties.Insert(ProductOpPallet)
+ }
+ }
+ Do ProductenBijTeLaden.Insert(TePickenProduct)
+ }
+ }
+
+ Quit ProductenBijTeLaden
+]]>
+
+
+
+
+Een lijst met BijladenProductInfo objecten.
+Deze lijst is gesorteerd op vroegste due out time ascending.
+TimeStamp:%TimeStamp
+1
+%ListOfObjects
+Hoofding->DueOutTime)) As VroegsteDueOut"
+ _" FROM Flow_OrderWMS.Sub"
+ _" WHERE StatusWMS = ""W"" AND TECH.DateTime_HorologToTimeStamp(Lijn->Hoofding->DueOutTime) < ?"
+ _" GROUP BY Product"
+ _" ORDER BY VroegsteDueOut ASC")
+ Set Status = ResultSet.Execute(TimeStamp)
+ If $$$ISERR(Status) Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.StatusException).%New(##class(TECH.enu.ExceptionCode).GeneralError(),"Kon de aantal gevraagde producten niet ophalen.",Status))
+ While ResultSet.Next()
+ {
+ Set BijladenProductInfo = ##class(APPS.MAG.Inventaris.dto.BijladenProductInfo).%New()
+ Set BijladenProductInfo.VroegsteDueOut = ResultSet.Data("VroegsteDueOut")
+ Set BijladenProductInfo.ProductID = $ZSTRIP(ResultSet.Data("ProductID"),"<>W")
+ Set BijladenProductInfo.AantalTePicken = ResultSet.Data("Aantal")
+ Do TePickenProducten.Insert(BijladenProductInfo)
+ }
+ Do ResultSet.%Close()
+ Set ResultSet = ""
+
+ Quit TePickenProducten
+]]>
+
+
+
+
+Een array met ProductID als key en AantalPickbaar als value
+IsPickbaar:%Boolean=1
+1
+%ArrayOfDataTypes
+W")
+ Set Aantal = ResultSet.Data("Aantal")
+ Do arAantalPickbaar.SetAt(Aantal, ProductID)
+ }
+ Do ResultSet.%Close()
+ Set ResultSet = ""
+
+ Quit arAantalPickbaar
+]]>
+