refactor: refs #6501 Migrated procs from vn2008 to vn #2016

Merged
guillermo merged 24 commits from 6501-procMigration into dev 2024-02-14 10:31:14 +00:00
1 changed files with 5 additions and 5 deletions
Showing only changes of commit b64637254b - Show all commits

View File

@ -1,13 +1,13 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`continent_getTravelDetail`( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_getDetailFromContinent`(
vSelf INT vContinentFk INT
) )
BEGIN BEGIN
/** /**
* Devuelve los detalles de los vuelos que tienen * Devuelve los detalles de los vuelos que tienen
* un almacén de salida de un continente. * un almacén de salida de un continente.
* *
* @param vSelf Id de continente * @param vContinentFk Id de continente
*/ */
DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL 12 WEEK; DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL 12 WEEK;
SELECT IFNULL(CONCAT(" ", entryFk), travelFk) travelAndEntry, SELECT IFNULL(CONCAT(" ", entryFk), travelFk) travelAndEntry,
@ -52,7 +52,7 @@ BEGIN
JOIN agencyMode am ON am.id = tr.agencyModeFk JOIN agencyMode am ON am.id = tr.agencyModeFk
JOIN volumeConfig vc JOIN volumeConfig vc
WHERE tr.landed >= vDateFrom WHERE tr.landed >= vDateFrom
AND co.continentFk = vSelf AND co.continentFk = vContinentFk
GROUP BY tr.id GROUP BY tr.id
UNION ALL UNION ALL
SELECT e.travelFk, SELECT e.travelFk,
@ -94,7 +94,7 @@ BEGIN
JOIN country co ON co.id = wOut.countryFk JOIN country co ON co.id = wOut.countryFk
JOIN volumeConfig vc JOIN volumeConfig vc
WHERE tr.landed >= vDateFrom WHERE tr.landed >= vDateFrom
AND co.continentFk = vSelf AND co.continentFk = vContinentFk
GROUP BY e.id GROUP BY e.id
) sub ) sub
ORDER BY landed ASC, ORDER BY landed ASC,