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

This commit is contained in:
Guillermo Bonet 2024-07-26 14:07:01 +02:00
commit 5c6df930cf
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 vParkingFk id del parking
*/
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
RESIGNAL;
END;
UPDATE saleGroup sg
SET sg.parkingFk = vParkingFk
WHERE sg.id = vSaleGroupFk

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