feat(collection_new): refs #7969 new restriction hasPlantTray for pickers
gitea/salix/pipeline/pr-master This commit looks good Details

Refs: #7969
This commit is contained in:
Pako Natek 2024-09-17 11:57:00 +02:00
parent 019d855fbf
commit 829475b49b
1 changed files with 19 additions and 4 deletions

View File

@ -29,6 +29,8 @@ BEGIN
DECLARE vLockName VARCHAR(215); DECLARE vLockName VARCHAR(215);
DECLARE vLockTime INT DEFAULT 30; DECLARE vLockTime INT DEFAULT 30;
DECLARE vFreeWagonFk INT; DECLARE vFreeWagonFk INT;
DECLARE vErrorNumber INT;
DECLARE vErrorMsg TEXT;
DECLARE c1 CURSOR FOR DECLARE c1 CURSOR FOR
SELECT ticketFk, `lines`, m3 SELECT ticketFk, `lines`, m3
@ -48,6 +50,18 @@ BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN BEGIN
GET DIAGNOSTICS CONDITION 1
vErrorNumber = MYSQL_ERRNO,
vErrorMsg = MESSAGE_TEXT;
CALL util.debugAdd('collection_new', JSON_OBJECT(
'errorNumber', vErrorNumber,
'errorMsg', vErrorMsg,
'lockName', vLockName,
'userFk', vUserFk,
'ticketFk', vTicketFk
)); -- Tmp
IF vLockName IS NOT NULL THEN IF vLockName IS NOT NULL THEN
DO RELEASE_LOCK(vLockName); DO RELEASE_LOCK(vLockName);
END IF; END IF;
@ -180,9 +194,10 @@ BEGIN
OR (NOT pb.V AND vItemPackingTypeFk = 'V') OR (NOT pb.V AND vItemPackingTypeFk = 'V')
OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking) OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking)
OR LENGTH(pb.problem) > 0 OR LENGTH(pb.problem) > 0
OR (pb.lines > vLinesLimit AND vLinesLimit IS NOT NULL) OR pb.lines > vLinesLimit
OR (pb.m3 > vVolumeLimit AND vVolumeLimit IS NOT NULL) OR pb.m3 > vVolumeLimit
OR ((sub.maxSize > vSizeLimit OR sub.maxSize IS NOT NULL) AND vSizeLimit IS NOT NULL); OR sub.maxSize > vSizeLimit
OR pb.hasPlantTray;
END IF; END IF;
-- Es importante que el primer ticket se coja en todos los casos -- Es importante que el primer ticket se coja en todos los casos