diff --git a/hzims-service/ticket/src/main/resources/db/1.0.0.sql b/hzims-service/ticket/src/main/resources/db/1.0.0.sql index ea8d831..b51c544 100644 --- a/hzims-service/ticket/src/main/resources/db/1.0.0.sql +++ b/hzims-service/ticket/src/main/resources/db/1.0.0.sql @@ -611,84 +611,7 @@ CREATE TABLE `HZIMS_WORK_TICKET_TEMPLATE` ( ) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作票模板' ROW_FORMAT = DYNAMIC; -- ---------------------------- --- Table structure for hzims_work_task --- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_WORK_TASK`; -CREATE TABLE `HZIMS_WORK_TASK` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键', - `CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作任务单编号', - `HEAD` BIGINT(20) NULL DEFAULT NULL COMMENT '工作负责人', - `HEAD_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作负责人名称', - `HEAD_HANDLE_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作负责人处理时间', - `GROUP_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '班组ID', - `GROUP_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组名称', - `MEMBER` VARCHAR(512) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员ID : 按 “,”分割', - `MEMBER_NAME` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '班组成员名称 : 按 “,”分割', - `PLAN_START_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作计划开始时间', - `PLAN_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作计划结束时间', - `WORK_TICKET_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '工作票ID', - `WORK_TASK` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作任务', - `SECURITY_MEASURES` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '现场安全措施', - `RISK_PRE_CONTROL` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '安全风险及预控措施', - `LICENSOR` BIGINT(20) NULL DEFAULT NULL COMMENT '许可人', - `LICENSOR_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '许可人名称', - `LICENSOR_TIME` DATETIME NULL DEFAULT NULL COMMENT '许可时间', - `TERMINATOR` BIGINT(20) NULL DEFAULT NULL COMMENT '工作结束人', - `TERMINATOR_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作结束人名称', - `WORK_END_TIME` DATETIME NULL DEFAULT NULL COMMENT '工作结束时间', - `MEMO` VARCHAR(2048) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '备注', - `PROCESS_INSTANCE_ID` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程实例ID', - `TASK_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程环节名称', - `NEXT_STEP_OPERATOR` VARCHAR(512) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '流程环节处理人', - `DEPT_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建机构名称', - `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间', - `CREATE_USER` BIGINT(20) NOT NULL COMMENT '创建人', - `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '更新人', - `IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除', - `STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '状态 ', - `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作任务单' ROW_FORMAT = DYNAMIC; - --- ---------------------------- -- VIEW STRUCTURE FOR V_HZIMS_TICKET_INFO -- ---------------------------- DROP VIEW IF EXISTS `V_HZIMS_TICKET_INFO`; CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `V_HZIMS_TICKET_INFO` AS SELECT `HZIMS_TICKET_INFO`.`ID` AS `ID`,`HZIMS_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM (SELECT `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO` UNION ALL SELECT `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TICKET_TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`) `HZIMS_TICKET_INFO` WHERE (`HZIMS_TICKET_INFO`.`IS_DELETED` = 0); - - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人姓名' AFTER `class_group_name`; - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人姓名' AFTER `create_user_name`; - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `issue_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发令人名称' AFTER `update_user_name`; - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `access_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受令人名称' AFTER `issue_order_person_name`; - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `guardian_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `access_order_person_name`; - -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人名称' AFTER `guardian_name`; - - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_principal_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结负责人' AFTER `other_items`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结许可人' AFTER `end_principal_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `finish_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作票终结许可人' AFTER `end_licensor_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_offline` tinyint(2) NULL DEFAULT 0 COMMENT '是否线下 : 1-线下,0-线上' AFTER `is_start`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `signer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发人名称' AFTER `is_offline`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `licensor_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `signer_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `watch_principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值班负责人名称' AFTER `licensor_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `implement_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行状态字段:0未执行,1为执行(运行人员确认过)' AFTER `watch_principal_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人名称' AFTER `implement_status`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `update_user_name`; - diff --git a/hzims-service/ticket/src/main/resources/db/2.0.1.sql b/hzims-service/ticket/src/main/resources/db/2.0.1.sql new file mode 100644 index 0000000..8af5d83 --- /dev/null +++ b/hzims-service/ticket/src/main/resources/db/2.0.1.sql @@ -0,0 +1,33 @@ +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人姓名' AFTER `class_group_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人姓名' AFTER `create_user_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `issue_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发令人名称' AFTER `update_user_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `access_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受令人名称' AFTER `issue_order_person_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `guardian_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `access_order_person_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人名称' AFTER `guardian_name`; + + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_principal_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结负责人' AFTER `other_items`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结许可人' AFTER `end_principal_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `finish_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作票终结许可人' AFTER `end_licensor_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_offline` tinyint(2) NULL DEFAULT 0 COMMENT '是否线下 : 1-线下,0-线上' AFTER `is_start`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `signer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发人名称' AFTER `is_offline`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `licensor_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `signer_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `watch_principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值班负责人名称' AFTER `licensor_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `implement_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行状态字段:0未执行,1为执行(运行人员确认过)' AFTER `watch_principal_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人名称' AFTER `implement_status`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `update_user_name`; +