Browse Source

Merge branch 'master' of dd.tall.wiki:ccsens_wiki/cc_sql

master
zy_Java 4 years ago
parent
commit
2e978627cb
  1. 14
      内部项目/logisticspark.sql
  2. 14
      内部项目/tall.sql
  3. 180
      内部项目/wisdomcar.sql

14
内部项目/logisticspark.sql

@ -25,11 +25,14 @@ CREATE TABLE `t_logistics_car_record` (
`id` bigint(20) NOT NULL COMMENT '车辆记录id',
`car_type` tinyint(1) NULL DEFAULT 0 COMMENT '车辆类型(0-小型车,1-中型车,2-大型车)',
`license_plate` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车牌号',
`plate_type` tinyint(1) NULL DEFAULT 0 COMMENT '车牌类型(0-蓝牌,1-绿牌)',
`plate_type` varchar(10) NULL DEFAULT '' COMMENT '车牌底色',
`files_id` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车辆照片(最多三张)',
`car_weight` bigint(20) NULL DEFAULT 0 COMMENT '车辆重量',
`in_out` tinyint(1) NULL DEFAULT 0 COMMENT '进出类型(0-进,1-出)',
`car_brand` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车辆品牌',
`picture` varchar(500) DEFAULT '' COMMENT '全景图',
`closeup_pic` varchar(500) DEFAULT '' COMMENT '车牌特写图',
`cam_id` varchar(100) DEFAULT '' COMMENT '相机id',
`warehouse_id` bigint(20) NULL DEFAULT 0 COMMENT '厂区id',
`record_time` bigint(20) NULL DEFAULT 0 COMMENT '记录时间',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
@ -139,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晋恒通)'

14
内部项目/tall.sql

@ -1351,3 +1351,17 @@ CREATE TABLE `t_wps_notify` (
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wps通知' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
--------------------------------------------
-- 2021.05.24:
-- 任务增加创建者id字段
ALTER TABLE t_pro_task_detail ADD build_user bigint(20) NULL DEFAULT 0 COMMENT '创建者'
-- 2021.05.25:
--:
ALTER TABLE t_pro_task_detail ADD last_task_detail_id bigint(20) NULL DEFAULT 0 COMMENT '上级任务详情id'
--
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 '两个任务时间差'

180
内部项目/wisdomcar.sql

@ -215,3 +215,183 @@ 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_patient_doctor` (
`id` bigint(20) NOT NULL COMMENT '医患id',
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id',
`doctor_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,
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-已完善)'
ALTER TABLE t_hospital_member ADD member_name varchar(20) NULL DEFAULT '' COMMENT '医生名字'
ALTER TABLE t_hospital_member ADD member_sex tinyint(1) NULL DEFAULT 0 COMMENT '医生性别(0-女,1-男)'
ALTER TABLE t_hospital_member ADD member_phone varchar(20) NULL DEFAULT '' COMMENT '医生电话'

Loading…
Cancel
Save