feat: refs #7116 insert into agencyIncoming #2710
|
@ -0,0 +1,22 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`claim_changeState`
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
STARTS '2024-06-06 07:52:46.000'
|
||||
ON COMPLETION PRESERVE
|
||||
ENABLE
|
||||
DO BEGIN
|
||||
|
||||
DECLARE vClaimState INT;
|
||||
|
||||
SELECT id INTO vClaimState
|
||||
FROM claimState cs
|
||||
WHERE cs.code = 'canceled';
|
||||
|
||||
UPDATE claim c
|
||||
JOIN claimState cs ON cs.id = c.claimStateFk
|
||||
SET c.claimStateFk = vClaimState
|
||||
WHERE c.created < util.VN_CURDATE() - INTERVAL 2 MONTH
|
||||
AND cs.code IN('incomplete','coming','waiting','out');
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -5,4 +5,19 @@ CREATE TABLE IF NOT EXISTS `vn`.`agencyIncoming` (
|
|||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb3
|
||||
COLLATE=utf8mb3_unicode_ci COMMENT='Agencias de entrada de mercancias';;
|
||||
COLLATE=utf8mb3_unicode_ci COMMENT='Agencias de entrada de mercancias';
|
||||
|
||||
INSERT IGNORE INTO vn.agencyIncoming (agencyModeFk) VALUES
|
||||
(1343), (1002), (1282), (841), (1303), (714), (556), (1786), (1785), (1784),
|
||||
(1780), (1783), (1758), (1782), (1772), (1789), (1776), (1791), (1778), (1792),
|
||||
(1779), (1362), (681), (1765), (15), (1594), (1706), (1707), (907), (1260),
|
||||
(1715), (1371), (1372), (53), (689), (1375), (738), (742), (1307), (1700), (608),
|
||||
(1311), (1315), (1339), (1433), (1338), (1332), (1844), (842), (1382), (1466),
|
||||
(1719), (1723), (1725), (1720), (1732), (1736), (1728), (1724), (1726), (1727),
|
||||
(1767), (1734), (1730), (1845), (1729), (1746), (1699), (2), (671), (1379), (614),
|
||||
(1718), (1697), (62), (1529), (1392), (1378), (1438), (1796), (1688), (686),
|
||||
(1326), (1691), (1), (1560), (1695), (1696), (1558), (1648), (1649), (1598),
|
||||
(1680), (1694), (1600), (1601), (1602), (1712), (1603), (1604), (1641), (1692),
|
||||
(1693), (1650), (1683), (1682), (1681), (1713), (1826), (1768), (1769), (1770),
|
||||
(1593), (1443), (1244), (1679), (1006), (1361), (1102), (1655), (1744), (1225),
|
||||
(1007);
|
||||
|
|
Loading…
Reference in New Issue