Merge pull request 'feat(collection_new): refs #8058 urgent state' (!3038) from 8058-Tickets-Urgentes into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3038 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
de3d7fc925
|
@ -128,8 +128,9 @@ BEGIN
|
||||||
SELECT TRUE
|
SELECT TRUE
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
JOIN state s ON s.id = pb.state
|
JOIN state s ON s.id = pb.state
|
||||||
WHERE s.code = 'PICKER_DESIGNED'
|
WHERE (s.code = 'PICKER_DESIGNED'
|
||||||
AND pb.workerCode = vWorkerCode
|
AND pb.workerCode = vWorkerCode)
|
||||||
|
OR s.code = 'LAST_CALL'
|
||||||
) INTO vHasAssignedTickets;
|
) INTO vHasAssignedTickets;
|
||||||
|
|
||||||
-- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados
|
-- Se dejan en la tabla tmp.productionBuffer sólo aquellos tickets adecuados
|
||||||
|
@ -138,8 +139,9 @@ BEGIN
|
||||||
DELETE pb
|
DELETE pb
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
JOIN state s ON s.id = pb.state
|
JOIN state s ON s.id = pb.state
|
||||||
WHERE s.code <> 'PICKER_DESIGNED'
|
WHERE (s.code <> 'PICKER_DESIGNED'
|
||||||
OR pb.workerCode <> vWorkerCode;
|
OR pb.workerCode <> vWorkerCode)
|
||||||
|
AND s.code <> 'LAST_CALL';
|
||||||
ELSE
|
ELSE
|
||||||
DELETE pb
|
DELETE pb
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
|
|
Loading…
Reference in New Issue