refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
1 changed files with 10 additions and 4 deletions
Showing only changes of commit ed67b1168f - Show all commits

View File

@ -1,9 +1,13 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_detailAmerica`()
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`continent_getTravelDetail`(
vSelf INT
)
BEGIN
/**
* Devuelve los detalles de los vuelos que tienen
* un almacén de salida en Ecuador o Colombia.
* un almacén de salida de un continente.
*
* @param vSelf Id de continente
*/
DECLARE vDateFrom DATE DEFAULT util.VN_CURDATE() - INTERVAL 12 WEEK;
SELECT IFNULL(CONCAT(" ", entryFk), travelFk) travelAndEntry,
@ -44,10 +48,11 @@ BEGIN
LEFT JOIN itemType it ON it.id = i.typeFk
JOIN warehouse wIn ON wIn.id = tr.warehouseInFk
JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk
JOIN country co ON co.id = wOut.countryFk
JOIN agencyMode am ON am.id = tr.agencyModeFk
JOIN volumeConfig vc
WHERE tr.landed >= vDateFrom
AND (wOut.code = "col" OR wOut.code = "ecu")
AND co.continentFk = vSelf
GROUP BY tr.id
UNION ALL
SELECT e.travelFk,
@ -86,9 +91,10 @@ BEGIN
LEFT JOIN supplier s2 ON s2.id = tr.cargoSupplierFk
JOIN warehouse wIn ON wIn.id = tr.warehouseInFk
JOIN warehouse wOut ON wOut.id = tr.warehouseOutFk
JOIN country co ON co.id = wOut.countryFk
JOIN volumeConfig vc
WHERE tr.landed >= vDateFrom
AND (wOut.code = "col" OR wOut.code = "ecu")
AND co.continentFk = vSelf
GROUP BY e.id
) sub
ORDER BY landed ASC,