Merge branch 'test' into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-07-26 14:07:15 +02:00
commit 403252ac39
4 changed files with 5 additions and 25 deletions

View File

@ -10,11 +10,6 @@ BEGIN
* @param vSaleGroupFk id de la preparación previa * @param vSaleGroupFk id de la preparación previa
* @param vParkingFk id del parking * @param vParkingFk id del parking
*/ */
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
RESIGNAL;
END;
UPDATE saleGroup sg UPDATE saleGroup sg
SET sg.parkingFk = vParkingFk SET sg.parkingFk = vParkingFk
WHERE sg.id = vSaleGroupFk WHERE sg.id = vSaleGroupFk

View File

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

View File

@ -1,20 +1,20 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT) 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 * Aparca una matrícula en un parking
* *
* @param vShelvingCode code de la matrícula * @param vShelvingCode code de la matrícula
* @param vParkingFk id del parking * @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 SELECT s.id, account.myUser_getId(), 'update', CONCAT("Cambio parking ",vShelvingCode," de ", p.code," a ", pNew.code),'Shelving',s.id
FROM parking p FROM parking p
JOIN shelving s ON s.parkingFk = p.id JOIN shelving s ON s.parkingFk = p.id
JOIN parking pNew ON pNew.id = vParkingFk JOIN parking pNew ON pNew.id = vParkingFk
WHERE s.code = vShelvingCode COLLATE utf8_unicode_ci; WHERE s.code = vShelvingCode COLLATE utf8_unicode_ci;
UPDATE vn.shelving UPDATE shelving
SET parkingFk = vParkingFk, SET parkingFk = vParkingFk,
parked = util.VN_NOW(), parked = util.VN_NOW(),
isPrinted = TRUE isPrinted = TRUE

View File

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