merge update fixtures zones

This commit is contained in:
Bernat 2019-04-29 14:28:08 +02:00 committed by jgallego
parent c5743ce37a
commit 7bbabffc26
1 changed files with 59 additions and 49 deletions

View File

@ -1408,64 +1408,74 @@ INSERT INTO `vn`.`sharingCart`(`id`, `workerFk`, `started`, `ended`, `workerSubs
INSERT INTO `vn`.`zone` (`id`, `name`, `hour`, `warehouseFk`, `agencyModeFk`, `travelingDays`, `price`, `bonus`)
VALUES
(1, 'Zone 1 A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '1', '1', '5', '2'),
(2, 'Zone 1 B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '1', '1', '2', '1'),
(3, 'Zone 1 C', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '2', '1', '2', '3', '2'),
(4, 'Zone 2 A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '7', '2', '5', '1'),
(5, 'Zone 2 B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '7', '1', '2', '2'),
(6, 'Zone 2 C', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '2', '7', '1', '3', '1'),
(7, 'Zone 3 A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '8', '2', '5', '1'),
(8, 'Zone 3 B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '8', '1', '2', '2');
(1, 'Zone pickup A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '1', '1', '0', '0'),
(2, 'Zone pickup B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '2', '1', '2', '0', '0'),
(3, 'Zone 247 A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '7', '2', '2', '0'),
(4, 'Zone 247 B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '2', '7', '1', '2', '0'),
(5, 'Zone expensive A', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '8', '2', '5', '-1'),
(6, 'Zone expensive B', CONCAT(CURRENT_DATE(), ' ', TIME('22:00')), '1', '8', '1', '5', '-1');
INSERT INTO `vn`.`zoneIncluded` (`zoneFk`, `geoFk`, `isIncluded`)
VALUES
(1, 3, 0),
(1, 4, 1),
(1, 5, 1),
(1, 21083, 1),
(2, 3, 1),
(1, 4, 0),
(1, 5, 0),
(1, 2, 1),
(2, 3, 0),
(2, 4, 0),
(2, 5, 1),
(3, 2, 1),
(2, 5, 0),
(2, 2, 1),
(3, 3, 0),
(3, 4, 0),
(3, 5, 1),
(4, 2, 0),
(4, 3, 1),
(4, 4, 1),
(3, 5, 0),
(3, 2, 1),
(4, 3, 0),
(4, 4, 0),
(4, 5, 0),
(4, 21083, 1),
(5, 2, 1),
(4, 2, 1),
(5, 3, 1),
(5, 4, 1),
(5, 4, 0),
(5, 5, 1),
(7, 2, 0),
(7, 3, 1),
(7, 4, 1),
(7, 5, 0),
(7, 21083, 1);
(5, 2, 1),
(6, 3, 1),
(6, 4, 0),
(6, 5, 1),
(6, 2, 1);
INSERT INTO `vn`.`zoneCalendar`(`zoneFk`, `delivered`)
VALUES
(1, CURDATE()),
(1, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
(4, CURDATE()),
(4, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
(7, CURDATE()),
(7, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(7, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
(7, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
(7, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
(7, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
(7, DATE_ADD(CURDATE(), INTERVAL +6 DAY));
(1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9 ) - DAYOFWEEK(CURDATE())) DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
(1, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9 ) - DAYOFWEEK(CURDATE())) DAY)),
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
(2, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9 ) - DAYOFWEEK(CURDATE())) DAY)),
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
(3, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=2, 2, 9) - DAYOFWEEK(CURDATE())) DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=3, 3, 10) - DAYOFWEEK(CURDATE())) DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=4, 4, 11) - DAYOFWEEK(CURDATE())) DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=5, 5, 12) - DAYOFWEEK(CURDATE())) DAY)),
(4, DATE_ADD(CURDATE(), INTERVAL (IF(DAYOFWEEK(CURDATE())<=6, 6, 13) - DAYOFWEEK(CURDATE())) DAY)),
(5, CURDATE()),
(5, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(5, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
(5, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
(5, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
(5, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
(5, DATE_ADD(CURDATE(), INTERVAL +6 DAY)),
(6, CURDATE()),
(6, DATE_ADD(CURDATE(), INTERVAL +1 DAY)),
(6, DATE_ADD(CURDATE(), INTERVAL +2 DAY)),
(6, DATE_ADD(CURDATE(), INTERVAL +3 DAY)),
(6, DATE_ADD(CURDATE(), INTERVAL +4 DAY)),
(6, DATE_ADD(CURDATE(), INTERVAL +5 DAY)),
(6, DATE_ADD(CURDATE(), INTERVAL +6 DAY));