refactor: refs #6501 Requested changes
This commit is contained in:
parent
874f776498
commit
b64637254b
|
@ -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,
|
Loading…
Reference in New Issue