feat: previas con sitema de reservas refs #6861 #2176

Merged
carlosap merged 64 commits from 6861-Pasar-modo-trabajo-de-previa-a-reservas into dev 2024-06-25 11:21:03 +00:00
Member
No description provided.
carlosap added 1 commit 2024-03-18 16:51:59 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
c20747434e
feat: previas con sitema de reservas refs #6861
carlosap added 1 commit 2024-04-11 10:16:04 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
5967bd545c
feat: previas con reserva refs #6861
sergiodt added 1 commit 2024-04-11 10:24:25 +00:00
sergiodt added 1 commit 2024-04-11 10:27:24 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
bc1397d916
refs #6861 feat: reservePrevious
sergiodt added 26 commits 2024-04-11 10:34:58 +00:00
gitea/salix/pipeline/head This commit looks good Details
7f563f99bb
refs #5890 feat:reserves
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
78f5586136
refs #5890 feat:itemShelving_add
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
09812c24dd
refs #5890 feat: triggers
sergiodt added 1 commit 2024-04-11 11:45:56 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
3a8dcbfd29
refs #6861 feat:reserve previos
sergiodt added 1 commit 2024-04-12 07:49:33 +00:00
sergiodt added 1 commit 2024-04-12 09:28:28 +00:00
sergiodt added 1 commit 2024-04-15 11:03:35 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
0f1a086bca
refs #6861 feat:reserve previos
sergiodt added 1 commit 2024-04-16 06:33:16 +00:00
sergiodt added 1 commit 2024-04-18 07:14:04 +00:00
sergiodt added 1 commit 2024-04-25 14:16:02 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
611f907ef0
refs #6861 feat:reserveWithReservation
sergiodt added 1 commit 2024-05-06 08:30:33 +00:00
sergiodt added 1 commit 2024-05-07 05:23:23 +00:00
sergiodt added 1 commit 2024-05-08 08:58:39 +00:00
sergiodt added 1 commit 2024-05-08 08:59:36 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
5a0882c2ac
refs #6861 feat:sectoCollection reserve
sergiodt added 1 commit 2024-05-09 05:07:19 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
679f9a1b9b
refs #6861 feat:sectoCollection reserve
sergiodt added 1 commit 2024-05-09 05:09:03 +00:00
sergiodt added 1 commit 2024-05-14 05:11:39 +00:00
sergiodt added 1 commit 2024-05-16 05:09:05 +00:00
carlosap added 1 commit 2024-05-22 16:05:22 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
22a6c3695c
feat:concurrency issue refs #6861
sergiodt added 1 commit 2024-05-23 14:35:43 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
ea4f70f460
refs #6861 feat: previas a reservas
sergiodt added 1 commit 2024-05-27 05:33:45 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
d770cd8d48
refs #6861 feat: getLock
sergiodt added 1 commit 2024-05-27 05:46:32 +00:00
sergiodt added 1 commit 2024-05-27 06:16:04 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2cd7133a8c
refs #6861 feat: skipTest
sergiodt requested review from jgallego 2024-05-27 09:32:23 +00:00
sergiodt changed title from WIP: feat: previas con sitema de reservas refs #6861 to feat: previas con sitema de reservas refs #6861 2024-05-27 09:32:29 +00:00
sergiodt added 1 commit 2024-05-27 09:33:15 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
74b71079f2
refs #6861 feat: obsrevation
sergiodt added 1 commit 2024-05-27 09:33:38 +00:00
sergiodt added 1 commit 2024-05-27 09:55:50 +00:00
gitea/salix/pipeline/pr-dev Build queued... Details
e133dec514
refs #6861 feat: trigger
jgallego requested changes 2024-05-27 10:12:01 +00:00
Dismissed
@ -0,0 +1,29 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('assignCollection', {
Owner

si el modul es collection el back assign soles es suficient

si el modul es collection el back assign soles es suficient
Author
Member

Hay 2 métodos asign que van a convivir hasta que este implantado el tema de las reservas. Ya existe el método asign

Hay 2 métodos asign que van a convivir hasta que este implantado el tema de las reservas. Ya existe el método asign
@ -0,0 +58,4 @@
FROM item
WHERE id = vItemFk;
INSERT INTO ticketLog
Owner

açò no ho fa el log asoles¿?

açò no ho fa el log asoles¿?
jgallego marked this conversation as resolved
@ -0,0 +77,4 @@
CALL itemShelvingSale_addBySale(vSaleFk);
IF NOT EXISTS (SELECT TRUE FROM itemShelvingSale WHERE saleFk = vSaleFk LIMIT 1) THEN
SET vHasThrow = TRUE;
Owner

no pots posar ací el throw?

no pots posar ací el throw?
Author
Member

No hi ha un error especific per a caada error, s'aprofita la variable vHasThrow en varios puestos

No hi ha un error especific per a caada error, s'aprofita la variable vHasThrow en varios puestos
jgallego marked this conversation as resolved
@ -0,0 +3,4 @@
vUserFk INT,
OUT vCollectionFk INT)
proc:BEGIN
/* Comprueba si existen colecciones libres que se ajustan al perfil del usuario
Owner

formato del comentari

formato del comentari
jgallego marked this conversation as resolved
@ -0,0 +31,4 @@
collection_assign_lockname
INTO vHasTooMuchCollections,
vLockName
FROM tCollection
Owner

alias

alias
jgallego marked this conversation as resolved
@ -0,0 +38,4 @@
IF vHasTooMuchCollections THEN
CALL util.throw('Hay colecciones pendientes');
LEAVE proc;
Owner

si hi ha un throw el leave es innecesari

si hi ha un throw el leave es innecesari
jgallego marked this conversation as resolved
@ -0,0 +26,4 @@
JOIN vn.saleTracking st ON st.saleFk = sa.saleFk
JOIN vn.`state` s ON s.id = st.stateFk
WHERE st.isChecked
AND s.semaphore = 1
Owner

numero no, cal vore quin es l'objectiu del 1

numero no, cal vore quin es l'objectiu del 1
jgallego marked this conversation as resolved
@ -119,0 +7,4 @@
BEGIN
/**
* Gestiona la reserva de un itemShelvingFk, actualizando isPicked y quantity
* en itemShelvingSale y sale.isPicked en caso necesario.
Owner

es extrany 3 transaccions en el mateix proc, ja que si una falla, no es farà tot el procediment, es lo que vol l'usuari?

es extrany 3 transaccions en el mateix proc, ja que si una falla, no es farà tot el procediment, es lo que vol l'usuari?
jgallego marked this conversation as resolved
@ -0,0 +1,34 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_setSaleGroup`(
Owner

itemShelvingSale_setPicked?

itemShelvingSale_setPicked?
carlosap marked this conversation as resolved
@ -1,5 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingTransfer`(vItemShelvingFk INT, vShelvingFk VARCHAR(3))
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingTransfer`(
Owner

ara els shelvings poden ser de 4 a mes si es poc canvia el nom del proc a uno correcte.

ara els shelvings poden ser de 4 a mes si es poc canvia el nom del proc a uno correcte.
carlosap marked this conversation as resolved
@ -0,0 +1,19 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sectorCollection_getPartial`()
Owner

sectorCollection_getMyPartial

sectorCollection_getMyPartial
carlosap marked this conversation as resolved
@ -0,0 +12,4 @@
DECLARE vHasSalesReserved BOOLEAN;
Owner

sols un bot

sols un bot
jgallego marked this conversation as resolved
@ -0,0 +13,4 @@
DECLARE vHasSalesReserved BOOLEAN;
SELECT DISTINCT COUNT(*)>0 INTO vHasSalesReserved
Owner

> 0 redundant

`>` 0 redundant
jgallego marked this conversation as resolved
@ -0,0 +14,4 @@
SELECT DISTINCT COUNT(*)>0 INTO vHasSalesReserved
FROM vn.sectorCollection sc
Owner

sense vn.

sense vn.
jgallego marked this conversation as resolved
@ -13,1 +5,3 @@
VALUES( NEW.id,
BEGIN
INSERT INTO vn.itemShelvingLog(
Owner

açò no ho pot fer el procés del log automàtic

açò no ho pot fer el procés del log automàtic
carlosap marked this conversation as resolved
@ -5,6 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemShelving_beforeIn
BEGIN
SET NEW.editorFk = account.myUser_getId();
SET NEW.userFk = account.myUser_getId();
SET NEW.available = NEW.visible;
Owner

estas segur que el visible ací s'iguala al disponible?

estas segur que el visible ací s'iguala al disponible?
Author
Member

Al insertar una nova línea encara no te reserves i el disponible i el visible deurien de ser iguals

Al insertar una nova línea encara no te reserves i el disponible i el visible deurien de ser iguals
@ -8,2 +9,4 @@
SET NEW.userFk = account.myUser_getId();
END IF;
IF (NEW.visible <> OLD.visible) THEN
Owner

si un dels dos valors fos NULL ací no dona TRUE es correcte?

si un dels dos valors fos NULL ací no dona TRUE es correcte?
Author
Member

La columna es NOT NULL default 0

La columna es NOT NULL default 0
@ -0,0 +16,4 @@
UPDATE vn.itemShelving SET available = visible;
CREATE TABLE vn.itemShelvingSaleReserv (
Owner

itemShelvingSaleReserv perque este nom?

itemShelvingSaleReserv perque este nom?
Author
Member

Es una cola de les reserves que queden per fer en la taula vn.itemShelvingSale

Es una cola de les reserves que queden per fer en la taula vn.itemShelvingSale
Owner

seria itemShelvingSaleReserves

seria itemShelvingSaleReserves
Author
Member

En plural??

En plural??
Owner

itemShelvingSaleReserve el singular
si vols pots gastar el allocate que he vist tb per ahí, pero que siga tot igual

itemShelvingSaleReserve el singular si vols pots gastar el allocate que he vist tb per ahí, pero que siga tot igual
sergiodt added 1 commit 2024-05-27 10:21:39 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
32aafc3545
feat: refs #6861 trigger
carlosap added 1 commit 2024-06-11 10:44:29 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
ed7218c133
feat: previas con sitema de reservas refs #6861
carlosap added 1 commit 2024-06-11 10:49:37 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
d75e008a23
feat: previas con sitema de reservas refs #6861
carlosap requested review from jgallego 2024-06-11 10:49:45 +00:00
jgallego requested changes 2024-06-11 13:26:08 +00:00
Dismissed
@ -0,0 +75,4 @@
END IF;
IF vHasThrow THEN
CALL util.throw("No hay disponibilidad para el artículo seleccionado");
Owner

castella no.

castella no.
carlosap marked this conversation as resolved
@ -0,0 +40,4 @@
DROP TEMPORARY TABLE tCollection;
IF vHasTooMuchCollections THEN
CALL util.throw('Hay colecciones pendientes');
Owner

castella no

castella no
jgallego marked this conversation as resolved
@ -14,1 +15,4 @@
FROM collection
WHERE id = vParamFk;
SET vDated = util.yesterday();
Owner

vYesterday

vYesterday
jgallego marked this conversation as resolved
@ -0,0 +20,4 @@
SELECT id INTO vItemShelvingFk
FROM itemShelving
WHERE id = vItemShelvingFk
AND FALSE
Owner

açò sempre dona false? es raro

açò sempre dona false? es raro
carlosap marked this conversation as resolved
@ -119,0 +29,4 @@
END;
IF (SELECT isPicked FROM itemShelvingSale WHERE id = vItemShelvingSaleFk) THEN
CALL util.throw('Reserva completada');
Owner

en castella no

en castella no
jgallego marked this conversation as resolved
@ -0,0 +12,4 @@
LEFT JOIN vn.sale sl ON sl.id = sgd.saleFk
LEFT JOIN itemShelvingSale iss ON iss.saleFk = sl.id
WHERE sc.userFk = account.myUser_getId()
AND (ISNULL(scsg.sectorCollectionFk)
Owner

Por temas de optimización en WHERE, utilizaremos la comparación a null usando IS NULL ISNULL(parentFk)

Por temas de optimización en WHERE, utilizaremos la comparación a null usando IS NULL ~~ISNULL(parentFk)~~
jgallego marked this conversation as resolved
@ -9,0 +6,4 @@
UPDATE sale s
JOIN operator o ON o.workerFk = account.myUser_getId()
SET isPicked = IF(o.isOnReservationMode, isPicked, TRUE)
Owner

isPicked de quina taula?

isPicked de quina taula?
carlosap marked this conversation as resolved
carlosap added 1 commit 2024-06-11 16:43:30 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
b9d1c3228b
feat: previas con sitema de reservas refs #6861
alexm added 1 commit 2024-06-12 10:21:40 +00:00
carlosap requested review from jgallego 2024-06-12 10:23:56 +00:00
jgallego approved these changes 2024-06-12 13:50:46 +00:00
Dismissed
jgallego left a comment
Owner

itemShelving_moveReserv este nom es molt raro..

itemShelving_moveReserv este nom es molt raro..
carlosap added 1 commit 2024-06-12 14:12:10 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
30caf79490
feat: previas con sitema de reservas refs #6861
carlosap requested review from jgallego 2024-06-12 14:13:58 +00:00
jgallego approved these changes 2024-06-12 14:16:08 +00:00
Dismissed
sergiodt added 1 commit 2024-06-13 09:08:15 +00:00
sergiodt added 1 commit 2024-06-13 12:22:08 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
c2e4e187d6
feat itemShelvingSale refs #6861
carlosap requested review from jgallego 2024-06-14 15:58:07 +00:00
jgallego requested changes 2024-06-17 10:25:00 +00:00
Dismissed
@ -119,0 +56,4 @@
SELECT id INTO vItemShelvingFk
FROM itemShelving
WHERE id = vItemShelvingFk
AND FALSE
Owner

per a que val esta linea¿?

per a que val esta linea¿?
carlosap marked this conversation as resolved
carlosap added 2 commits 2024-06-20 16:18:08 +00:00
carlosap requested review from jgallego 2024-06-20 16:18:10 +00:00
jgallego requested changes 2024-06-20 19:12:13 +00:00
Dismissed
@ -119,0 +86,4 @@
COMMIT;
IF vIsItemShelvingSaleEmpty AND vQuantity <> vReservedQuantity THEN
INSERT INTO itemShelvingSaleReserv (saleFk)
Owner

itemShelvingSaleReserve

itemShelvingSaleReserve
carlosap added 1 commit 2024-06-24 11:30:07 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
cf79711f6a
feat: previas con sitema de reservas refs #6861
carlosap requested review from jgallego 2024-06-24 11:30:11 +00:00
jgallego approved these changes 2024-06-25 05:02:25 +00:00
carlosap merged commit ff1918ef06 into dev 2024-06-25 11:21:03 +00:00
carlosap deleted branch 6861-Pasar-modo-trabajo-de-previa-a-reservas 2024-06-25 11:21:03 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#2176
No description provided.