-- 说明: FIIH质量管理优化、设备巡检计划模块

-- =============================================
-- 一、FIIH质量管理优化
-- =============================================

-- 1.1 FIIH数据表增加工单关联字段
ALTER TABLE `ymes_fiih_data` ADD COLUMN `work_order_id` BIGINT DEFAULT NULL COMMENT '关联工单ID' AFTER `fiih_data_ch23`;
ALTER TABLE `ymes_fiih_data` ADD COLUMN `work_order_number` VARCHAR(64) DEFAULT NULL COMMENT '工单编号' AFTER `work_order_id`;
ALTER TABLE `ymes_fiih_data` ADD COLUMN `process_id` BIGINT DEFAULT NULL COMMENT '工序ID' AFTER `work_order_number`;
ALTER TABLE `ymes_fiih_data` ADD COLUMN `process_name` VARCHAR(64) DEFAULT NULL COMMENT '工序名称' AFTER `process_id`;

-- 1.2 FIIH数据表增加报工质检单关联字段
ALTER TABLE `ymes_fiih_data` ADD COLUMN `report_quality_id` BIGINT DEFAULT NULL COMMENT '报工质检单ID' AFTER `process_name`;
ALTER TABLE `ymes_fiih_data` ADD COLUMN `report_quality_number` VARCHAR(64) DEFAULT NULL COMMENT '报工质检单编号' AFTER `report_quality_id`;

-- =============================================
-- 二、设备管理优化
-- =============================================

-- 2.1 设备维修单项目类型增加"巡检"选项
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (2, '巡检', 'C', 'inspection_item_type', NULL, 'warning', 'N', '0', 'admin', NOW(), '巡检类型');

-- 2.2 新建设备项目状态字典类型
INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `remark`)
VALUES ('设备项目状态', 'inspection_item_status', '0', 'admin', NOW(), '设备项目状态：正常/异常');

-- 2.3 设备项目状态字典数据
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (0, '正常', '0', 'inspection_item_status', NULL, 'success', 'Y', '0', 'admin', NOW(), '正常状态');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (1, '停用', '1', 'inspection_item_status', NULL, 'danger', 'N', '0', 'admin', NOW(), '异常状态');

-- =============================================
-- 三、巡检计划模块
-- =============================================

