diff --git a/sql/contracts20230922zK.sql b/sql/contracts20230922zK.sql new file mode 100644 index 00000000..6dfd1719 --- /dev/null +++ b/sql/contracts20230922zK.sql @@ -0,0 +1,119 @@ + +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- 合同档案 for ea_electronic_contracts +-- ---------------------------- +DROP TABLE IF EXISTS `ea_electronic_contracts`; +CREATE TABLE `ea_electronic_contracts` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `create_by` varchar(20) DEFAULT NULL COMMENT '制单人', + `creator` varchar(20) DEFAULT NULL COMMENT '创建者', + `create_time` datetime DEFAULT NULL COMMENT '创建日期', + `company_id` bigint unsigned DEFAULT NULL COMMENT '业务实体id', + `company` varchar(30) DEFAULT NULL COMMENT '业务实体', + `update_time` datetime DEFAULT NULL COMMENT '更新日期', + `dept_id` bigint DEFAULT NULL COMMENT '所属部门id', + `dept_name` varchar(30) DEFAULT NULL COMMENT '所属部门', + `contract_code` varchar(64) DEFAULT NULL COMMENT '合同编号', + `contract_title` varchar(100) DEFAULT NULL COMMENT '合同名称', + `contract_type` varchar(50) DEFAULT NULL COMMENT '合同类型', + `signatory` varchar(50) DEFAULT NULL COMMENT '签署方', + `sign_date` date DEFAULT NULL COMMENT '签署日期', + `effective_date` date DEFAULT NULL COMMENT '生效日期', + `expiry_date` date DEFAULT NULL COMMENT '截止日期', + `contract_status` varchar(50) DEFAULT NULL COMMENT '状态', + `contract_amount` decimal(10,0) DEFAULT NULL COMMENT '金额', + `contract_attachment` varchar(200) DEFAULT NULL COMMENT '附件', + `handle_result` varchar(500) DEFAULT NULL COMMENT '处理结果', + `year` varchar(20) DEFAULT NULL COMMENT '年度', + `period` varchar(20) DEFAULT NULL COMMENT '月份', + `borrow_status` varchar(2) DEFAULT NULL COMMENT '借阅状态', + `record_time` varchar(20) DEFAULT NULL COMMENT '归档时间', + `position` varchar(255) DEFAULT NULL COMMENT '纸档位置', + `cherks` int DEFAULT NULL COMMENT '完整性', + `record_id` bigint DEFAULT NULL COMMENT '归档id,一个归档id对应多个合同档案', + `user_id` bigint DEFAULT NULL COMMENT '用户id', + `deleted` bit(1) DEFAULT b'0' COMMENT '是否删除', + `updater` varchar(20) DEFAULT NULL COMMENT '更新者', + `file_status` varchar(64) DEFAULT NULL COMMENT '归档状态', + `tenant_id` bigint NOT NULL COMMENT '租户编号,一个集团/总公司对应一个租户', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='合同档案'; + +-- ---------------------------- +-- 员工档案 for ea_electronic_employee +-- ---------------------------- +DROP TABLE IF EXISTS `ea_electronic_employee`; +CREATE TABLE `ea_electronic_employee` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', + `create_by` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '制单人', + `creator` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建者', + `create_time` datetime DEFAULT NULL COMMENT '创建日期', + `company_id` bigint DEFAULT NULL COMMENT '业务实体id', + `company` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '业务实体', + `update_time` datetime DEFAULT NULL COMMENT '更新日期', + `dept_id` bigint DEFAULT NULL COMMENT '所属部门id', + `dept_name` varchar(30) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属部门', + `name` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '员工姓名', + `gender` varchar(10) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '性别', + `birthdate` date DEFAULT NULL COMMENT '出生日期', + `nationality` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '国籍', + `address` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '地址', + `contact_number` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系方式', + `id_card_number` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '身份证号', + `passport_number` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '护照号码', + `graduation_school` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '毕业学校', + `major` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '专业', + `education` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '学历', + `education_experience` text COLLATE utf8mb4_general_ci COMMENT '教育经历', + `work_experience` text COLLATE utf8mb4_general_ci COMMENT '工作经历', + `job_title` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职位', + `job_level` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '职位级别', + `job_description` text COLLATE utf8mb4_general_ci COMMENT '职位描述', + `salary` decimal(10,0) DEFAULT NULL COMMENT '薪酬', + `health_condition` text COLLATE utf8mb4_general_ci COMMENT '身体状况', + `medical_records` text COLLATE utf8mb4_general_ci COMMENT '体检记录', + `disease_history` text COLLATE utf8mb4_general_ci COMMENT '疾病史', + `social_insurance` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '养老保险', + `pension_insurance` decimal(10,0) DEFAULT NULL COMMENT '医疗保险', + `medical_insurance` decimal(10,0) DEFAULT NULL COMMENT '失业保险', + `unemployment_insurance` decimal(10,0) DEFAULT NULL COMMENT '失业保险', + `work_injury_insurance` decimal(10,0) DEFAULT NULL COMMENT '工伤保险', + `leave_records` text COLLATE utf8mb4_general_ci COMMENT '考核评价', + `overtime_records` text COLLATE utf8mb4_general_ci COMMENT '奖惩记录', + `welfare_benefits` text COLLATE utf8mb4_general_ci COMMENT '培训计划', + `performance_evaluation` text COLLATE utf8mb4_general_ci COMMENT '培训成果', + `rewards_punishments` text COLLATE utf8mb4_general_ci COMMENT '个人标签', + `training_records` text COLLATE utf8mb4_general_ci COMMENT '兴趣爱好', + `personal_description` text COLLATE utf8mb4_general_ci COMMENT '特长', + `year` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '年度', + `period` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '月份', + `borrow_status` varchar(2) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '借阅状态', + `record_time` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '归档时间', + `position` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '纸档位置', + `cherks` int DEFAULT NULL COMMENT '完整性', + `record_id` bigint DEFAULT NULL COMMENT '归档id', + `user_id` bigint DEFAULT NULL COMMENT '用户id', + `deleted` bit(1) DEFAULT b'0' COMMENT '是否删除', + `updater` varchar(20) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新者', + `file_status` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '归档状态', + `tenant_id` bigint NOT NULL COMMENT '租户编号', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='员工档案'; + +-- 合同档案菜单权限 +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2415', '合同档案', '', '2', '0', '2383', 'electronic-contracts', 'clipboard', 'ea/electronicContracts/index', 'ElectronicContracts', '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 15:45:07', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2416', '合同档案查询', 'ea:electronic-contracts:query', '3', '1', '2415', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 11:29:50', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2417', '合同档案创建', 'ea:electronic-contracts:create', '3', '2', '2415', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 11:29:50', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2418', '合同档案更新', 'ea:electronic-contracts:update', '3', '3', '2415', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 11:29:50', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2419', '合同档案删除', 'ea:electronic-contracts:delete', '3', '4', '2415', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 11:29:50', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2420', '合同档案导出', 'ea:electronic-contracts:export', '3', '5', '2415', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-20 11:29:50', '', '2023-09-20 11:29:50', b'0'); + +-- 员工档案菜单权限 +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2439', '员工档案', '', '2', '0', '2383', 'electronic-employee', 'clipboard', 'ea/electronicEmployee/index', 'ElectronicEmployee', '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2440', '员工档案查询', 'ea:electronic-employee:query', '3', '1', '2439', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2441', '员工档案创建', 'ea:electronic-employee:create', '3', '2', '2439', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2442', '员工档案更新', 'ea:electronic-employee:update', '3', '3', '2439', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2443', '员工档案删除', 'ea:electronic-employee:delete', '3', '4', '2439', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0'); +INSERT INTO `lyr-one`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES ('2444', '员工档案导出', 'ea:electronic-employee:export', '3', '5', '2439', '', '', '', NULL, '0', b'1', b'1', b'1', '', '2023-09-22 14:53:59', '', '2023-09-22 14:53:59', b'0');