use `sys-prec`; alter table `prec_question_info` add column `exclusion_detail` varchar(100) DEFAULT '' COMMENT '互斥选项(如1,2|3,4(1,2互斥,3,4互斥))' AFTER `required`; ALTER TABLE `prec_question_info` MODIFY COLUMN `control_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '控件类型(0:无类型,默认值 1:单选 2:多选 3:多行输入,生命体征 4:上传图片 5:文本域,自行服药 6:文本框 7:数字文本框 8:多选伴无,9:时间带单位, 10:温度拨盘)'; INSERT INTO `prec_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '温度拨盘', '10', '1', '99', '单标签组件类型'); DROP TABLE IF EXISTS `prec_statistical`; CREATE TABLE `prec_statistical` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除', `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间', `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改', `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值', `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改', `hospital_id` bigint(20) DEFAULT NULL COMMENT '医院id', `hospital_dept_id` bigint(20) DEFAULT NULL COMMENT '部门id', `doctor_id` bigint(20) DEFAULT NULL COMMENT '医生id', `patient_id` bigint(20) DEFAULT NULL COMMENT '病人id', `inquiry_code` varchar(255) DEFAULT NULL COMMENT '就诊号', `label_id` int(10) DEFAULT NULL COMMENT '标签ID', `label_name` varchar(100) DEFAULT NULL COMMENT '标签名', `operation_type` varchar(100) DEFAULT NULL COMMENT '操作类型(1:常见标签点击, 2:搜索标签点击)', `operation_num` int(5) DEFAULT NULL COMMENT '操作次数', `status` int(5) DEFAULT '0' COMMENT '是否存在标签库(0:默认有,1:无)', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据埋点统计表'; -- 加入关联子问题 ALTER TABLE `prec_question_detail` ADD COLUMN `sub_question` varchar(100) NOT NULL DEFAULT '' COMMENT '关联子问题(questionId多个逗号隔开)' AFTER `exclusion`; UPDATE `prec_dictionary_info` SET `id`='16', `is_deleted`='N', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `group_type`='2', `name`='多选伴随', `val`='8', `return_type`='1', `order_no`='80', `remark`='单标签组件类型' WHERE (`id`='16');