2024-07-09 08:01:32 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`address_updateCoordinates`(
|
2024-07-09 08:01:32 +00:00
|
|
|
vTicketFk INT,
|
2024-08-07 08:12:39 +00:00
|
|
|
vLongitude DECIMAL(11,7),
|
|
|
|
vLatitude DECIMAL(11,7))
|
2024-07-09 08:01:32 +00:00
|
|
|
BEGIN
|
|
|
|
/**
|
2024-07-11 09:52:27 +00:00
|
|
|
* Actualiza las coordenadas de una dirección.
|
2024-07-09 08:01:32 +00:00
|
|
|
*
|
2024-07-11 09:43:19 +00:00
|
|
|
* @param vTicketFk Id del ticket
|
2024-07-11 09:57:48 +00:00
|
|
|
* @param vLongitude Longitud de la dirección
|
|
|
|
* @param vLatitude Latitud de la dirección
|
2024-07-09 08:01:32 +00:00
|
|
|
*/
|
|
|
|
DECLARE vAddressFK INT;
|
|
|
|
|
|
|
|
SELECT addressFK INTO vAddressFK
|
|
|
|
FROM ticket
|
2024-07-11 08:23:31 +00:00
|
|
|
WHERE id = vTicketFk;
|
2024-07-09 08:01:32 +00:00
|
|
|
|
|
|
|
UPDATE address
|
|
|
|
SET longitude = vLongitude,
|
|
|
|
latitude = vLatitude
|
|
|
|
WHERE id = vAddressFK;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|