2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getInfo`(vItemFk VARCHAR(22))
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
/**
|
|
|
|
* Muestra información realtiva a la ubicación de un item
|
|
|
|
*
|
|
|
|
* @param vItemFk Id del item
|
|
|
|
*/
|
|
|
|
SELECT vn.barcodeToItem(vItemFk)
|
|
|
|
INTO vItemFk;
|
|
|
|
|
|
|
|
SELECT pk.code Parking,
|
|
|
|
sh.code Matricula,
|
|
|
|
ish.visible visible,
|
|
|
|
ish.created created,
|
|
|
|
ish.itemFk itemFk,
|
|
|
|
sh.priority
|
|
|
|
FROM vn.itemShelving ish
|
|
|
|
JOIN vn.shelving sh ON sh.`code` = ish.shelvingFk
|
|
|
|
JOIN vn.parking pk ON pk.id = sh.parkingFk
|
|
|
|
WHERE ish.itemFk = vItemFk
|
|
|
|
ORDER BY sh.priority DESC, created ASC;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|