7837-testToMaster_2432 #2834

Merged
alexm merged 161 commits from 7837-testToMaster_2432 into master 2024-08-06 05:52:05 +00:00
1 changed files with 25 additions and 21 deletions
Showing only changes of commit 5d11f0cd0a - Show all commits

View File

@ -174,8 +174,9 @@ proc: BEGIN
WHERE NOT `lines`; WHERE NOT `lines`;
-- Lineas por linea de encajado -- Lineas por linea de encajado
UPDATE tmp.productionBuffer pb CREATE OR REPLACE TEMPORARY TABLE tItemPackingType
JOIN ( (PRIMARY KEY(ticketFk))
ENGINE = MEMORY
SELECT ticketFk, SELECT ticketFk,
SUM(sub.H) H, SUM(sub.H) H,
SUM(sub.V) V, SUM(sub.V) V,
@ -190,11 +191,13 @@ proc: BEGIN
JOIN item i ON i.id = s.itemFk JOIN item i ON i.id = s.itemFk
GROUP BY t.ticketFk, i.itemPackingTypeFk GROUP BY t.ticketFk, i.itemPackingTypeFk
) sub ) sub
GROUP BY ticketFk GROUP BY ticketFk;
) sub2 ON sub2.ticketFk = pb.ticketFk
SET pb.H = sub2.H, UPDATE tmp.productionBuffer pb
pb.V = sub2.V, JOIN tItemPackingType ti ON ti.ticketFk = pb.ticketFk
pb.N = sub2.N; SET pb.H = ti.H,
pb.V = ti.V,
pb.N = ti.N;
-- Colecciones segun tipo de encajado -- Colecciones segun tipo de encajado
UPDATE tmp.productionBuffer pb UPDATE tmp.productionBuffer pb
@ -273,6 +276,7 @@ proc: BEGIN
tmp.risk, tmp.risk,
tmp.ticket_problems, tmp.ticket_problems,
tmp.ticketWithPrevia, tmp.ticketWithPrevia,
tItemShelvingStock; tItemShelvingStock,
tItemPackingType;
END$$ END$$
DELIMITER ; DELIMITER ;