-- 2024-09-04
CREATE TABLE sys_custom_receiver  (
    `id` bigint(0) NOT NULL COMMENT '主键',
    `type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型，OFFICE：教务处，CLOUD_MARK：研究生',
    `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户名称',
    `unit` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '具体单位',
    `consignee` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收件人',
    `consignee_phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收件人电话',
    `consignee_address` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收件人地址',
    `create_id` bigint(0) NULL DEFAULT NULL COMMENT '创建人id',
    `create_time` bigint(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_id` bigint(0) NULL DEFAULT NULL COMMENT '更新人id',
    `update_time` bigint(0) NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '客户收件人信息表' ROW_FORMAT = Dynamic;

-- 收件信息
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (400, '收件信息', 'receiver', 'MENU', 2, 6, NULL, NULL, 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (401, '新增', 'Add', 'BUTTON', 400, 1, 'AUTH', '407', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (402, '查询', 'Select', 'BUTTON', 400, 2, 'AUTH', '411,412', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (403, '导出', 'Export', 'BUTTON', 400, 3, 'AUTH', '410', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (404, '列表', 'List', 'LIST', 400, 4, 'AUTH', '411,412', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (405, '修改', 'Update', 'LINK', 400, 1, 'AUTH', '408', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (406, '删除', 'Delete', 'LINK', 400, 2, 'AUTH', '409', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (407, '收件信息新增', '/api/sys/custom/receiver/save', 'URL', 400, 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 (408, '收件信息修改', '/api/sys/custom/receiver/save', 'URL', 400, 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 (409, '收件信息删除', '/api/sys/custom/receiver/delete', 'URL', 400, 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 (410, '收件信息导出', '/api/sys/custom/receiver/export', 'URL', 400, 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 (411, '收件信息列表', '/api/sys/custom/receiver/page', 'URL', 400, 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 (412, '客户列表', '/api/sys/custom/receiver/list', 'URL', 400, 6, 'AUTH', NULL, 1, 1, 0);

-- 2024-09-05
-- 项目监控
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (420, '项目监控', 'ProjectMonitor', 'MENU', 40, 3, NULL, NULL, 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (421, '查询条件', 'Condition', 'CONDITION', 420, 1, 'AUTH', '425', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (422, '查询', 'Select', 'BUTTON', 420, 2, 'AUTH', '425', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (423, '列表', 'List', 'LIST', 420, 3, 'AUTH', '425', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (424, '工作证', 'Card', 'LINK', 420, 4, 'AUTH', '426', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (425, '项目监控列表', '/api/admin/project/monitor/page', 'URL', 420, 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 (426, '工作证详情', '/api/admin/project/monitor/user/detail', 'URL', 420, 2, 'AUTH', NULL, 1, 1, 0);
update sys_privilege set sequence=4 where id=43;
update sys_privilege set sequence=5 where id=44;


-- 2024-09-09
-- 匹配导出
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (430, '导出', 'Export', 'BUTTON', 51, 5, 'AUTH', '435', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (435, '匹配导出', '/api/admin/tb/crm/receiver/export', 'URL', 51, 9, 'AUTH', NULL, 1, 1, 0);


-- 2024-09-14
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (291, '客户表查询', '/api/sys/custom/list/by/serviceUnit', 'URL', 64, 34, 'SYS', NULL, 1, 1, 0);

-- 2024-09-18
update sys_privilege set property='SYS' where id=426;



-- 以下为数据驾驶舱相关脚本

-- 2024-09-20
-- 删除以前的关联
delete from sys_privilege where id in (1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072) and parent_id=1102;
delete from sys_privilege where id in (1094,1095,1097) and parent_id=1104;
delete from sys_privilege where id in (1057,1058,1059,1060,1061) and parent_id=1103;

-- 服务单元、项目进度监控、sop预警报表脚本
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1140, '查询条件', 'Condition', 'CONDITION', 1102, 1, 'AUTH', '1146,1147,1148', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1141, '查询', 'Select', 'BUTTON', 1102, 1, 'AUTH', '1146,1147,1148', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1142, '列表', 'List', 'LIST', 1102, 1, 'AUTH', '1146,1147,1148', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1143, '详情', 'Detail', 'LINK', 1102, 1, 'AUTH', '1149,1150', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1146, '服务单元概况接口', '/api/admin/service/analyse/overview', 'URL', 1102, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1147, '项目整体进度接口', '/api/admin/service/analyse/progress', 'URL', 1102, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1148, '区域概况接口', '/api/admin/service/analyse/province', 'URL', 1102, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1149, '详情接口', '/api/admin/service/analyse/detail', 'URL', 1102, 4, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1150, '导出接口', '/api/admin/service/analyse/detail/export', 'URL', 1102, 5, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1151, '查询条件', 'Condition', 'CONDITION', 1104, 1, 'AUTH', '1155,1156,1157', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1152, '查询', 'Select', 'BUTTON', 1104, 1, 'AUTH', '1155,1156,1157', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1153, '列表', 'List', 'LIST', 1104, 1, 'AUTH', '1155,1156,1157', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1154, '详情', 'Detail', 'LINK', 1104, 1, 'AUTH', '1149,1150', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1155, '按大区进度统计接口', '/api/admin/crm/process/monitor/region', 'URL', 1104, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1156, '按人力商进度统计接口', '/api/admin/crm/process/monitor/supplier', 'URL', 1104, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1157, '按区域协调人进度统计接口', '/api/admin/crm/process/monitor/coordinator', 'URL', 1104, 3, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1160, '查询条件', 'Condition', 'CONDITION', 1103, 1, 'AUTH', '1164,1165,1166', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1161, '查询', 'Select', 'BUTTON', 1103, 1, 'AUTH', '1164,1165,1166', 1, 0, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1162, '列表', 'List', 'LIST', 1103, 1, 'AUTH', '1164,1165,1166', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1163, '详情', 'Detail', 'LINK', 1103, 1, 'AUTH', '1149,1150', 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1164, '按大区预警统计接口', '/api/admin/sop/warn/monitor/region', 'URL', 1103, 1, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1165, '按人力商预警统计接口', '/api/admin/sop/warn/monitor/supplier', 'URL', 1103, 2, 'AUTH', NULL, 1, 1, 1);
INSERT INTO sys_privilege(`id`, `name`, `url`, `type`, `parent_id`, `sequence`, `property`, `related`, `enable`, `default_auth`, `front_display`) VALUES (1166, '按区域协调人预警统计接口', '/api/admin/sop/warn/monitor/coordinator', 'URL', 1103, 3, 'AUTH', NULL, 1, 1, 1);

