You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

139 lines
13 KiB

-- ----------------------------
-- TABLE STRUCTURE FOR BLADE_MODULE_VERSION
-- ----------------------------
CREATE TABLE IF NOT EXISTS `BLADE_MODULE_VERSION` (
`MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL,
`HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL,
PRIMARY KEY (`MODULE_NAME`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_PROCESS_TYPE
-- ----------------------------
CREATE TABLE IF NOT EXISTS `HZIMS_PROCESS_TYPE` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`SEQUENCE` INT(11) NOT NULL COMMENT '序号',
`DEPLOYMENT_ID` VARCHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前环节流程KEY',
`DEPLOYMENT_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前流程名称',
`SEGMENT` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '一个流程图的名称',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 1 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流审批类型' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_STATISTICS
-- ----------------------------
CREATE TABLE IF NOT EXISTS `HZIMS_STATISTICS` (
`ID` BIGINT(20) NOT NULL COMMENT '编号',
`MODULE_NAME` VARCHAR(150) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`MODULE_NAME_NUM` INT(11) NULL DEFAULT 0 COMMENT '功能模块统计',
`DATE_CALCULATED` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '统计日期',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`SORT` INT(11) NULL DEFAULT NULL COMMENT '排序',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '操作日志统计数据' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_SYS_LOG
-- ----------------------------
CREATE TABLE IF NOT EXISTS `HZIMS_SYS_LOG` (
`ID` BIGINT(20) NOT NULL COMMENT '操作日志编号',
`TENANT_ID` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID',
`SERVER_IP` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务器IP',
`SERVER_HOST` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务器地址',
`SERVER_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '服务名称',
`ENV` VARCHAR(20) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '环境',
`OPERATION_USER_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '操作人ID',
`OPERATION_USER_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作人名称',
`PATH` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '请求路径 (操作地址)',
`USER_AGENT` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户代理',
`METHOD` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作方式',
`METHOD_CLASS` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法类',
`METHOD_NAME` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法名',
`COST_TIME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法执行时间 消耗时间 毫秒',
`PARAMETER` VARCHAR(2000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法入参',
`MODULE_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`TITLE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作方法',
`ACTION` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '方法描述',
`OPERATOR_TYPE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '系统类型',
`BUSINESS_TYPE` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '操作人类别',
`JSON_RESULT` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '返回结果',
`LOCAL_IP` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '请求的IP',
`ERROR_MSG` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '错误消息',
`OPERATION_TIME` DATETIME NULL DEFAULT NULL COMMENT '操作时间',
`STATUS` TINYINT(4) NULL DEFAULT NULL COMMENT '操作状态(0 正常 1 异常)',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除 (0 可用 1 删除)',
PRIMARY KEY (`ID`) USING BTREE,
INDEX `HZIMS_SYS_LOG_OPERATION_TIME_INDEX`(`OPERATION_TIME`) USING BTREE,
INDEX `HZIMS_SYS_LOG_MODULE_NAME_INDEX`(`MODULE_NAME`) USING BTREE,
INDEX `HZIMS_SYS_LOG_TITLE_INDEX`(`TITLE`) USING BTREE
) ENGINE = MYISAM CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR HZIMS_WORKFLOW_OPERATION_LOG
-- ----------------------------
CREATE TABLE IF NOT EXISTS `HZIMS_WORKFLOW_OPERATION_LOG` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`TAKE_ID` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务ID',
`TAKE_NAME` VARCHAR(150) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前任务名称',
`PROCESS_DEFINITION_KEY` CHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '当前环节流程ID',
`PROCESS_INSTANCE_KEY` CHAR(160) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '实例KEY',
`NEXT_STEP_OPERATOR` VARCHAR(1000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '下一环节处理人',
`VARIABLES` LONGTEXT CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL COMMENT '表单',
`USER_ID` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '用户ID',
`HANDLETYPE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT ' 根据HANDLETYPE区分是用户还是候选组角色 标识 0是用户 1是角色',
`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(1) NULL DEFAULT 0 COMMENT '是否逻辑删除,0 可用,1. 不可用',
`IS_OPERATION_LOG` TINYINT(1) NULL DEFAULT 0 COMMENT '1 正常日志 0 错误日志',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 13245 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流操作日志' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR LOG_OPTIONS_MODULE_NAME
-- ----------------------------
CREATE TABLE IF NOT EXISTS `LOG_OPTIONS_MODULE_NAME` (
`ID` BIGINT(20) NOT NULL AUTO_INCREMENT,
`MODULE_NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '功能模块',
`SORT` INT(11) NULL DEFAULT NULL COMMENT '排序',
`CREATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`IS_DELETED` TINYINT(4) NULL DEFAULT 0 COMMENT '逻辑删除 (0 可用 1 删除)',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 67 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- TABLE STRUCTURE FOR PROCESS_DICT
-- ----------------------------
CREATE TABLE IF NOT EXISTS `PROCESS_DICT` (
`DICT_CODE` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '票据编码',
`DICT_SORT` INT(4) NULL DEFAULT 0 COMMENT '票据排序',
`DICT_KEY` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据字典码',
`DICT_VALUE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据流程标识',
`DICT_LABEL` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据标签',
`DICT_TYPE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '票据类型',
`IS_DEFAULT` CHAR(1) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT 'N' COMMENT '是否默认(Y是 N否)',
`STATUS` TINYINT(1) NULL DEFAULT 0 COMMENT '状态(0正常 1停用)',
`CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '所属机构',
`CREATE_TIME` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`UPDATE_TIME` DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`REMARK` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '票据备注',
PRIMARY KEY (`DICT_CODE`) USING BTREE
) ENGINE = INNODB AUTO_INCREMENT = 10 CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '工作流字典表' ROW_FORMAT = DYNAMIC;
-- 初始化流程配置記錄
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (1, 0, 'networking', 'workTicketFlow', '工作票', '两票管理', 'Y', 0, NULL, '2023-06-05 09:43:47', '2023-06-12 10:04:30', '第一种工作票 第二种工作票');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (2, 0, 'moreActionBankDirect', 'standardTicketFlow', '操作票', '两票管理', 'Y', 0, NULL, '2023-06-06 14:15:39', '2023-06-06 14:15:52', '操作票');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (3, 0, 'machinery', 'workTicketFlowmachinery', '机械工作票', '两票管理', 'Y', 0, NULL, '2023-06-12 10:04:56', '2023-06-12 10:07:52', '水力机械工作票');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (4, 0, 'maintenance', 'maintenance_test', '日常维护流程', '日常维护', 'Y', 0, NULL, '2023-06-14 15:06:39', '2023-06-14 15:06:41', '日常维护');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (5, 0, 'defectCheck', 'defectCheck', '消缺流程', '', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-26 11:36:54', '消缺流程');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (6, 6, 'overhaul_plan', 'overhaul_plan', '检修计划v4', '检修计划', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-16 17:04:01', '检修计划流程');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (7, 7, 'overhaul_task', 'overhaul_task', '检修任务v4', '检修任务', 'Y', 0, NULL, '2023-06-16 17:01:01', '2023-06-16 17:04:01', '检修任务流程');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (8, 8, 'duty_rec', 'duty_rec', '交接班v4', '交接班', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '交接班流程');
INSERT INTO `hzims-middle`.`process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (9, 9, 'workTicketFlowmachinery', 'workTicketFlowmachinery', '水力机械工作票流程', '水力机械工作票', 'Y', 0, NULL, '2023-11-20 11:03:29', '2023-11-20 11:03:29', '水力机械工作票流程');