Files
gr_report_java/sql/gzgl.sql
gjm 1116444f09 feat(gzgl): 添加设备故障报修相关数据表
- 创建dev_gzbx表用于存储设备故障报修信息
- 创建dev_gzbx_plan_step表用于管理故障报修方案步骤
- 创建dev_gzbx_wxfa表用于存储维修方案信息
- 创建dev_gzbx_wxgd表用于管理维修工单
- 添加故障类型和严重级别的系统字典数据
- 配置表结构包括故障编号、设备信息、处理状态等字段
2026-03-23 14:52:24 +08:00

194 lines
28 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 给故障报修新增一个java增强 */
INSERT INTO `yunji_dbform_enhance_java` (`tenant_id`, `create_user`, `create_time`, `create_dept`, `update_user`, `update_time`, `is_deleted`, `dbform_id`, `button_code`, `java_type`, `java_class_url`, `online_script`, `active_status`, `remark`, `list_result_handle_type`, `sort`) VALUES (NULL, 1, '2026-03-17 16:50:18', 100, NULL, NULL, 0, 2021105111153053697, 'handle', 'spring', 'faultRepairController', '', 'Y', '', '0', 1);
/* 给故障报修新增一个自定义按钮 */
INSERT INTO `yunji_dbform_button` (`tenant_id`, `create_user`, `create_time`, `create_dept`, `update_user`, `update_time`, `is_deleted`, `dbform_id`, `button_name`, `button_code`, `button_icon`, `button_location`, `button_type`, `button_sort`, `button_exp`, `button_show`, `button_auth`, `button_i18n`) VALUES (NULL, 1, '2026-03-17 16:18:29', 100, 1, '2026-03-17 16:19:46', 0, 2021105111153053697, '处理', 'chuli', '', 'menu', '', 1, '', 'Y', 'Y', '');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修管理-严重级别', 'wxgl_yzjb', 0, '', 1, '2026-03-18 10:11:47', 1, '2026-03-18 10:11:47', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修管理-故障类型', 'wxgl_gzlx', 0, '', 1, '2026-03-18 10:05:47', 1, '2026-03-18 10:05:47', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已完成', '3', 'fault_repair_status', 0, '', '', '', 1, '2026-03-20 08:10:31', NULL, '2026-03-21 14:41:48', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (17, '其他', '17', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (16, '储运部', '16', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (15, '技术中心', '15', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (14, '化验室', '14', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (13, '动力车间', '13', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (12, '原料车间3号生产线', '12', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (11, '原料车间2号生产线', '11', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (10, '原料车间1号生产线', '10', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (9, '口服固体制剂2号生产线', '9', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (8, '口服固体制剂1号生产线', '8', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (7, '小容量注射剂2号生产线', '7', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (6, '小容量注射剂1号生产线', '6', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (5, '一般粉针生产线', '5', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (4, '头孢粉针生产线', '4', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (3, '冻干粉针3号生产线', '3', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (2, '冻干粉针2号生产线', '2', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (1, '冻干粉针1号生产线', '1', 'device_type', 0, '', '', '', 1, '2026-03-20 15:27:50', 1, '2026-03-20 15:27:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已受理', '2', 'fault_repair_status', 0, '', '', '', 1, '2026-03-20 08:10:31', NULL, '2026-03-21 14:41:48', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已受理', '1', 'fault_repair_status', 0, '', '', '', 1, '2026-03-20 08:10:20', 1, '2026-03-20 08:10:20', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '待处理', '0', 'fault_repair_status', 0, '', '', '', 1, '2026-03-20 08:09:58', 1, '2026-03-20 08:09:58', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已验收', '1', 'maintenance_status', 0, '', '', '', 1, '2026-03-19 15:28:10', 1, '2026-03-19 15:28:10', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '待验收', '0', 'maintenance_status', 0, '', '', '', 1, '2026-03-19 15:28:05', 1, '2026-03-19 15:28:05', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '', '3', 'fault_priority_type', 0, 'danger', '', '', 1, '2026-03-19 11:11:08', 1, '2026-03-19 11:11:08', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '', '2', 'fault_priority_type', 0, 'warning', '', '', 1, '2026-03-19 11:10:56', NULL, '2026-03-19 11:11:21', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '', '1', 'fault_priority_type', 0, 'info', '', '', 1, '2026-03-19 11:10:49', NULL, '2026-03-19 11:11:16', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '委外', '2', 'faul_order_type', 0, '', '', '', 1, '2026-03-19 11:10:10', 1, '2026-03-19 11:10:10', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '自修', '1', 'faul_order_type', 0, '', '', '', 1, '2026-03-19 11:10:06', 1, '2026-03-19 11:10:06', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '未处理', '0', 'fault_handling_status', 0, 'info', '', '', 1, '2026-03-19 11:08:18', 1, '2026-03-19 11:08:18', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已处理', '1', 'fault_handling_status', 0, 'success', '', '', 1, '2026-03-19 11:08:00', NULL, '2026-03-19 11:08:23', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '未停机', '0', 'is_shut_down', 0, '', '', '', 1, '2026-03-18 14:48:46', 1, '2026-03-18 14:48:46', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '已停机', '1', 'is_shut_down', 0, '', '', '', 1, '2026-03-18 14:48:36', 1, '2026-03-18 14:48:36', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '', '0', 'infra_boolean_integer', 0, '', '', '', 1, '2026-03-18 14:30:19', 1, '2026-03-18 14:30:19', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '', '1', 'infra_boolean_integer', 0, '', '', '', 1, '2026-03-18 14:30:14', 1, '2026-03-18 14:30:14', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '严重', '3', 'wxgl_yzjb', 0, 'danger', '', '', 1, '2026-03-18 10:12:33', 1, '2026-03-18 10:12:33', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '重要', '2', 'wxgl_yzjb', 0, '', '', '', 1, '2026-03-18 10:12:19', 1, '2026-03-18 10:12:19', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '一般', '1', 'wxgl_yzjb', 0, '', '', '', 1, '2026-03-18 10:12:13', 1, '2026-03-18 10:12:13', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '其他', '4', 'wxgl_gzlx', 0, '', '', '', 1, '2026-03-18 10:06:50', 1, '2026-03-18 10:06:50', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '机械故障', '3', 'wxgl_gzlx', 0, '', '', '', 1, '2026-03-18 10:06:43', 1, '2026-03-18 10:06:43', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '电气故障', '2', 'wxgl_gzlx', 0, '', '', '', 1, '2026-03-18 10:06:32', 1, '2026-03-18 10:06:32', 0);
INSERT INTO `system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`) VALUES (0, '系统故障', '1', 'wxgl_gzlx', 0, '', '', '', 1, '2026-03-18 10:06:19', 1, '2026-03-18 10:06:19', 0);
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修管理-设备类型', 'device_type', 0, '', 1, '2026-03-20 15:27:21', 1, '2026-03-20 15:27:21', 0, '2026-03-20 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('故障报修状态', 'fault_repair_status', 0, '', 1, '2026-03-20 08:09:36', 1, '2026-03-20 08:09:36', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修工单-验收状态', 'maintenance_status', 0, '', 1, '2026-03-19 15:27:32', NULL, '2026-03-19 15:28:24', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('故障优先级', 'fault_priority_type', 0, '', 1, '2026-03-19 11:10:41', 1, '2026-03-19 11:10:41', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('故障工单类型', 'faul_order_type', 0, '', 1, '2026-03-19 11:09:45', 1, '2026-03-19 11:09:45', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('故障处理状态', 'fault_handling_status', 0, '', 1, '2026-03-19 11:07:48', 1, '2026-03-19 11:07:48', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('是否已停机', 'is_shut_down', 0, '', 1, '2026-03-18 14:48:16', 1, '2026-03-18 14:48:16', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('Integer是否类型', 'infra_boolean_integer', 0, '', 1, '2026-03-18 14:30:06', 1, '2026-03-18 14:30:06', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修管理-严重级别', 'wxgl_yzjb', 0, '', 1, '2026-03-18 10:11:47', 1, '2026-03-18 10:11:47', 0, '1970-01-01 00:00:00');
INSERT INTO `system_dict_type` (`name`, `type`, `status`, `remark`, `create_user`, `create_time`, `update_user`, `update_time`, `is_deleted`, `deleted_time`) VALUES ('维修管理-故障类型', 'wxgl_gzlx', 0, '', 1, '2026-03-18 10:05:47', 1, '2026-03-18 10:05:47', 0, '1970-01-01 00:00:00');
DROP TABLE IF EXISTS `dev_gzbx`;
CREATE TABLE `dev_gzbx` (
`id` bigint NOT NULL COMMENT '主键',
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户id',
`fault_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '故障编号',
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '故障名称',
`dev_type` int NULL DEFAULT NULL COMMENT '设备类型',
`dev_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名称',
`dev_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备编号',
`type` tinyint NULL DEFAULT NULL COMMENT '故障类型',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '故障描述',
`level` tinyint NULL DEFAULT NULL COMMENT '严重级别',
`is_stop` tinyint NULL DEFAULT NULL COMMENT '是否已停机',
`reporter` bigint NULL DEFAULT NULL COMMENT '上报人',
`phone_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门id',
`update_user` bigint NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint NULL DEFAULT 0 COMMENT '是否删除',
`dev_status` tinyint NULL DEFAULT 0 COMMENT '维修状态',
`processing_status` tinyint NULL DEFAULT 0 COMMENT '处理状态',
`create_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人姓名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备故障报修' ROW_FORMAT = DYNAMIC;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `dev_gzbx_plan_step`;
CREATE TABLE `dev_gzbx_plan_step` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint NULL DEFAULT NULL COMMENT '方案id',
`step` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '步骤',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`update_user` bigint NULL DEFAULT NULL COMMENT '更新人',
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门id',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户编号',
`is_deleted` int NULL DEFAULT 0 COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2035958249577574403 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bg_0900_ai_ci COMMENT = '故障报修-方案步骤' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of dev_gzbx_plan_step
-- ----------------------------
INSERT INTO `dev_gzbx_plan_step` VALUES (1, 1, '1', NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2034177378348560386, 2029201620194643970, 'cs ', NULL, NULL, 100, '2026-03-18 15:57:35', 1, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2034899364632592385, 2034899275189059585, '1', NULL, NULL, 100, '2026-03-20 15:46:30', 1, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2034899364817141761, 2034899275189059585, '2', NULL, NULL, 100, '2026-03-20 15:46:30', 1, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2035958248935845889, 2035958173450956801, '测试', NULL, NULL, 100, '2026-03-23 13:54:08', 1, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2035958249258807297, 2035958173450956801, '333', NULL, NULL, 100, '2026-03-23 13:54:08', 1, NULL, 0);
INSERT INTO `dev_gzbx_plan_step` VALUES (2035958249577574402, 2035958173450956801, '444', NULL, NULL, 100, '2026-03-23 13:54:08', 1, NULL, 0);
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `dev_gzbx_wxfa`;
CREATE TABLE `dev_gzbx_wxfa` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`update_user` bigint NULL DEFAULT NULL COMMENT '更新人',
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门id',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户编号',
`is_deleted` int NULL DEFAULT 0 COMMENT '是否删除',
`dev_type` int NULL DEFAULT NULL COMMENT '设备类型',
`dev_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '设备名称',
`dev_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '设备编号',
`fault_type` tinyint NULL DEFAULT NULL COMMENT '故障类型',
`fault_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '故障描述',
`dev_status` tinyint NULL DEFAULT NULL COMMENT '维修状态',
`gzbx_id` bigint NULL DEFAULT NULL COMMENT '关联id',
`processing_status` tinyint NULL DEFAULT 0 COMMENT '处理状态',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '方案名称',
`number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '方案编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2035958173450956802 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bg_0900_ai_ci COMMENT = '维修方案' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
DROP TABLE IF EXISTS `dev_gzbx_wxgd`;
CREATE TABLE `dev_gzbx_wxgd` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`gzbx_id` bigint NOT NULL COMMENT '故障报修id',
`is_deleted` tinyint NULL DEFAULT 0 COMMENT '是否删除',
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`update_user` bigint NULL DEFAULT NULL COMMENT '更新人',
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门id',
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
`tenant_id` bigint NULL DEFAULT NULL COMMENT '租户编号',
`processing_status` tinyint NULL DEFAULT NULL COMMENT '验收状态1已验收。0待验收',
`name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '工单名称',
`fault_type` tinyint NULL DEFAULT NULL COMMENT '故障类型',
`dev_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '设备编号',
`dev_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '设备名称',
`priority` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT '1' COMMENT '优先级',
`type` tinyint NULL DEFAULT 1 COMMENT '类型',
`number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '工单编号',
`fault_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '故障描述',
`dev_type` int NULL DEFAULT NULL COMMENT '设备类型',
`maintenance_person` bigint NULL DEFAULT NULL COMMENT '维修人员',
`is_top` tinyint NULL DEFAULT 0 COMMENT '是否停机',
`is_filing` tinyint NULL DEFAULT 0 COMMENT '是否备案',
`reporter` bigint NULL DEFAULT NULL COMMENT '上报人',
`phone_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bg_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号',
`dev_status` tinyint NULL DEFAULT 0 COMMENT '处理状态0未处理1已生成方案2待验收阶段。3已完成',
`level` tinyint NULL DEFAULT NULL COMMENT '严重级别',
`completion_time` datetime NULL DEFAULT NULL COMMENT '完成时间',
`acceptance_time` datetime NULL DEFAULT NULL COMMENT '验收时间',
`create_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人姓名',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_gzbx_id`(`gzbx_id` ASC) USING BTREE COMMENT '故障报修id'
) ENGINE = InnoDB AUTO_INCREMENT = 2034101303270473791 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bg_0900_ai_ci COMMENT = '维修管理-维修工单' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;