From 645a978efcfbb04e124534d9156e339e5162d09b Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Tue, 7 Dec 2021 17:28:38 +0800 Subject: [PATCH] =?UTF-8?q?20211207=E6=B7=BB=E5=8A=A0=E5=B1=B1=E5=A4=A7?= =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E5=B9=B3=E5=8F=B0sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 内部项目/defaultwbs.sql | 110 +++++++++++++- 内部项目/experiment.sql | 322 ++++++++++++++++++++++++++++++++++++++++ 内部项目/sports.sql | 95 +++++++++++- 内部项目/tall3通用.sql | 37 ++--- 4 files changed, 539 insertions(+), 25 deletions(-) create mode 100644 内部项目/experiment.sql diff --git a/内部项目/defaultwbs.sql b/内部项目/defaultwbs.sql index b7989d0..23fde40 100644 --- a/内部项目/defaultwbs.sql +++ b/内部项目/defaultwbs.sql @@ -48,4 +48,112 @@ CREATE TABLE `t_pro_deliver_checker` ( PRIMARY KEY (`id`) USING BTREE, KEY `deliver_index` (`deliver_id`) USING BTREE, KEY `member_index` (`member_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查表'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查表'; + + + +-- 工资表 +DROP TABLE IF EXISTS `t_pro_member_salary`; +CREATE TABLE `t_pro_member_salary` ( + `id` bigint(20) NOT NULL, + `member_id` bigint(20) DEFAULT 0 COMMENT '成员id', + `basic_wage` bigint(20) DEFAULT 0 COMMENT '基本工资', + `position` varchar(64) DEFAULT '' COMMENT '职位', + `working_time` int(11) DEFAULT 0 COMMENT '工作时间', + `share_option` bigint(20) DEFAULT 0 COMMENT '期权置换', + -- `should_salary` bigint(20) DEFAULT 0 COMMENT '应发工资', + `receive_dividends` bigint(20) DEFAULT 0 COMMENT '分红', + `medical_insurance` bigint(20) DEFAULT 0 COMMENT '医疗保险', + `maternity_insurance` bigint(20) DEFAULT 0 COMMENT '生育保险', + `employment_injury_insurance` bigint(20) DEFAULT 0 COMMENT '工伤保险', + `endowment_insurance` bigint(20) DEFAULT 0 COMMENT '养老保险', + `unemployment_insurance` bigint(20) DEFAULT 0 COMMENT '失业保险', + `housing_fund` bigint(20) DEFAULT 0 COMMENT '住房公积金', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `salary_member_index` (`member_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='成员工资表'; + + +{ + //成员id + "memberId":2222222222, + //成员名 + "memberName":"张三", + //固定工资 + "fixedSalaryNum": 5000, + //固定工资分项 + "fixedSalary": { + //基本工资 + "basicWage":5, + "basic":{ + //应出勤天数 + "shouldAttendanceDay":20, + //实际出勤天数 + "realAttendanceDay":10, + //弹性天数 + "elasticityDay":2, + //请假天数 + "askForLeaveDay":3 + } + //岗位工资 + "positionWage":5, + "position":{ + Map + } + //工龄工资 + "workingTimeWage":5 + "workingTime":{ + Map + } + }, + //绩效工资 + "performanceNum":5000, + //绩效工资分项 + "performance":{ + //项目奖金 + "projectBonus":10, + //补助 + "subsidy":10, + //提成 + "push_money":10, + //考核 + "assess":10 + }, + //主人翁收入 + "stockRightsNum": 5000, + //主人翁收入分项 + "stockRightsNum": { + //期权置换 + "sharePtion":10, + //分红 + "shareOutBonus":10 + }, + //应发工资 + "shouldSalaryNum": 5000, + //社保支出 + "socialSecurityNum":5000, + //社保支出分项 + "socialSecurity":{ + //医疗保险 + "medicalInsurance":15, + //生育保险 + "maternityInsurance":15, + //工伤保险 + "employmentInjuryInsurance":15, + //养老保险 + "endowmentInsurance":15, + //失业保险 + "unemploymentInsurance":15, + //住房公积金 + "housingFund":15 + }, + //扣税 + "personalTaxNum":5000, + //实发工资 + "realSalaryNum": 0 +} \ No newline at end of file diff --git a/内部项目/experiment.sql b/内部项目/experiment.sql new file mode 100644 index 0000000..1ca3a71 --- /dev/null +++ b/内部项目/experiment.sql @@ -0,0 +1,322 @@ +-- code字典表 +DROP TABLE IF EXISTS `t_code_dictionaries`; +CREATE TABLE `t_code_dictionaries` ( + `id` bigint(20) NOT NULL, + `code` varchar(20) DEFAULT '' COMMENT '类型code', + `name` varchar(200) DEFAULT '' COMMENT '名称', + `parent_code` varchar(20) DEFAULT '' COMMENT '上级code', + `level` tinyint(1) unsigned DEFAULT 0 COMMENT '层级数', + `sort` int(11) DEFAULT 0 COMMENT '顺序', + `remark` varchar(500) DEFAULT '' COMMENT '备注', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `code_parent_index` (`parent_code`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Code字典表'; + + +-- 试题表表 +DROP TABLE IF EXISTS `t_question`; +CREATE TABLE `t_question` ( + `id` bigint(20) NOT NULL, + `question` varchar(500) DEFAULT '' COMMENT ' 题目', + `code` varchar(20) DEFAULT '' COMMENT '试题所属的code', + `sort` int(11) DEFAULT 0 COMMENT '排序', + `type` tinyint(3) unsigned DEFAULT 1 COMMENT '1单行文本,2多行文本,3单选,4多选,5下拉菜单,6日期,7图片(文件)', + `relevance_option_id` bigint(20) DEFAULT 0 COMMENT '关联选项ID 默认0不关联', + `remark` varchar(500) CHARACTER SET utf8 DEFAULT '' COMMENT ' 备注 ', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `question_code_index` (`code`,`sort`) USING BTREE, + KEY `question_relevance_index` (`relevance_option_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模板信息表'; + + +-- 选项表 +DROP TABLE IF EXISTS `t_question_option`; +CREATE TABLE `t_question_option` ( + `id` bigint(20) NOT NULL, + `question_id` bigint(20) DEFAULT 0 COMMENT ' 试题ID', + `sort` int(11) DEFAULT 1 COMMENT ' 排序 ', + `show_value` varchar(512) DEFAULT '' COMMENT '显示值', + `submit_value` varchar(512) DEFAULT '' COMMENT '提交值', + `after_operation` tinyint(1) unsigned DEFAULT 0 COMMENT '选择之后的操作 0无 1单行文本 2多行文本 3关联其他题目', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `option_question_index` (`question_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='选项表'; + + + +-- 知识产权表 +DROP TABLE IF EXISTS `t_intellectual_property`; +CREATE TABLE `t_intellectual_property` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + `type` tinyint(1) unsigned DEFAULT 0 COMMENT '类型 0专利 1论文 2软著', + `time` bigint(20) DEFAULT 0 COMMENT '时间', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='知识产权表'; + +-- 答题记录表 +DROP TABLE IF EXISTS `t_experiment_question_record`; +CREATE TABLE `t_experiment_question_record` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id/知识产权id', + `questions_id` bigint(20) DEFAULT 0 COMMENT '试题id', + `contents` varchar(512) DEFAULT '' COMMENT '内容', + `submit_id` bigint(20) DEFAULT 0 COMMENT '提交人id(机构成员id)', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE, + KEY `questions_id_contents_index` (`questions_id`,`contents`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='答题记录表'; + + +-- 课题表--课题,子课题,实验 共用一张表 +DROP TABLE IF EXISTS `t_experiment`; +CREATE TABLE `t_experiment` ( + `id` bigint(20) NOT NULL, + `name` varchar(512) DEFAULT '' COMMENT '名称', + `type` tinyint(1) unsigned DEFAULT 0 COMMENT '类型 0课题 1子课题 2实验', + `member_id` bigint(20) DEFAULT 0 COMMENT '负责人id(机构成员id)', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间', + `remark` varchar(512) DEFAULT '' COMMENT '内容备注(实验里的目标)', + `project_id` bigint(20) DEFAULT 0 COMMENT '项目id', + `parent_id` bigint(20) DEFAULT 0 COMMENT '上级课题id', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `member_index` (`member_id`) USING BTREE, + KEY `parent_index` (`parent_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='课题表'; + + +-- 计划任务书 +DROP TABLE IF EXISTS `t_plan_task`; +CREATE TABLE `t_plan_task` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + `technical_indicator` varchar(1024) DEFAULT '' COMMENT '主要技术指标', + `economic_indicators` varchar(1024) DEFAULT '' COMMENT '经济指标', + `social_benefit` varchar(1024) DEFAULT '' COMMENT '社会效益', + `check_content` varchar(60) DEFAULT '' COMMENT '验收内容(存数组) 1工作报告 2技术报告 3计算机软件 4生物品种 5样品或样机 6成套技术设备 7科技论文或著作 8科技报告收录证书', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='计划任务书'; + +-- 课题阶段表 +DROP TABLE IF EXISTS `t_plan_task_stage`; +CREATE TABLE `t_plan_task_stage` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间', + `remark` varchar(512) DEFAULT '' COMMENT '内容备注', + `stage` int(11) unsigned DEFAULT 0 COMMENT '第几阶段', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='计划任务书'; + + +-- 计划任务书自定义字段表 +DROP TABLE IF EXISTS `t_plan_task_defined`; +CREATE TABLE `t_plan_task_defined` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + `t_key` varchar(512) DEFAULT '' COMMENT 'key', + `t_value` varchar(1024) DEFAULT '' COMMENT '内容', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='计划任务书自定义字段表'; + + + +-- 子课题阶段表 +DROP TABLE IF EXISTS `t_sub_experiment_stage`; +CREATE TABLE `t_sub_experiment_stage` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '子课题id', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间', + `thesis` int(11) unsigned DEFAULT 0 COMMENT '论文', + `sci_thesis` int(11) unsigned DEFAULT 0 COMMENT 'SCI论文', + `patent` int(11) unsigned DEFAULT 0 COMMENT '专利', + `invent_patent` int(11) unsigned DEFAULT 0 COMMENT '发明专利', + `practical_patent` int(11) unsigned DEFAULT 0 COMMENT '实用新型专利', + `facade_patent` int(11) unsigned DEFAULT 0 COMMENT '外观专利', + `the_soft` int(11) unsigned DEFAULT 0 COMMENT '软著', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='子课题阶段表'; + + + + +-- 实验提交信息状态表 +DROP TABLE IF EXISTS `t_experiment_status_record`; +CREATE TABLE `t_experiment_status_record` ( + `id` bigint(20) NOT NULL, + `experiment_id` bigint(20) DEFAULT 0 COMMENT '实验id', + `type` tinyint(2) unsigned DEFAULT 0 COMMENT '状态(0已提交,1已锁定,2驳回提交,3解锁申请,4驳回解锁)', + `submit_id` bigint(20) DEFAULT 0 COMMENT '提交人id', + `checker_id` bigint(20) DEFAULT 0 COMMENT '审核人id', + `time` bigint(20) DEFAULT 0 COMMENT '提交的时间', + `remark` varchar(512) DEFAULT '' COMMENT '备注信息', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='实验信息状态'; + + + +-- 会议表 +DROP TABLE IF EXISTS `t_conference`; +CREATE TABLE `t_conference` ( + `id` bigint(20) NOT NULL, + `type` tinyint(1) unsigned DEFAULT 0 COMMENT '会议类型 0科研会议管理 1子课题会议管理', + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题/实验id', + `name` varchar(1024) DEFAULT '' COMMENT '会议名称', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间', + `address` varchar(128) DEFAULT '' COMMENT '地点', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会议表'; + +-- 业务文件表--计划任务书和会议上传的文件表(单次会议上传的文件要去重) +DROP TABLE IF EXISTS `t_business_file`; +CREATE TABLE `t_business_file` ( + `id` bigint(20) NOT NULL, + `business_type` tinyint(1) unsigned DEFAULT 0 COMMENT '文件类型(0会议通知,1会议纪要,2照片附件/其他,3计划任务书)', + `business_id` bigint(20) DEFAULT 0 COMMENT '课题/实验id', + `file_id` bigint(20) DEFAULT 0 COMMENT '文件id', + `path` varchar(128) DEFAULT '' COMMENT '文件路径', + `name` varchar(128) DEFAULT '' COMMENT '文件名', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `update_at` timestamp NOT NULL DEFAULT current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `business_index` (`business_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='业务文件表'; + + + +-- 机构表 +DROP TABLE IF EXISTS `t_organization`; +CREATE TABLE `t_organization` ( + `id` bigint(20) NOT NULL, + `organization_type` tinyint(2) DEFAULT 0 COMMENT '机构类型 0:高校 1:实验室 2:企业', + `code` varchar(64) DEFAULT '' COMMENT '机构编码', + `name` varchar(64) DEFAULT '' COMMENT '机构名称', + `short_name` varchar(64) DEFAULT '' COMMENT '机构简称', + `introduce` varchar(256) DEFAULT '' COMMENT '机构介绍', + `parent_id` bigint(20) DEFAULT 0 COMMENT '上级机构id', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `organization_index` (`parent_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构表'; + + +-- 机构成员表 +DROP TABLE IF EXISTS `t_organization_member`; +CREATE TABLE `t_organization_member` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) DEFAULT 0 COMMENT 'userId', + `name` varchar(64) DEFAULT '' COMMENT '成员名称', + `phone` varchar(64) DEFAULT '' COMMENT '联系方式', + `organization_id` bigint(20) DEFAULT 0 COMMENT '机构id', + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `member_user_index` (`user_id`) USING BTREE, + KEY `member_organization_index` (`organization_id`) USING BTREE, + KEY `member_experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构成员表'; + + +-- -------------------------------------------------------------------------------------------- + +-- 实验流程表 +DROP TABLE IF EXISTS `t_experiment_flow `; +CREATE TABLE `t_experiment_flow` ( + `id` bigint(20) NOT NULL, + `name` varchar(225) DEFAULT '' COMMENT '任务名称', + `description` varchar(225) DEFAULT '' COMMENT '任务描述', + `experiment_id` bigint(20) DEFAULT 0 COMMENT '课题id', + `parent_id` bigint(20) DEFAULT 0 COMMENT '上级任务id', + `type` tinyint(1) unsigned DEFAULT 0 COMMENT '类型 0日常 1定期', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间', + `duration` bigint(20) DEFAULT 0, + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `experiment_index` (`experiment_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='实验流程表'; + + diff --git a/内部项目/sports.sql b/内部项目/sports.sql index 19c9a79..417f084 100644 --- a/内部项目/sports.sql +++ b/内部项目/sports.sql @@ -155,14 +155,15 @@ CREATE TABLE `t_project_official_documents` ( -- 是否审批 CREATE TABLE `t_training_plan` ( `id` bigint(20) NOT NULL, - `name` varchar(255) DEFAULT '' COMMENT '名称', - `description` varchar(1024) DEFAULT '' COMMENT '详情', - `start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间', - `end_time` bigint(20) NULL DEFAULT 0 COMMENT '结束时间', - `file_id` bigint(20) NULL DEFAULT 0 COMMENT '文件id', - `visit_path` varchar(512) DEFAULT '' COMMENT '访问路径', + -- `name` varchar(255) DEFAULT '' COMMENT '名称', + -- `description` varchar(1024) DEFAULT '' COMMENT '详情', + -- `start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间', + -- `end_time` bigint(20) NULL DEFAULT 0 COMMENT '结束时间', + -- `file_id` bigint(20) NULL DEFAULT 0 COMMENT '文件id', + -- `visit_path` varchar(512) DEFAULT '' COMMENT '访问路径', `submit_id` bigint(20) DEFAULT 0 COMMENT '提交人id', `project_id` bigint(20) DEFAULT 0 COMMENT '项目id', + `template_id` bigint(20) DEFAULT 0 COMMENT '模板id', `check_status` tinyint(2) unsigned DEFAULT 0 COMMENT '审核状态 0已提交 1通过 2驳回', `checker_id` bigint(20) DEFAULT 0 COMMENT '审核人id', `reject_cause` varchar(512) DEFAULT '' COMMENT '驳回原因', @@ -266,4 +267,84 @@ CREATE TABLE `t_player_level_relevance` ( KEY `relevance_level_index` (`level_id`) USING BTREE, KEY `relevance_can_apply_level_index` (`can_apply_level_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运动员等级关联表'; - \ No newline at end of file + + + + +-- 修改模板相关表 + + +-- 红头文件模板表 +-- 文件名 +-- 所属机构 +-- 文件id +-- 上传人 +-- 类型 +CREATE TABLE `t_official_documents` ( + `id` bigint(20) NOT NULL, + `submit_id` bigint(20) DEFAULT 0 COMMENT 'userId', + `name` varchar(64) DEFAULT '' COMMENT '名称', + `organization_id` bigint(20) DEFAULT 0 COMMENT '机构id', + `file_id` bigint(20) NULL DEFAULT 0 COMMENT '文件id', + `type` tinyint(2) unsigned DEFAULT 0 COMMENT '类型 0培训计划 1运动员证书 2教练证书 ', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `official_documents_submit_index` (`submit_id`) USING BTREE, + KEY `official_documents_organization_index` (`organization_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='红头文件模板表'; + + +-- 模板信息选项表 +CREATE TABLE `t_question` ( + `id` bigint(20) NOT NULL, + `templete_id` bigint(20) DEFAULT 0 COMMENT '模板id', + `question` varchar(64) DEFAULT '' COMMENT '题目标题', + `sort` int(11) DEFAULT 0 COMMENT '排序', + `type` tinyint(3) unsigned DEFAULT 1 COMMENT '1单行文本,2多行文本,3单选,4多选,5下拉菜单,6日期,7图片(文件)', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `question_templete_idndex` (`templete_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模板信息表'; + +-- 选项表 +CREATE TABLE `t_question_option` ( + `id` bigint(20) NOT NULL, + `question_id` bigint(20) DEFAULT 0 COMMENT ' 试题ID', + `sort` int(11) DEFAULT 1 COMMENT ' 排序 ', + `show_value` varchar(512) DEFAULT '' COMMENT '显示值', + `submit_value` varchar(512) DEFAULT '' COMMENT '提交值', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `option_question_index` (`question_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='选项表'; + + +-- 答题记录表 +CREATE TABLE `t_question_record` ( + `id` bigint(20) NOT NULL, + `business_type` bigint(20) DEFAULT 0 COMMENT '记录类型 0培训计划 1运动员证书 2教练证书 ', + `business_Id` bigint(20) DEFAULT 0 COMMENT '业务id 培训记录id/运动员报名记录id', + `question_id` bigint(20) DEFAULT 0 COMMENT ' 试题ID', + `contents` varchar(512) DEFAULT '' COMMENT '内容', + `submit_id` bigint(20) DEFAULT 0 COMMENT '提交人id(机构成员id)', + + `operator` bigint(20) DEFAULT 0 COMMENT '操作人id', + `created_at` timestamp NOT NULL DEFAULT current_timestamp(), + `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), + `rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `record_business_Index` (`business_Id`) USING BTREE, + KEY `record_question_index` (`question_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='选项表'; diff --git a/内部项目/tall3通用.sql b/内部项目/tall3通用.sql index 7fcd8a3..bca356d 100644 --- a/内部项目/tall3通用.sql +++ b/内部项目/tall3通用.sql @@ -90,10 +90,11 @@ INSERT INTO `t_label` VALUES (29, 5, '公共', 0, '2021-07-20 11:19:09', '2021-0 INSERT INTO `t_label` VALUES (30, 5, '医疗', 1, '2021-07-20 11:19:17', '2021-07-20 16:37:14', 0); INSERT INTO `t_label` VALUES (31, 5, '会务', 2, '2021-07-20 11:19:26', '2021-07-20 16:37:15', 0); INSERT INTO `t_label` VALUES (32, 6, '项目成员', 0, '2021-07-20 11:19:37', '2021-07-20 20:33:44', 0); -INSERT INTO `t_label` VALUES (34, 6, '项目经理', 2, '2021-07-20 11:20:00', '2021-07-22 18:21:31', 0); -INSERT INTO `t_label` VALUES (35, 6, '干系人', 3, '2021-07-20 11:20:07', '2021-07-22 18:21:35', 0); -INSERT INTO `t_label` VALUES (36, 6, '管代', 4, '2021-07-20 11:20:19', '2021-07-22 18:21:37', 0); -INSERT INTO `t_label` VALUES (37, 6, '上帝', 5, '2021-07-20 11:20:28', '2021-07-22 18:21:39', 0); +INSERT INTO `t_label` VALUES (34, 6, '项目经理', 1, '2021-07-20 11:20:00', '2021-08-05 16:24:31', 0); +INSERT INTO `t_label` VALUES (35, 6, '干系人', 2, '2021-07-20 11:20:07', '2021-08-05 16:24:31', 0); +INSERT INTO `t_label` VALUES (36, 6, '管代', 3, '2021-07-20 11:20:19', '2021-08-05 16:24:31', 0); +INSERT INTO `t_label` VALUES (37, 6, '上帝', 4, '2021-07-20 11:20:28', '2021-08-05 16:24:31', 0); +INSERT INTO `t_label` VALUES (38, 6, '创建者', 5, '2021-08-05 16:19:54', '2021-08-05 16:19:54', 0); -- ---------------------------- -- Table structure for t_label_business @@ -574,7 +575,7 @@ SET FOREIGN_KEY_CHECKS = 1; ------2021.08.26 生产未同步---------- +-- ---2021.08.26 生产已同步---------- DROP TABLE IF EXISTS `t_pro_project_share`; CREATE TABLE `t_pro_project_share` ( `id` bigint(20) NOT NULL, @@ -611,18 +612,20 @@ CREATE TABLE `t_pro_share_member` ( -DROP TABLE IF EXISTS `t_sys_holidays`; -CREATE TABLE `t_sys_holidays` ( - `id` bigint(20) NOT NULL, - `year` varchar(64) DEFAULT '' COMMENT '哪一年', - `holiday` varchar(64) DEFAULT '' COMMENT '假期', - `workday` varchar(64) DEFAULT '' COMMENT '调休', +-- DROP TABLE IF EXISTS `t_sys_holidays`; +-- CREATE TABLE `t_sys_holidays` ( +-- `id` bigint(20) NOT NULL, +-- `year` varchar(64) DEFAULT '' COMMENT '哪一年', +-- `holiday` varchar(64) DEFAULT '' COMMENT '假期', +-- `workday` varchar(64) DEFAULT '' COMMENT '调休', - `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', - `created_at` timestamp NULL DEFAULT current_timestamp, - `updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, - `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '节假日表' ROW_FORMAT = Compact; +-- `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', +-- `created_at` timestamp NULL DEFAULT current_timestamp, +-- `updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, +-- `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, +-- PRIMARY KEY (`id`) USING BTREE +-- ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '节假日表' ROW_FORMAT = Compact; +-- INSERT INTO `t_sys_holidays` VALUES (1, '2021', '01-01,01-02,01-03,02-11,02-12,02-13,02-14,02-15,02-16,02-17,04-03,04-04,04-05,05-01,05-02,05-03,05-04,05-05,06-12,06-13,06-14,09-19,09-20,09-21,10-01,10-02,10-03,10-04,10-05,10-06,10-07', '02-07,02-20,04-25,05-08,09-18,09-26,10-09', 0, '2021-11-01 17:12:01', '2021-11-03 17:46:39', 0); +-- INSERT INTO `t_sys_holidays` VALUES (2, '2022', '01-01,01-02,01-03,01-31,02-01,02-02,02-03,02-04,02-05,02-06,04-03,04-04,04-05,04-30,05-01,05-02,05-03,05-04,06-03,06-04,06-05,09-10,09-11,09-12,10-01,10-02,10-03,10-04,10-05,10-06,10-07', '01-29,01-30,04-02,04-24,05-07,10-08,10-09', 0, '2021-11-03 17:51:07', '2021-11-03 17:51:18', 0);