------------------------------------------------------------------------------------------------------
--2023.8.7 增加菜单权限表数据--舒东辉
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (253, '服务档位删除', '/api/sys/level/delete', 'URL', 6, 2, 'AUTH', '92', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (254, '服务档位', '/api/sys/level/get', 'URL', 6, 3, 'AUTH', '90,91', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (255, '服务档位列表', '/api/sys/level/list', 'URL', 6, 4, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (256, '服务档位列表', '/api/sys/level/query', 'URL', 6, 5, 'AUTH', '89', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (257, '服务档位修改', '/api/sys/level/update', 'URL', 6, 6, 'AUTH', '91', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (258, '客户新增', '/api/sys/custom/add', 'URL', 3, 1, 'AUTH', '79', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (259, '客户删除', '/api/sys/custom/delete', 'URL', 3, 2, 'AUTH', '78', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (260, '客户查询', '/api/sys/custom/get', 'URL', 3, 3, 'AUTH', '77,78', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (261, '客户批量导入', '/api/sys/custom/import', 'URL', 3, 4, 'AUTH', '80', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (262, '客户查询条件', '/api/sys/custom/query', 'URL', 3, 5, 'AUTH', '75', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (263, '客户修改', '/api/sys/custom/update', 'URL', 3, 6, 'AUTH', '77', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (264, '供应商新增', '/api/sys/supplier/add', 'URL', 4, 1, 'AUTH', '81', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (265, '供应商启用/禁用', '/api/sys/supplier/enable', 'URL', 4, 2, 'AUTH', '84', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (266, '供应商列表', '/api/sys/supplier/get', 'URL', 4, 3, 'AUTH', '81,83', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (267, '供应商列表', '/api/sys/supplier/list', 'URL', 4, 4, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (268, '供应商列表', '/api/sys/supplier/query', 'URL', 4, 5, 'AUTH', '82', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (269, '供应商修改', '/api/sys/supplier/update', 'URL', 4, 6, 'AUTH', '83', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (270, '设备新增', '/api/sys/device/add', 'URL', 5, 1, 'AUTH', '87', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (271, '设备作废', '/api/sys/device/delete', 'URL', 5, 2, 'AUTH', '88', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (272, '设备作废', '/api/sys/device/disable', 'URL', 5, 3, 'AUTH', '88', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (273, '设备查询条件', '/api/sys/device/get', 'URL', 5, 4, 'AUTH', '86', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (274, '设备列表', '/api/sys/device/list', 'URL', 5, 5, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (275, '设备查询条件', '/api/sys/device/query', 'URL', 5, 6, 'AUTH', '85,86', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (276, '设备新增', '/api/sys/device/update', 'URL', 5, 7, 'AUTH', '87', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (277, '考勤新增', '/api/sys/ding/group/add', 'URL', 7, 1, 'AUTH', '94', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (278, '考勤删除', '/api/sys/ding/group/delete', 'URL', 7, 2, 'AUTH', '96', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (279, '考勤查询', '/api/sys/ding/group/get', 'URL', 7, 3, 'AUTH', '94,95', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (280, '考勤查询', '/api/sys/ding/group/list', 'URL', 7, 4, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (281, '考勤查询条件', '/api/sys/ding/group/query', 'URL', 7, 5, 'AUTH', '106', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (282, '考勤修改', '/api/sys/ding/group/update', 'URL', 7, 6, 'AUTH', '95', 1, 1, 0);
-------------------------------------------------------------------------------------

ALTER TABLE `t_b_user_archives_supplier`
    ADD COLUMN `supplier_id` bigint NULL COMMENT '供应商ID' AFTER `user_archives_id`;
ALTER TABLE `sys_message`
    ADD COLUMN `supplier_id` bigint NULL COMMENT '供应商ID' AFTER `service_id`;
ALTER TABLE `sys_notice`
    ADD COLUMN `supplier_id` bigint NULL COMMENT '供应商ID' AFTER `service_id`;

INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1000, '通知公告', '/api/sys/notice/delete', 'URL', 9, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1001, '通知公告', '/api/sys/notice/disable', 'URL', 9, 2, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1002, '通知公告', '/api/sys/notice/get', 'URL', 9, 3, 'AUTH', '103', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1003, '通知公告发布撤销', '/api/sys/notice/publishOrUnpublish', 'URL', 9, 4, 'AUTH', '100,104', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1004, '通知公告列表', '/api/sys/notice/query', 'URL', 9, 5, 'AUTH', '98', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1005, '通知公告新增修改', '/api/sys/notice/save', 'URL', 9, 6, 'AUTH', '103,99', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1006, '回执查询统计', '/api/sys/message/count', 'URL', 9, 7, 'AUTH', '101', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1007, '回执查询导出', '/api/sys/message/export', 'URL', 9, 8, 'AUTH', '101', 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1008, '回执查询', '/api/sys/message/query', 'URL', 9, 9, 'AUTH', '101', 1, 1, 0);

UPDATE sys_privilege
SET name='通知公告', url='/api/sys/notice/get', `type`='URL', parent_id=9, `sequence`=3, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1002;
UPDATE sys_privilege
SET name='通知公告发布撤销', url='/api/sys/notice/publishOrUnpublish', `type`='URL', parent_id=9, `sequence`=4, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1003;
UPDATE sys_privilege
SET name='通知公告列表', url='/api/sys/notice/query', `type`='URL', parent_id=9, `sequence`=5, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1004;
UPDATE sys_privilege
SET name='通知公告新增修改', url='/api/sys/notice/save', `type`='URL', parent_id=9, `sequence`=6, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1005;
UPDATE sys_privilege
SET name='回执查询统计', url='/api/sys/message/count', `type`='URL', parent_id=9, `sequence`=7, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1006;
UPDATE sys_privilege
SET name='回执查询到出', url='/api/sys/message/export', `type`='URL', parent_id=9, `sequence`=8, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1007;
UPDATE sys_privilege
SET name='回执查询', url='/api/sys/message/query', `type`='URL', parent_id=9, `sequence`=9, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=0
WHERE id=1008;
UPDATE sys_privilege
SET name='列表', url='List', `type`='LIST', parent_id=9, `sequence`=1, property='AUTH', related='1004', enable=1, default_auth=0, front_display=1
WHERE id=98;
UPDATE sys_privilege
SET name='新增', url='Add', `type`='BUTTON', parent_id=9, `sequence`=1, property='AUTH', related='1005', enable=1, default_auth=0, front_display=1
WHERE id=99;
UPDATE sys_privilege
SET name='撤销', url='Cancel', `type`='LINK', parent_id=9, `sequence`=2, property='AUTH', related='1003', enable=1, default_auth=0, front_display=1
WHERE id=100;
UPDATE sys_privilege
SET name='回执查询', url='Select', `type`='LINK', parent_id=9, `sequence`=2, property='AUTH', related='1006,1007,1008', enable=1, default_auth=0, front_display=1
WHERE id=101;
UPDATE sys_privilege
SET name='修改', url='Update', `type`='LINK', parent_id=9, `sequence`=3, property='AUTH', related='1002,1005', enable=1, default_auth=0, front_display=1
WHERE id=103;
UPDATE sys_privilege
SET name='发布', url='Publish', `type`='LINK', parent_id=9, `sequence`=1, property='AUTH', related='1003', enable=1, default_auth=0, front_display=1
WHERE id=104;

---------------------------
----2023.8.8个人工作台：待办任务 通知公告 消息提醒
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1009, '按多个类型统计当前用户未读消息', '/api/sys/message/countByTypes', 'URL', 59, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1010, '查看消息详细', '/api/sys/message/get', 'URL', 59, 2, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1011, '按多个类型查询当前用户未读消息', '/api/sys/message/pageByTypes', 'URL', 59, 3, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1012, '标记消息已阅读', '/api/sys/message/read', 'URL', 59, 4, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '消息提醒', `url` = 'message', `type` = 'MENU', `parent_id` = 59, `sequence` = 1, `property` = NULL, `related` = '1009,1011,1012', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 60;
UPDATE `sys_privilege` SET `name` = '待办任务', `url` = 'work', `type` = 'MENU', `parent_id` = 59, `sequence` = 2, `property` = NULL, `related` = '1009,1011,1012', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 61;
UPDATE `sys_privilege` SET `name` = '通知公告', `url` = 'notice', `type` = 'MENU', `parent_id` = 59, `sequence` = 3, `property` = NULL, `related` = '1009,1010,1011,1012', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 62;
---------------------------


------------------------------
-----2023.8.9延期预警
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1013, '延期预警关闭', '/api/admin/tb/delay/warn/close', 'URL', 47, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1014, '延期预警跟进', '/api/admin/tb/delay/warn/get', 'URL', 47, 2, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1015, '延期预警查询', '/api/admin/tb/delay/warn/query', 'URL', 47, 3, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1016, '延期预警重启', '/api/admin/tb/delay/warn/restart', 'URL', 47, 4, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1017, '延期预警跟进', '/api/admin/tb/delay/warn/detail/list', 'URL', 47, 5, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1018, '延期预警跟进', '/api/admin/tb/delay/warn/detail/save', 'URL', 47, 6, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '列表', `url` = 'List', `type` = 'LIST', `parent_id` = 47, `sequence` = 1, `property` = 'AUTH', `related` = '1015', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 197;
UPDATE `sys_privilege` SET `name` = '查询条件', `url` = 'Condition', `type` = 'CONDITION', `parent_id` = 47, `sequence` = 1, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 198;
UPDATE `sys_privilege` SET `name` = '查询', `url` = 'Select', `type` = 'BUTTON', `parent_id` = 47, `sequence` = 1, `property` = 'AUTH', `related` = '1015', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 199;
UPDATE `sys_privilege` SET `name` = '跟进', `url` = 'Follow', `type` = 'LINK', `parent_id` = 47, `sequence` = 1, `property` = 'AUTH', `related` = '1014,1017,1018', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 200;
UPDATE `sys_privilege` SET `name` = '关闭', `url` = 'Close', `type` = 'LINK', `parent_id` = 47, `sequence` = 2, `property` = 'AUTH', `related` = '1013', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 201;
-------------------------------
---2023.8.9 违规登记
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1019, '违规登记跟进', '/api/admin/tb/violation/detail/query', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1020, '违规登记跟进', '/api/admin/tb/violation/detail/save', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1021, '违规登记关闭', '/api/admin/tb/violation/close', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1022, '违规登记跟进', '/api/admin/tb/violation/get', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1023, '违规登记查询', '/api/admin/tb/violation/query', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1024, '违规登记重启', '/api/admin/tb/violation/restart', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1025, '违规登记保存', '/api/admin/tb/violation/save', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '查询', `url` = 'Select', `type` = 'BUTTON', `parent_id` = 48, `sequence` = 1, `property` = 'AUTH', `related` = '1023', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 205;
UPDATE `sys_privilege` SET `name` = '跟进', `url` = 'Follow', `type` = 'LINK', `parent_id` = 48, `sequence` = 1, `property` = 'AUTH', `related` = '1019,1020,1022', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 206;
UPDATE `sys_privilege` SET `name` = '关闭', `url` = 'Close', `type` = 'LINK', `parent_id` = 48, `sequence` = 2, `property` = 'AUTH', `related` = '1021', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 207;
UPDATE `sys_privilege` SET `name` = '重启', `url` = 'Restart', `type` = 'LINK', `parent_id` = 48, `sequence` = 3, `property` = 'AUTH', `related` = '1024', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 208;

-------------------------------


ALTER TABLE `sys_level_role`
    ADD COLUMN  `quota` bigint NOT NULL COMMENT '配额' AFTER `role_id`;
ALTER TABLE `sys_level`
    ADD COLUMN `devices` bigint NULL COMMENT '设备数量' AFTER `level`;
------------------------------
-----2023.8.10
DROP TABLE IF EXISTS `sys_custom_role`;
CREATE TABLE `sys_custom_role` (
                                   `id` bigint NOT NULL COMMENT '主键',
                                   `custom_id` bigint NOT NULL COMMENT '客户id',
                                   `role_id` bigint NOT NULL COMMENT '角色id',
                                   `quota` bigint NOT NULL COMMENT '配额',
                                   PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户角色配置表';
-------------------------------
---2023.8.10 考勤统计
DROP TABLE IF EXISTS `sys_ding_date`;
CREATE TABLE `sys_ding_date` (
                                 `id` bigint NOT NULL COMMENT '主键',
                                 `year` bigint NOT NULL COMMENT '年',
                                 `month` bigint NOT NULL COMMENT '月',
                                 `day` bigint NOT NULL COMMENT '日',
                                 `type` varchar(50) CHARACTER SET utf8mb4 NOT NULL COMMENT '日期类型：WEEKDAY("工作日"),WEEKEND("周末"),LEGAL_HOLIDAYS("法定节假日")',
                                 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='考勤特殊日期';
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (1, 2023, 9, 29, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (2, 2023, 9, 30, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (3, 2023, 10, 1, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (4, 2023, 10, 2, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (5, 2023, 10, 3, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (6, 2023, 10, 4, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (7, 2023, 10, 5, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (8, 2023, 10, 6, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (9, 2023, 10, 7, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (10, 2023, 10, 8, 'WEEKDAY');
ALTER TABLE `t_b_ding`
    ADD COLUMN `date_type` varchar(20) NULL COMMENT '日期类型：WEEKDAY("工作日"),WEEKEND("周末"),LEGAL_HOLIDAYS("法定节假日")' AFTER `sign_date`;
-------------------------------
ALTER TABLE `sys_device`
    CHANGE COLUMN `supplier` `supplier_id` bigint NULL DEFAULT NULL COMMENT '供应商id' AFTER `buy_time`;
-------------------------------
---2023.8.14 考勤统计
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1026, '工时统计', '/api/admin/tb/ding/count', 'URL', 29, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1027, '工时统计', '/api/admin/tb/ding/export', 'URL', 29, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1028, '工时统计', '/api/admin/tb/ding/query', 'URL', 29, 1, 'AUTH', NULL, 1, 1, 0);

UPDATE `sys_privilege` SET `name` = '工时统计', `url` = 'hourSubmit', `type` = 'MENU', `parent_id` = 25, `sequence` = 4, `property` = NULL, `related` = NULL, `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 29;
UPDATE `sys_privilege` SET `name` = '导出', `url` = 'Export', `type` = 'BUTTON', `parent_id` = 29, `sequence` = 1, `property` = 'AUTH', `related` = '1027', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 149;
UPDATE `sys_privilege` SET `name` = '查询', `url` = 'Select', `type` = 'BUTTON', `parent_id` = 29, `sequence` = 2, `property` = 'AUTH', `related` = '1026, 1028', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 151;
-------------------------------
-------------------------------
---2023.8.14 质量问题反馈
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1029, '质量问题反馈', '/api/admin/tb/quality/problem/apply/delete', 'URL', 21, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1030, '质量问题反馈', '/api/admin/tb/quality/problem/apply/query', 'URL', 21, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1031, '质量问题反馈', '/api/admin/tb/quality/problem/apply/save', 'URL', 21, 1, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '作废', `url` = 'Cancel', `type` = 'BUTTON', `parent_id` = 21, `sequence` = 1, `property` = 'AUTH', `related` = '1029', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 128;
UPDATE `sys_privilege` SET `name` = '查询', `url` = 'Select', `type` = 'BUTTON', `parent_id` = 21, `sequence` = 2, `property` = 'AUTH', `related` = '1030', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 130;
-------------------------------
-------------------------------
---2023.8.15 派单管理
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1032, '派单管理', '/api/admin/tb/crm/batchDisable', 'URL', 50, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1033, '派单管理', '/api/admin/tb/crm/batchZone', 'URL', 50, 2, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1034, '派单管理', '/api/admin/tb/crm/countWaitZone', 'URL', 50, 3, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1035, '派单管理', '/api/admin/tb/crm/delete', 'URL', 50, 4, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1036, '派单管理', '/api/admin/tb/crm/get', 'URL', 50, 5, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1037, '派单管理', '/api/admin/tb/crm/query', 'URL', 50, 6, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1038, '派单管理', '/api/admin/tb/crm/save', 'URL', 50, 7, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '派单管理', `url` = 'crm', `type` = 'MENU', `parent_id` = 50, `sequence` = 1, `property` = 'AUTH', `related` = '1032,1033,1035,1036,1037,1038', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 51;
UPDATE `sys_privilege` SET `name` = '统计查询', `url` = 'crmCount', `type` = 'MENU', `parent_id` = 50, `sequence` = 2, `property` = 'AUTH', `related` = '1034', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 52;
-------------------------------

---2023.8.16
INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(1039, '客户表查询', '/api/sys/custom/list', 'URL', 64, 25, 'SYS', NULL, 1, 1, 0);
---2023.8.17
UPDATE `sys_privilege` SET `name` = '我的工作台', `url` = 'workManage', `type` = 'MENU', `parent_id` = NULL, `sequence` = 1, `property` = NULL, `related` = '1009,1011,1012', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 58;
UPDATE `sys_privilege` SET `name` = '工作台', `url` = 'workChildManage', `type` = 'MENU', `parent_id` = 58, `sequence` = 1, `property` = NULL, `related` = '1009,1011,1012', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 59;

INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(1040, '获取产品信息列表接口', '/api/admin/tb/product/list', 'URL', 64, 26, 'SYS', NULL, 1, 1, 0);


---2023.8.18
DROP TABLE IF EXISTS `sys_custom_role`;



---2023.8.22
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1041, '考勤明细查询', '/api/admin/tb/ding/attendance/count', 'URL', 1044, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1042, '考勤明细查询', '/api/admin/tb/ding/attendance/export', 'URL', 1044, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1043, '考勤明细查询', '/api/admin/tb/ding/attendance/query', 'URL', 1044, 1, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` ( `id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display` )
VALUES
    ( 1044, '考勤明细查询', 'dingDetail', 'MENU', 24, 1, NULL, '1041,1042,1043', 1, 0, 1 );

---20023.8.24
ALTER TABLE `t_b_violation`
    ADD COLUMN `code` varchar(200) CHARACTER SET utf8mb4 NOT NULL COMMENT '编号' AFTER `sop_no`;
INSERT INTO `sequence` (`name`, `current_value`, `increment`) VALUES ('violationWarn', 0, 1);
UPDATE sys_config
SET org_id=NULL, config_key='sms.violation.remind.code', config_name='违规提醒通知', config_value='SMS_462805303', remark=NULL, enable=1, sort=1, create_id=1, create_time=NULL, update_id=NULL, update_time=NULL
WHERE id=31;


--2023.8.25
ALTER TABLE `sys_device`
    CHANGE COLUMN `name` `device_code` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '设备编号' AFTER `id`,
    ADD COLUMN `model` varchar(255) NOT NULL COMMENT '型号' AFTER `brand`,
    ADD COLUMN `bound` varchar(20) NULL COMMENT '出库/入库' AFTER `scan_count`;

CREATE TABLE `sys_device_brand` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `brand` varchar(100) NOT NULL COMMENT '品牌',
                                    `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                    `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                    `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                    `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备品牌表';

CREATE TABLE `sys_device_model` (
                                    `id` bigint NOT NULL COMMENT '主键',
                                    `brand_id` bigint NOT NULL COMMENT '品牌ID',
                                    `model` varchar(255) NOT NULL COMMENT '型号',
                                    `create_id` bigint DEFAULT NULL COMMENT '创建人id',
                                    `create_time` bigint DEFAULT NULL COMMENT '创建时间',
                                    `update_id` bigint DEFAULT NULL COMMENT '更新人id',
                                    `update_time` bigint DEFAULT NULL COMMENT '更新时间',
                                    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备品牌型号表';

INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1045, '设备品牌表列表接口', '/api/sys/device/brand/list', 'URL', 64, 25, 'SYS', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '设备配置', `url` = 'device', `type` = 'MENU', `parent_id` = 2, `sequence` = 3, `property` = NULL, `related` = '', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 5;
UPDATE `sys_privilege` SET `name` = '列表', `url` = 'List', `type` = 'LIST', `parent_id` = 5, `sequence` = 1, `property` = 'AUTH', `related` = '275', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 85;
UPDATE `sys_privilege` SET `name` = '查询条件', `url` = 'Condition', `type` = 'CONDITION', `parent_id` = 5, `sequence` = 1, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 86;
UPDATE `sys_privilege` SET `name` = '新增', `url` = 'Add', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 1, `property` = 'AUTH', `related` = '270', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 87;
UPDATE `sys_privilege` SET `name` = '作废', `url` = 'Cancel', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 2, `property` = 'AUTH', `related` = '271', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 88;
UPDATE `sys_privilege` SET `name` = '查询', `url` = 'Select', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 3, `property` = 'AUTH', `related` = '275', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 105;
UPDATE `sys_privilege` SET `name` = '设备新增修改', `url` = '/api/sys/device/save', `type` = 'URL', `parent_id` = 5, `sequence` = 1, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 270;
UPDATE `sys_privilege` SET `name` = '设备作废', `url` = '/api/sys/device/delete', `type` = 'URL', `parent_id` = 5, `sequence` = 2, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 271;
UPDATE `sys_privilege` SET `name` = '设备禁用', `url` = '/api/sys/device/disable', `type` = 'URL', `parent_id` = 5, `sequence` = 3, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 272;
UPDATE `sys_privilege` SET `name` = '设备查询条件', `url` = '/api/sys/device/get', `type` = 'URL', `parent_id` = 5, `sequence` = 4, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 273;
UPDATE `sys_privilege` SET `name` = '设备列表', `url` = '/api/sys/device/list', `type` = 'URL', `parent_id` = 5, `sequence` = 5, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 274;
UPDATE `sys_privilege` SET `name` = '设备查询条件', `url` = '/api/sys/device/query', `type` = 'URL', `parent_id` = 5, `sequence` = 6, `property` = 'AUTH', `related` = NULL, `enable` = 1, `default_auth` = 1, `front_display` = 0 WHERE `id` = 275;
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1046, '设备启用', '/api/sys/device/enable', 'URL', 5, 7, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1047, '设备导入', '/api/sys/device/import', 'URL', 5, 8, 'AUTH', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1048, '启用', 'Select', 'BUTTON', 5, 4, 'AUTH', '1045', 1, 0, 1);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1049, '禁用', 'Select', 'BUTTON', 5, 5, 'AUTH', '272', 1, 0, 1);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1050, '导入', 'Select', 'BUTTON', 5, 6, 'AUTH', '1046', 1, 0, 1);

--2023.8.30
CREATE TABLE `sys_custom_addr` (
                                   `id` bigint NOT NULL COMMENT '主键',
                                   `custom_id` bigint NOT NULL COMMENT '客户ID',
                                   `province` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '省份',
                                   `city` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '城市',
                                   `area` varchar(100) CHARACTER SET utf8mb4 NOT NULL COMMENT '县区',
                                   `address` varchar(150) CHARACTER SET utf8mb4 NOT NULL COMMENT '地址',
                                   `longitude` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT '经度',
                                   `latitude` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT '纬度',
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户地址表';

---2023.9.20
UPDATE `sys_privilege` SET `name` = '启用', `url` = 'enable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 4, `property` = 'AUTH', `related` = '1045', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1048;
UPDATE `sys_privilege` SET `name` = '禁用', `url` = 'disable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 5, `property` = 'AUTH', `related` = '272', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1049;
UPDATE `sys_privilege` SET `name` = '导入', `url` = 'import', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 6, `property` = 'AUTH', `related` = '1046', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1050;

--2023.9.28
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1051, '获取SOP用户', '/api/admin/sop/user/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '批量启用', `url` = 'BatchEnable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 4, `property` = 'AUTH', `related` = '1046', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1048;
UPDATE `sys_privilege` SET `name` = '批量禁用', `url` = 'BatchUnEnable', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 5, `property` = 'AUTH', `related` = '272', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1049;
UPDATE `sys_privilege` SET `name` = '批量导入', `url` = 'BatchImport', `type` = 'BUTTON', `parent_id` = 5, `sequence` = 6, `property` = 'AUTH', `related` = '1047', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 1050;

---2023.10.8
ALTER TABLE `sys_message`
    MODIFY COLUMN `content` varchar(10000) CHARACTER SET utf8mb4 NOT NULL COMMENT '消息内容' AFTER `receive_user_id`;
ALTER TABLE `sys_notice`
    MODIFY COLUMN `content` varchar(10000) CHARACTER SET utf8mb4 NOT NULL COMMENT '内容' AFTER `title`;

---2023.10.9
INSERT INTO `sys_privilege` ( `id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display` )
VALUES
    ( 1052, '修改', 'Update', 'LINK', 5, 1, 'AUTH', '276', 1, 0, 1 );
INSERT INTO `sys_privilege` ( `id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display` )
VALUES
    ( 1053, '禁用启用', 'Enable', 'LINK', 5, 2, 'AUTH', '272,1046', 1, 0, 1 );

--2023.10.16
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1054, '获取用户', '/api/admin/tb/violation/creator/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1055, '获取用户', '/api/admin/tb/violation/user/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);

--2023.10.19
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1056, '获取用户', '/api/admin/tb/quality/problem/apply/user/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
ALTER TABLE `t_b_delay_warn` ADD COLUMN `close_time` bigint NULL COMMENT '关闭时间';
ALTER TABLE `t_b_violation` ADD COLUMN `close_time` bigint NULL COMMENT '关闭时间';

--2023.10.23
ALTER TABLE `sys_custom` ADD UNIQUE INDEX `code`(`code`);


--2023.10.26
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1057, '二期接口', '/api/sop/analyse/attendance', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1058, '二期接口', '/api/sop/analyse/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1059, '二期接口', '/api/sop/analyse/overview', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1060, '二期接口', '/api/sop/analyse/processing', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1061, '二期接口', '/api/sop/analyse/trend', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1062, '二期接口', '/api/service/analyse/device/use', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1063, '二期接口', '/api/service/analyse/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1064, '二期接口', '/api/service/analyse/overview', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1065, '二期接口', '/api/service/analyse/personnel/quota', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1066, '二期接口', '/api/service/analyse/project/allocation', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1067, '二期接口', '/api/service/analyse/region/personnel', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1068, '二期接口', '/api/service/analyse/supplier', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1069, '二期接口', '/api/service/analyse/supplier/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1070, '二期接口', '/api/service/analyse/supplier/region', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1071, '二期接口', '/api/service/analyse/supplier/region/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1072, '二期接口', '/api/service/analyse/supplier/role', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1073, '二期接口', '/api/admin/tb/crm/analyse/custom/type', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1074, '二期接口', '/api/admin/tb/crm/analyse/custom/type/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1075, '二期接口', '/api/admin/tb/crm/analyse/monthly', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1076, '二期接口', '/api/admin/tb/crm/analyse/monthly/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1077, '二期接口', '/api/admin/tb/crm/analyse/project', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1078, '二期接口', '/api/admin/tb/crm/analyse/project/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1079, '二期接口', '/api/admin/tb/crm/analyse/region', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1080, '二期接口', '/api/admin/tb/crm/analyse/region/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1081, '二期接口', '/api/admin/tb/crm/analyse/supplier', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1082, '二期接口', '/api/admin/tb/crm/analyse/supplier/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1083, '二期接口', '/api/quality/analyse/influence', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1084, '二期接口', '/api/quality/analyse/influence/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1085, '二期接口', '/api/quality/analyse/list', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1086, '二期接口', '/api/quality/analyse/pie', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1087, '二期接口', '/api/quality/analyse/progress', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1088, '二期接口', '/api/quality/analyse/radar', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1089, '二期接口', '/api/quality/analyse/supplier/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1090, '二期接口', '/api/sys/device/monitor/count', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1091, '二期接口', '/api/sys/device/monitor/countByModel', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1092, '二期接口', '/api/sys/device/monitor/countByServiceUnit', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1093, '二期接口', '/api/sys/device/monitor/countByServiceUnitDetail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1094, '二期接口', '/api/sop/schedule/detail', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1095, '二期接口', '/api/sop/schedule/progress', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);


--2023.10.30
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1096, '违规登记跟进', '/api/admin/tb/violation/getByCode', 'URL', 48, 1, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '跟进', `url` = 'Follow', `type` = 'LINK', `parent_id` = 48, `sequence` = 1, `property` = 'AUTH', `related` = '1019,1020,1022,1096', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 206;

--2023.11.3
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1097, '二期接口', '/api/sop/schedule/projectProgress', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);

--2023.11.8
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1098, '考勤提交-明细', '/api/admin/tb/ding/detail', 'URL', 28, 6, 'AUTH', NULL, 1, 1, 0);
UPDATE `sys_privilege` SET `name` = '列表', `url` = 'List', `type` = 'LIST', `parent_id` = 28, `sequence` = 1, `property` = 'AUTH', `related` = '2037,2038,1098', `enable` = 1, `default_auth` = 0, `front_display` = 1 WHERE `id` = 141;

--2023.11.10
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (11, 2023, 12, 30, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (12, 2023, 12, 30, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (13, 2024, 1, 1, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (14, 2024, 2, 4, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (15, 2024, 2, 10, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (16, 2024, 2, 11, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (17, 2024, 2, 12, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (18, 2024, 2, 13, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (19, 2024, 2, 14, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (20, 2024, 2, 15, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (21, 2024, 2, 16, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (22, 2024, 2, 17, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (23, 2024, 2, 18, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (24, 2024, 4, 4, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (25, 2024, 4, 5, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (26, 2024, 4, 6, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (27, 2024, 4, 7, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (28, 2024, 5, 1, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (29, 2024, 5, 2, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (30, 2024, 5, 3, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (31, 2024, 5, 4, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (32, 2024, 5, 5, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (33, 2024, 5, 11, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (34, 2024, 6, 8, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (35, 2024, 6, 9, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (36, 2024, 6, 10, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (37, 2024, 9, 14, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (38, 2024, 9, 29, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (39, 2024, 9, 15, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (40, 2024, 9, 16, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (41, 2024, 9, 17, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (42, 2024, 10, 12, 'WEEKDAY');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (43, 2024, 10, 1, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (44, 2024, 10, 2, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (45, 2024, 10, 3, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (46, 2024, 10, 4, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (47, 2024, 10, 5, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (48, 2024, 10, 7, 'LEGAL_HOLIDAYS');
INSERT INTO `sys_ding_date` (`id`, `year`, `month`, `day`, `type`) VALUES (49, 2024, 4, 28, 'WEEKDAY');

--2023.11.14
INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1099, '二期接口', '/api/admin/tb/crm/analyse/project/count', 'URL', 64, 32, 'SYS', NULL, 1, 1, 0);
ALTER TABLE `sys_device` MODIFY COLUMN `buy_time` bigint NULL COMMENT '购买时间' AFTER `model`;









