feat(collection_new): refs #8058 urgent state
gitea/salix/pipeline/pr-dev This commit looks good Details

Urgent tickets will be priorized as asigned ones

Refs: #8058
This commit is contained in:
Pako Natek 2024-09-30 13:49:06 +02:00
parent 477c7f7903
commit 54d9125c21
1 changed files with 6 additions and 4 deletions

View File

@ -128,8 +128,9 @@ BEGIN
SELECT TRUE
FROM tmp.productionBuffer pb
JOIN state s ON s.id = pb.state
WHERE s.code = 'PICKER_DESIGNED'
AND pb.workerCode = vWorkerCode
WHERE (s.code = 'PICKER_DESIGNED'
AND pb.workerCode = vWorkerCode)
OR s.code = 'LAST_CALL'
) INTO vHasAssignedTickets;
-- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados
@ -138,8 +139,9 @@ BEGIN
DELETE pb
FROM tmp.productionBuffer pb
JOIN state s ON s.id = pb.state
WHERE s.code <> 'PICKER_DESIGNED'
OR pb.workerCode <> vWorkerCode;
WHERE (s.code <> 'PICKER_DESIGNED'
OR pb.workerCode <> vWorkerCode)
AND s.code <> 'LAST_CALL';
ELSE
DELETE pb
FROM tmp.productionBuffer pb