diff --git a/内部项目/logisticspark.sql b/内部项目/logisticspark.sql index ee1dc26..faef856 100644 --- a/内部项目/logisticspark.sql +++ b/内部项目/logisticspark.sql @@ -142,3 +142,12 @@ CREATE TABLE `t_logistics_warehouse` ( ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物流园仓库表' ROW_FORMAT = Compact; SET FOREIGN_KEY_CHECKS = 1; + + + + + +-----------------已更新生产------------- +-- 2021.05.31 + --物流园,车辆记录表增加园区id + ALTER TABLE t_logistics_car_record ADD park_id bigint(20) NULL DEFAULT 0 COMMENT '园区id(0现海园区,1晋恒通)' \ No newline at end of file diff --git a/内部项目/tall.sql b/内部项目/tall.sql index 7ecd9e1..522c04e 100644 --- a/内部项目/tall.sql +++ b/内部项目/tall.sql @@ -1353,7 +1353,7 @@ CREATE TABLE `t_wps_notify` ( SET FOREIGN_KEY_CHECKS = 1; -------------------------未同步生产数据库-------------------- +------------------------已同步生产数据库-------------------- -- 2021.05.24: -- 任务增加创建者id字段 @@ -1364,4 +1364,4 @@ SET FOREIGN_KEY_CHECKS = 1; --任务详情表增加上级关联类型 ALTER TABLE t_pro_task_detail ADD last_type tinyint(1) NULL DEFAULT 0 COMMENT '上级提醒类型(0不提醒 1开始前,2开始时,3开始后,4结束前,5结束时,6结束后,7自定义时间)' --任务详情表增加时间差 - ALTER TABLE t_pro_task_detail ADD time_difference bigint(20) NULL DEFAULT 0 COMMENT '两个任务时间差' \ No newline at end of file + ALTER TABLE t_pro_task_detail ADD time_difference bigint(20) NULL DEFAULT 0 COMMENT '两个任务时间差' diff --git a/内部项目/wisdomcar.sql b/内部项目/wisdomcar.sql index dd764a6..355f19d 100644 --- a/内部项目/wisdomcar.sql +++ b/内部项目/wisdomcar.sql @@ -215,3 +215,177 @@ end delimiter ; SET FOREIGN_KEY_CHECKS = 1; + + + + +-----------------------------------未更新生产----------------------------------- +-- 2021-06-01:智慧平车创建新表: + DROP TABLE IF EXISTS `t_patient_project`; + CREATE TABLE `t_patient_project` ( + `id` bigint(20) NOT NULL COMMENT '患者项目id', + `medical_record_num` varchar(20) NULL DEFAULT '' COMMENT '病案号', + `name` varchar(20) NULL DEFAULT '' COMMENT '患者姓名', + `sex` tinyint(1) NULL DEFAULT 0 COMMENT '患者性别(0-女,1-男)', + `age` int(10) NULL DEFAULT 0 COMMENT '患者年龄', + `id_card` varchar(64) NULL DEFAULT '' COMMENT '患者身份证号', + `phone` varchar(20) NULL DEFAULT '' COMMENT '患者联系电话', + `project_id` bigint(20) NULL 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `project_index`(`project_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者项目表' ROW_FORMAT = Compact; + + + DROP TABLE IF EXISTS `t_patient_family`; + CREATE TABLE `t_patient_family` ( + `id` bigint(20) NOT NULL COMMENT '患者家属id', + `name` varchar(20) NULL DEFAULT '' COMMENT '家属姓名', + `phone` varchar(20) NULL DEFAULT '' COMMENT '家属联系方式', + `patient_id` bigint(20) NULL 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `patient_index`(`patient_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者家属表' ROW_FORMAT = Compact; + + + DROP TABLE IF EXISTS `t_patient_wisdom_car`; + CREATE TABLE `t_patient_wisdom_car` ( + `id` bigint(20) NOT NULL COMMENT '患者平车id', + `patient_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id', + `task_sub_id` bigint(20) NULL DEFAULT 0 COMMENT '分解任务id', + `car_id` bigint(20) DEFAULT 0 COMMENT '平车id', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间(分配即开始)', + `end_time` bigint(20) DEFAULT 0 COMMENT '结束时间(点击结束则为结束)', + `is_demo` tinyint(1) NULL DEFAULT 0 COMMENT '是否演示(0-否,1-是)', + `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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + + INDEX `task_index`(`task_sub_id`) USING BTREE, + INDEX `car_index`(`car_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者平车表' ROW_FORMAT = Compact; + +DROP TABLE IF EXISTS `t_patient_data`; + CREATE TABLE `t_patient_data` ( + `id` bigint(20) NOT NULL COMMENT '患者数据id', + `patient_car_id` bigint(20) NULL DEFAULT 0 COMMENT '患者平车id', + `wisdom_car_record_id` bigint(20) NULL DEFAULT 0 COMMENT '平车数据记录id', + `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', + `task_sub_id` bigint(20) NULL DEFAULT 0 COMMENT '分解任务id', + `step_id` bigint(20) NULL DEFAULT 0 COMMENT '节点id(环节id)', + `step_status` tinyint(1) NULL DEFAULT 0 COMMENT '节点状态(0-开始)', + `push_status` tinyint(2) NULL DEFAULT 0 COMMENT '推送状态(0-未推送,1-推送失败,2-推送成功)', + `start_time` bigint(20) DEFAULT 0 COMMENT '开始时间', + `type` tinyint(1) NULL DEFAULT 0 COMMENT '类型(0-平车,1-用户)', + `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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `patient_car_index`(`patient_car_id`) USING BTREE, + INDEX `wisdom_car_record_index`(`wisdom_car_record_id`) USING BTREE, + INDEX `user_index`(`user_id`) USING BTREE, + INDEX `task_sub_index`(`task_sub_id`) USING BTREE, + INDEX `step_index`(`step_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者数据表' ROW_FORMAT = Compact; + + +DROP TABLE IF EXISTS `t_patient_information_record`; + CREATE TABLE `t_patient_information_record` ( + `id` bigint(20) NOT NULL COMMENT '患者信息记录id', + `patient_car_id` bigint(20) NULL DEFAULT 0 COMMENT '患者平车id', + `task_sub_id` bigint(20) NULL DEFAULT 0 COMMENT '分解任务id', + `information_type` tinyint(1) NULL DEFAULT 0 COMMENT '类型(0-图片,1-文本)', + `content` varchar(500) NULL DEFAULT '' COMMENT '内容', + + `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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `patient_car_index`(`patient_car_id`) USING BTREE, + INDEX `task_sub_index`(`task_sub_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者信息记录表' ROW_FORMAT = Compact; + +DROP TABLE IF EXISTS `t_step_task`; + CREATE TABLE `t_step_task` ( + `id` bigint(20) NOT NULL COMMENT '环节任务id', + `step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id', + `task_sub_id` bigint(20) NULL DEFAULT 0 COMMENT '分解任务id', + `patient_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id', + `batch` int(10) NULL DEFAULT 0 COMMENT '批次', + `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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `step_index`(`step_id`) USING BTREE, + INDEX `task_sub_index`(`task_sub_id`) USING BTREE, + INDEX `patient_index`(`patient_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '环节任务表' ROW_FORMAT = Compact; + + + +DROP TABLE IF EXISTS `t_hospital_member`; + CREATE TABLE `t_hospital_member` ( + `id` bigint(20) NOT NULL COMMENT '医院成员id', + `position` tinyint(1) NULL DEFAULT 0 COMMENT '职位(0-,1-)', + `department` tinyint(1) NULL DEFAULT 0 COMMENT '部门(0-,1-)', + `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', + `user_id` bigint(20) NULL 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `hospital_index`(`hospital_id`) USING BTREE, + INDEX `user_index`(`user_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医院成员表' ROW_FORMAT = Compact; + +DROP TABLE IF EXISTS `t_hospital_wroking`; + CREATE TABLE `t_hospital_wroking` ( + `id` bigint(20) NOT NULL , + `start_time` bigint(20) NULL DEFAULT 0 COMMENT '值班开始时间', + `end_time` bigint(20) NULL DEFAULT 0 COMMENT '值班结束时间', + `hospital_member_id` bigint(20) NULL 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `hospital_member_index`(`hospital_member_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '值班表' ROW_FORMAT = Compact; + +DROP TABLE IF EXISTS `t_hospital`; + CREATE TABLE `t_hospital` ( + `id` bigint(20) NOT NULL COMMENT '医院id', + `hospital_code` varchar(64) NULL DEFAULT '' COMMENT '医院code', + `hospital_name` varchar(64) NULL DEFAULT '' COMMENT '医院名称', + `hospital_short_name` varchar(64) NULL DEFAULT '' COMMENT '医院简称', + `hospital_intro` varchar(500) NULL DEFAULT '' COMMENT '医院简介', + `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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医院' ROW_FORMAT = Compact; + +DROP TABLE IF EXISTS `t_patient_doctor`; + CREATE TABLE `t_hospital` ( + `id` bigint(20) NOT NULL COMMENT '医患id', + `patient_id` varchar(64) NULL DEFAULT '' COMMENT '患者id', + `doctor_id` varchar(64) NULL DEFAULT '' 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE + INDEX `patient_index`(`patient_id`) USING BTREE + INDEX `doctor_index`(`doctor_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生和患者' ROW_FORMAT = Compact; + + + +ALTER TABLE t_step ADD task_sub_name varchar(50) NULL DEFAULT '' COMMENT '分解任务名称' + +ALTER TABLE t_patient_wisdom_car ADD binding_status tinyint(1) NULL DEFAULT '' COMMENT '绑定状态(0-待完善,1-已完善)' \ No newline at end of file