-- 3.1 巡检计划表
CREATE TABLE `dm_inspection_plan` (
  `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
  `number` VARCHAR(32) DEFAULT NULL COMMENT '计划编号',
  `name` VARCHAR(64) NOT NULL COMMENT '计划名称',
  `type` VARCHAR(20) NOT NULL DEFAULT 'inspection' COMMENT '类型：inspection巡检/spotcheck点检',
  `frequency` VARCHAR(20) DEFAULT NULL COMMENT '频率：daily每日/weekly每周/monthly每月',
  `cycle_value` INT DEFAULT 1 COMMENT '周期值（如每3天、每2周）',
  `start_date` DATE DEFAULT NULL COMMENT '开始日期',
  `end_date` DATE DEFAULT NULL COMMENT '结束日期',
  `executor_id` BIGINT DEFAULT NULL COMMENT '执行人ID',
  `executor_name` VARCHAR(32) DEFAULT NULL COMMENT '执行人姓名',
  `equipment_ids` VARCHAR(500) DEFAULT NULL COMMENT '关联设备ID（多个逗号分隔）',
  `equipment_names` VARCHAR(500) DEFAULT NULL COMMENT '关联设备名称（多个逗号分隔）',
  `status` VARCHAR(10) NOT NULL DEFAULT '0' COMMENT '状态：0启用/1停用',
  `last_execute_time` DATETIME DEFAULT NULL COMMENT '上次执行时间',
  `next_execute_time` DATETIME DEFAULT NULL COMMENT '下次执行时间',
  `remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
  `create_by` VARCHAR(32) NOT NULL COMMENT '创建人',
  `create_time` DATETIME NOT NULL COMMENT '创建时间',
  `update_by` VARCHAR(32) DEFAULT NULL COMMENT '更新人',
  `update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_status` (`status`),
  KEY `idx_type` (`type`),
  KEY `idx_next_execute_time` (`next_execute_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='巡检计划表';

-- 3.2 巡检记录表
CREATE TABLE `dm_inspection_plan_record` (
  `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '主键',
  `plan_id` BIGINT DEFAULT NULL COMMENT '关联计划ID',
  `plan_number` VARCHAR(32) DEFAULT NULL COMMENT '计划编号',
  `plan_name` VARCHAR(64) DEFAULT NULL COMMENT '计划名称',
  `type` VARCHAR(20) DEFAULT NULL COMMENT '类型：inspection巡检/spotcheck点检',
  `equipment_id` BIGINT DEFAULT NULL COMMENT '设备ID',
  `equipment_name` VARCHAR(64) DEFAULT NULL COMMENT '设备名称',
  `executor_id` BIGINT DEFAULT NULL COMMENT '执行人ID',
  `executor_name` VARCHAR(32) DEFAULT NULL COMMENT '执行人姓名',
  `execute_time` DATETIME DEFAULT NULL COMMENT '执行时间',
  `result` VARCHAR(20) DEFAULT NULL COMMENT '结果：qualified合格/unqualified不合格/normal正常/abnormal异常',
  `result_value` VARCHAR(100) DEFAULT NULL COMMENT '检测值（点检时记录数值）',
  `problem_desc` TEXT DEFAULT NULL COMMENT '问题描述',
  `attachment` VARCHAR(500) DEFAULT NULL COMMENT '附件路径',
  `status` VARCHAR(10) DEFAULT '0' COMMENT '状态：0待处理/1已处理/2已关闭',
  `repair_order_id` BIGINT DEFAULT NULL COMMENT '关联维修单ID',
  `remark` VARCHAR(255) DEFAULT NULL COMMENT '备注',
  `create_by` VARCHAR(32) NOT NULL COMMENT '创建人',
  `create_time` DATETIME NOT NULL COMMENT '创建时间',
  `update_by` VARCHAR(32) DEFAULT NULL COMMENT '更新人',
  `update_time` DATETIME DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_plan_id` (`plan_id`),
  KEY `idx_equipment_id` (`equipment_id`),
  KEY `idx_execute_time` (`execute_time`),
  KEY `idx_result` (`result`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='巡检记录表';

-- 3.3 巡检计划类型字典
INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划类型', 'inspection_plan_type', '0', 'admin', NOW(), '巡检计划类型');

INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (0, '巡检', 'inspection', 'inspection_plan_type', NULL, 'primary', 'Y', '0', 'admin', NOW(), '全面排查');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (1, '点检', 'spotcheck', 'inspection_plan_type', NULL, 'success', 'N', '0', 'admin', NOW(), '关键点位检查');

-- 3.4 巡检计划频率字典
INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划频率', 'inspection_plan_frequency', '0', 'admin', NOW(), '巡检计划执行频率');

INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (0, '每日', 'daily', 'inspection_plan_frequency', NULL, 'default', 'N', '0', 'admin', NOW(), '每日执行');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (1, '每周', 'weekly', 'inspection_plan_frequency', NULL, 'default', 'N', '0', 'admin', NOW(), '每周执行');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (2, '每月', 'monthly', 'inspection_plan_frequency', NULL, 'default', 'N', '0', 'admin', NOW(), '每月执行');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (3, '每季度', 'quarterly', 'inspection_plan_frequency', NULL, 'default', 'N', '0', 'admin', NOW(), '每季度执行');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (4, '每年', 'yearly', 'inspection_plan_frequency', NULL, 'default', 'N', '0', 'admin', NOW(), '每年执行');

-- 3.5 巡检结果字典
INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `remark`)
VALUES ('巡检结果', 'inspection_result', '0', 'admin', NOW(), '巡检/点检结果');

INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (0, '合格', 'qualified', 'inspection_result', NULL, 'success', 'N', '0', 'admin', NOW(), '巡检合格');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (1, '不合格', 'unqualified', 'inspection_result', NULL, 'danger', 'N', '0', 'admin', NOW(), '巡检不合格');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (2, '正常', 'normal', 'inspection_result', NULL, 'success', 'N', '0', 'admin', NOW(), '点检正常');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (3, '异常', 'abnormal', 'inspection_result', NULL, 'danger', 'N', '0', 'admin', NOW(), '点检异常');

-- 3.6 巡检记录状态字典
INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录状态', 'inspection_record_status', '0', 'admin', NOW(), '巡检记录处理状态');

INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (0, '待处理', '0', 'inspection_record_status', NULL, 'warning', 'Y', '0', 'admin', NOW(), '待处理');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (1, '已处理', '1', 'inspection_record_status', NULL, 'success', 'N', '0', 'admin', NOW(), '已处理');
INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `remark`)
VALUES (2, '已关闭', '2', 'inspection_record_status', NULL, 'info', 'N', '0', 'admin', NOW(), '已关闭');

-- =============================================
-- 四、菜单配置
-- =============================================

-- 4.1 巡检计划菜单（设备管理菜单ID为2168）
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划', 2168, 10, 'inspectionPlan', 'mes/equipment/inspectionPlan/index', NULL, 1, 0, 'C', '0', '0', 'equipment:inspectionPlan:list', 'date', 'admin', NOW(), '巡检计划菜单');

-- 获取刚插入的菜单ID（用于子菜单）
SET @inspection_plan_menu_id = LAST_INSERT_ID();

-- 4.2 巡检计划按钮权限
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划查询', @inspection_plan_menu_id, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlan:query', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划新增', @inspection_plan_menu_id, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlan:add', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划修改', @inspection_plan_menu_id, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlan:edit', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检计划删除', @inspection_plan_menu_id, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlan:remove', '#', 'admin', NOW(), NULL);

-- 4.3 巡检记录菜单
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录', 2168, 11, 'inspectionPlanRecord', 'mes/equipment/inspectionPlanRecord/index', NULL, 1, 0, 'C', '0', '0', 'equipment:inspectionPlanRecord:list', 'log', 'admin', NOW(), '巡检记录菜单');

SET @inspection_record_menu_id = LAST_INSERT_ID();

-- 4.4 巡检记录按钮权限
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录查询', @inspection_record_menu_id, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlanRecord:query', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录新增', @inspection_record_menu_id, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlanRecord:add', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录修改', @inspection_record_menu_id, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlanRecord:edit', '#', 'admin', NOW(), NULL);
INSERT INTO `sys_menu` (`menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `remark`)
VALUES ('巡检记录删除', @inspection_record_menu_id, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'equipment:inspectionPlanRecord:remove', '#', 'admin', NOW(), NULL);

-- =============================================
-- 五、编码规则（可选）
-- =============================================

-- 5.1 巡检计划编码规则主表
INSERT INTO `sys_code_rule` (`remark`, `create_by`, `create_time`, `name`, `basic_domain`, `status`)
VALUES ('巡检计划编码规则：XJ + 日期 + 流水号', 'admin', NOW(), '巡检计划编码', 'InspectionPlan', '0');

SET @inspection_plan_rule_id = LAST_INSERT_ID();

-- 5.2 巡检计划编码规则子表
-- 第1项：常量 XJ
INSERT INTO `sys_code_rule_entry` (`rule_id`, `sort`, `type_id`, `constant_char`)
VALUES (@inspection_plan_rule_id, 1, 'B', 'XJ');

-- 第2项：日期 yyyyMMdd
INSERT INTO `sys_code_rule_entry` (`rule_id`, `sort`, `type_id`, `date_format`)
VALUES (@inspection_plan_rule_id, 2, 'C', 'yyyyMMdd');

-- 第3项：流水号（4位，用0补位）
INSERT INTO `sys_code_rule_entry` (`rule_id`, `sort`, `type_id`, `length_flow`, `max_flow`, `code_cover`)
VALUES (@inspection_plan_rule_id, 3, 'A', 4, 1, '0');


-- =============================================
-- 六、回退SQL（如需回退请执行以下语句）
-- =============================================

/*
-- 6.1 删除编码规则
DELETE FROM `sys_code_rule_entry` WHERE `rule_id` = (SELECT `id` FROM `sys_code_rule` WHERE `basic_domain` = 'InspectionPlan');
DELETE FROM `sys_code_rule` WHERE `basic_domain` = 'InspectionPlan';

-- 6.2 删除菜单（先删除子菜单，再删除父菜单）
DELETE FROM `sys_menu` WHERE `perms` LIKE 'equipment:inspectionPlanRecord:%';
DELETE FROM `sys_menu` WHERE `perms` = 'equipment:inspectionPlanRecord:list';
DELETE FROM `sys_menu` WHERE `perms` LIKE 'equipment:inspectionPlan:%';
DELETE FROM `sys_menu` WHERE `perms` = 'equipment:inspectionPlan:list';

-- 6.3 删除字典数据
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_record_status';
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_result';
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_plan_frequency';
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_plan_type';
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_item_status';
DELETE FROM `sys_dict_data` WHERE `dict_type` = 'inspection_item_type' AND `dict_value` = 'C';

-- 6.4 删除字典类型
DELETE FROM `sys_dict_type` WHERE `dict_type` = 'inspection_record_status';
DELETE FROM `sys_dict_type` WHERE `dict_type` = 'inspection_result';
DELETE FROM `sys_dict_type` WHERE `dict_type` = 'inspection_plan_frequency';
DELETE FROM `sys_dict_type` WHERE `dict_type` = 'inspection_plan_type';
DELETE FROM `sys_dict_type` WHERE `dict_type` = 'inspection_item_status';

-- 6.5 删除巡检表
DROP TABLE IF EXISTS `dm_inspection_plan_record`;
DROP TABLE IF EXISTS `dm_inspection_plan`;

-- 6.6 删除FIIH数据表工单关联字段
ALTER TABLE `ymes_fiih_data` DROP COLUMN `report_quality_number`;
ALTER TABLE `ymes_fiih_data` DROP COLUMN `report_quality_id`;
ALTER TABLE `ymes_fiih_data` DROP COLUMN `process_name`;
ALTER TABLE `ymes_fiih_data` DROP COLUMN `process_id`;
ALTER TABLE `ymes_fiih_data` DROP COLUMN `work_order_number`;
ALTER TABLE `ymes_fiih_data` DROP COLUMN `work_order_id`;
*/


-- =============================================
-- 七、菜单名称及排序优化
-- =============================================

-- 7.1 修改菜单名称：设备维修计划 → 设备点检项目
UPDATE `sys_menu` SET `menu_name` = '设备点检项目' WHERE `path` = 'inspectionItem' AND `component` = 'mes/equipment/inspectionItem/index';

-- 7.2 修改巡检计划菜单名称：巡检计划 → 多设备巡检计划
UPDATE `sys_menu` SET `menu_name` = '多设备巡检计划' WHERE `path` = 'inspectionPlan' AND `component` = 'mes/equipment/inspectionPlan/index';

-- 7.3 调整菜单排序：设备点检项目 order_num 4→3，设备维修单 order_num 3→4
UPDATE `sys_menu` SET `order_num` = 3 WHERE `path` = 'inspectionItem' AND `component` = 'mes/equipment/inspectionItem/index';
UPDATE `sys_menu` SET `order_num` = 4 WHERE `path` = 'repairOrder' AND `component` = 'mes/equipment/repairOrder/index';


-- 7.4 将设备报警记录移动到YIOT物联菜单下（parent_id=2380），order_num设为100
UPDATE `sys_menu` SET `parent_id` = 2380, `order_num` = 100 WHERE `path` = 'faultRecord' AND `component` = 'mes/device/faultRecord/index';


-- 7.5 将巡检计划和巡检记录菜单图标改为默认值#
UPDATE `sys_menu` SET `icon` = '#' WHERE `path` = 'inspectionPlan' AND `component` = 'mes/equipment/inspectionPlan/index';
UPDATE `sys_menu` SET `icon` = '#' WHERE `path` = 'inspectionPlanRecord' AND `component` = 'mes/equipment/inspectionPlanRecord/index';

UPDATE `sys_menu` SET `icon` = '#' WHERE `path` = 'faultRecord' AND `component` = 'mes/device/faultRecord/index';


-- 7.6 修改菜单名称：设备维护记录 → 设备点检记录
UPDATE `sys_menu` SET `menu_name` = '设备点检记录' WHERE `path` = 'inspectionItemRecord' AND `component` = 'mes/equipment/inspectionItemRecord';
