#5858 - zoneCollisions #1853

Merged
jsegarra merged 78 commits from 5858-zone_Collisions into dev 2024-03-15 12:36:38 +00:00
7 changed files with 28 additions and 25 deletions
Showing only changes of commit 955828c63e - Show all commits

View File

@ -2816,8 +2816,8 @@ INSERT INTO `util`.`notification` (`id`, `name`, `description`)
(3, 'not-main-printer-configured', 'A printer distinct than main has been configured'), (3, 'not-main-printer-configured', 'A printer distinct than main has been configured'),
(4, 'supplier-pay-method-update', 'A supplier pay method has been updated'), (4, 'supplier-pay-method-update', 'A supplier pay method has been updated'),
(5, 'modified-entry', 'An entry has been modified'), (5, 'modified-entry', 'An entry has been modified'),
(6, 'book-entry-deleted', 'accounting entries deleted'), (6, 'book-entry-deleted', 'accounting entries deleted');
(7, 'zone-included','An email to notify zoneCollisions');
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`) INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
VALUES VALUES
(1, 9), (1, 9),
@ -2826,8 +2826,7 @@ INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
(3, 9), (3, 9),
(4, 1), (4, 1),
(5, 9), (5, 9),
(6, 9), (6, 9);
(7, 1);
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`) INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
VALUES VALUES
@ -2844,8 +2843,7 @@ INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
(2, 1109), (2, 1109),
(1, 9), (1, 9),
(1, 3), (1, 3),
(6, 9), (6, 9);
(7, 9);
INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`) INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
@ -3064,6 +3062,3 @@ INSERT INTO `vn`.`clientSms` (`id`, `clientFk`, `smsFk`, `ticketFk`)
(4, 1103, 4, 32), (4, 1103, 4, 32),
(13, 1101, 1, NULL), (13, 1101, 1, NULL),
(14, 1101, 4, 27); (14, 1101, 4, 27);
UPDATE salix.ACL
SET principalId='employee' WHERE model ="Notification";

View File

@ -0,0 +1,9 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `VN_SCHEDULER`
ON SCHEDULE EVERY 1 DAY
STARTS CURRENT_TIMESTAMP + INTERVAL 1 DAY
DO BEGIN
CALL `VN_SCHEDULER`();
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`VN_SCHEDULER`()
BEGIN
-- Obtener datos de la tabla vn_schedules
END$$
DELIMITER ;

View File

@ -1,11 +0,0 @@
DELIMITER $$
CREATE EVENT IF NOT EXISTS `zone_getCollisions`
ON SCHEDULE EVERY 1 DAY
STARTS CURRENT_TIMESTAMP + INTERVAL 1 DAY
DO BEGIN
CALL `zone_getCollisions`();
ALTER EVENT `zone_getCollisions` DISABLE;
END$$
DELIMITER ;

View File

@ -10,6 +10,8 @@ BEGIN
`userFk` = account.myUser_getId(); `userFk` = account.myUser_getId();
-- Activo el evento 'zone_getCollisions' -- Activo el evento 'zone_getCollisions'
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions'; -- UPDATE `mysql`.`event` SET status = 1 WHERE name = 'zone_getCollisions';
-- Insert en vn_schedules 'zone_getCollisions'
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,11 +1,11 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert` CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert`
BEFORE INSERT ON `zoneIncluded` BEFORE INSERT ON `zoneIncluded`
FOR EACH ROW
BEGIN BEGIN
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
-- Activo el evento 'zone_getCollisions' -- Activo el evento 'zone_getCollisions'
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions'; -- Insert en vn_schedulesla key 'zone_getCollisions'
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUp
BEGIN BEGIN
SET NEW.editorFk = account.myUser_getId(); SET NEW.editorFk = account.myUser_getId();
-- Activo el evento 'zone_getCollisions' -- Activo el evento 'zone_getCollisions' -- Insert en vn_schedules 'zone_getCollisions'
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions';
END$$ END$$
DELIMITER ; DELIMITER ;