7806_devToTest_2332 #2801

Merged
alexm merged 126 commits from 7806_devToTest_2330 into test 2024-07-30 06:14:09 +00:00
4 changed files with 5 additions and 25 deletions
Showing only changes of commit 403252ac39 - Show all commits

View File

@ -10,15 +10,10 @@ BEGIN
* @param vSaleGroupFk id de la preparación previa
* @param vParkingFk id del parking
*/
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
RESIGNAL;
END;
UPDATE saleGroup sg
SET sg.parkingFk = vParkingFk
WHERE sg.id = vSaleGroupFk
AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK;
WHERE sg.id = vSaleGroupFk
AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK;
CALL ticket_setNextState(ticket_get(vSaleGroupFk));
END$$

View File

@ -13,12 +13,6 @@ BEGIN
DECLARE vParkingFk INT;
DECLARE vLastWeek DATE;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
SET vParkingCode = REPLACE(vParkingCode, ' ', '');
SELECT id INTO vParkingFk
@ -29,8 +23,6 @@ BEGIN
CALL util.throw('parkingNotExist');
END IF;
START TRANSACTION;
SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK;
-- Comprobamos si es una prep. previa, ticket, colección o shelving
@ -45,7 +37,5 @@ BEGIN
ELSE
CALL util.throw('paramNotExist');
END IF;
COMMIT;
END$$
DELIMITER ;

View File

@ -1,20 +1,20 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT)
proc: BEGIN
BEGIN
/**
* Aparca una matrícula en un parking
*
* @param vShelvingCode code de la matrícula
* @param vParkingFk id del parking
*/
INSERT INTO vn.shelvingLog (originFk, userFk, action , description,changedModel,changedModelId)
INSERT INTO shelvingLog (originFk, userFk, action , description,changedModel,changedModelId)
SELECT s.id, account.myUser_getId(), 'update', CONCAT("Cambio parking ",vShelvingCode," de ", p.code," a ", pNew.code),'Shelving',s.id
FROM parking p
JOIN shelving s ON s.parkingFk = p.id
JOIN parking pNew ON pNew.id = vParkingFk
WHERE s.code = vShelvingCode COLLATE utf8_unicode_ci;
UPDATE vn.shelving
UPDATE shelving
SET parkingFk = vParkingFk,
parked = util.VN_NOW(),
isPrinted = TRUE

View File

@ -21,11 +21,6 @@ BEGIN
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
RESIGNAL;
END;
INSERT INTO vn.ticketParking(ticketFk, parkingFk)
SELECT IFNULL(tc2.ticketFk, t.id), vParkingFk
FROM ticket t