7729-devToTest_2430 #2739
|
@ -117,7 +117,7 @@ proc: BEGIN
|
||||||
)sub
|
)sub
|
||||||
GROUP BY sub.itemFk;
|
GROUP BY sub.itemFk;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.itemCalc, tItemRange;
|
DROP TEMPORARY TABLE tmp.itemCalc, tItemRange, tmp.itemList;
|
||||||
CALL cache_calc_end (vCalc);
|
CALL cache_calc_end (vCalc);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -121,7 +121,7 @@ proc: BEGIN
|
||||||
)sub
|
)sub
|
||||||
GROUP BY sub.itemFk;
|
GROUP BY sub.itemFk;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.itemCalc, itemRange;
|
DROP TEMPORARY TABLE tmp.itemCalc, itemRange, tmp.itemList;
|
||||||
CALL cache_calc_end (vCalc);
|
CALL cache_calc_end (vCalc);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -30,6 +30,7 @@ BEGIN
|
||||||
tmp.ticketComponentPrice,
|
tmp.ticketComponentPrice,
|
||||||
tmp.ticketComponent,
|
tmp.ticketComponent,
|
||||||
tmp.ticketLot,
|
tmp.ticketLot,
|
||||||
tmp.zoneGetShipped;
|
tmp.zoneGetShipped,
|
||||||
|
tmp.item;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -16,9 +16,9 @@ BEGIN
|
||||||
|
|
||||||
SET @order = 0;
|
SET @order = 0;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.newSaleList;
|
DROP TEMPORARY TABLE IF EXISTS tNewSaleList;
|
||||||
|
|
||||||
CREATE TEMPORARY TABLE tmp.newSaleList
|
CREATE TEMPORARY TABLE tNewSaleList
|
||||||
SELECT id as saleFk, @order := @order + 1 as orden
|
SELECT id as saleFk, @order := @order + 1 as orden
|
||||||
FROM vn.sale
|
FROM vn.sale
|
||||||
WHERE ticketFk = vTargetTicketFk
|
WHERE ticketFk = vTargetTicketFk
|
||||||
|
@ -28,7 +28,8 @@ BEGIN
|
||||||
SELECT ns.saleFk, sc.componentFk, sc.value
|
SELECT ns.saleFk, sc.componentFk, sc.value
|
||||||
FROM vn.saleComponent sc
|
FROM vn.saleComponent sc
|
||||||
JOIN tmp.saleList s ON s.saleFk = sc.saleFk
|
JOIN tmp.saleList s ON s.saleFk = sc.saleFk
|
||||||
JOIN tmp.newSaleList ns ON ns.orden = s.orden;
|
JOIN tNewSaleList ns ON ns.orden = s.orden;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tNewSaleList;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -59,5 +59,7 @@ BEGIN
|
||||||
WHERE p.pickingOrder BETWEEN vPickingOrderFrom AND vPickingOrderTo
|
WHERE p.pickingOrder BETWEEN vPickingOrderFrom AND vPickingOrderTo
|
||||||
AND p.sectorFk = vSectorFk
|
AND p.sectorFk = vSectorFk
|
||||||
ORDER BY p.pickingOrder;
|
ORDER BY p.pickingOrder;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.stockMisfit;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -76,5 +76,7 @@ BEGIN
|
||||||
i.quantity amount
|
i.quantity amount
|
||||||
FROM tmp.itemAtp i
|
FROM tmp.itemAtp i
|
||||||
HAVING amount != 0;
|
HAVING amount != 0;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.itemAtp;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -104,5 +104,6 @@ BEGIN
|
||||||
) sub;
|
) sub;
|
||||||
DROP TEMPORARY TABLE tmp.whiteTicket;
|
DROP TEMPORARY TABLE tmp.whiteTicket;
|
||||||
DROP TEMPORARY TABLE tmp.sectorTypeTicket;
|
DROP TEMPORARY TABLE tmp.sectorTypeTicket;
|
||||||
|
DROP TEMPORARY TABLE tmp.productionBuffer;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,14 +3,14 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_DelayTruck`(
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE done INT DEFAULT FALSE;
|
DECLARE done INT DEFAULT FALSE;
|
||||||
DECLARE vTicketFk INT;
|
DECLARE vTicketFk INT;
|
||||||
DECLARE cur1 CURSOR FOR SELECT ticketFk FROM tmp.ticket;
|
DECLARE cur1 CURSOR FOR SELECT ticketFk FROM tTicket;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
||||||
|
|
||||||
CALL vn.productionControl(vWarehouserFk,0) ;
|
CALL vn.productionControl(vWarehouserFk,0) ;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticket;
|
DROP TEMPORARY TABLE IF EXISTS tTicket;
|
||||||
CREATE TEMPORARY TABLE tmp.ticket
|
CREATE TEMPORARY TABLE tTicket
|
||||||
SELECT ticketFk
|
SELECT ticketFk
|
||||||
FROM tmp.productionBuffer
|
FROM tmp.productionBuffer
|
||||||
JOIN alertLevel al ON al.code = 'FREE'
|
JOIN alertLevel al ON al.code = 'FREE'
|
||||||
|
@ -31,5 +31,6 @@ BEGIN
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
CLOSE cur1;
|
CLOSE cur1;
|
||||||
|
DROP TEMPORARY TABLE tTicket, tmp.productionBuffer;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -65,6 +65,8 @@ BEGIN
|
||||||
IF (vZoneFk IS NULL OR vZoneFk = 0) AND vIsRequiredZone THEN
|
IF (vZoneFk IS NULL OR vZoneFk = 0) AND vIsRequiredZone THEN
|
||||||
CALL util.throw ('NOT_ZONE_WITH_THIS_PARAMETERS');
|
CALL util.throw ('NOT_ZONE_WITH_THIS_PARAMETERS');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.zoneGetShipped;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
INSERT INTO ticket (
|
INSERT INTO ticket (
|
||||||
|
|
|
@ -213,6 +213,6 @@ BEGIN
|
||||||
END;
|
END;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
CLOSE rsTicket;
|
CLOSE rsTicket;
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.time;
|
DROP TEMPORARY TABLE IF EXISTS tmp.time, tmp.zoneGetLanded;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -103,6 +103,7 @@ BEGIN
|
||||||
DROP TEMPORARY TABLE
|
DROP TEMPORARY TABLE
|
||||||
geoCollision,
|
geoCollision,
|
||||||
tmp.zone,
|
tmp.zone,
|
||||||
tmp.zoneNodes;
|
tmp.zoneNodes,
|
||||||
|
tmp.zoneOption;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
Loading…
Reference in New Issue