|  | @@ -127,3 +127,72 @@ INSERT INTO `sys_dict_type` (`dict_name`, `dict_type`, `status`, `create_by`, `c
 | 
	
		
			
				|  |  |  DELETE FROM `sys_dict_data` WHERE `dict_type` ='sys_org_yewd_level';
 | 
	
		
			
				|  |  |  INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '一级支行', '1', 'sys_org_yewd_level', NULL, 'default', 'N', '0', '超级管理员', '2024-05-30 15:59:45', '', NULL, NULL);
 | 
	
		
			
				|  |  |  INSERT INTO `sys_dict_data` (`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '二级支行', '2', 'sys_org_yewd_level', NULL, 'default', 'N', '0', '超级管理员', '2024-05-30 15:59:55', '', NULL, NULL);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- core_resumption_rule_item 刷排序号
 | 
	
		
			
				|  |  | +UPDATE core_resumption_rule_item
 | 
	
		
			
				|  |  | +SET sort = (
 | 
	
		
			
				|  |  | +    SELECT
 | 
	
		
			
				|  |  | +        newSort
 | 
	
		
			
				|  |  | +    FROM
 | 
	
		
			
				|  |  | +        ( SELECT id, rule_id, `name`, ROW_NUMBER () OVER ( PARTITION BY rule_id ORDER BY `name` ) AS newSort FROM core_resumption_rule_item WHERE deleted = 0 ) AS SortData
 | 
	
		
			
				|  |  | +    WHERE
 | 
	
		
			
				|  |  | +            SortData.id = core_resumption_rule_item.id
 | 
	
		
			
				|  |  | +);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- core_resumption_rule_point 刷排序号
 | 
	
		
			
				|  |  | +UPDATE core_resumption_rule_point
 | 
	
		
			
				|  |  | +SET sort = (
 | 
	
		
			
				|  |  | +    SELECT
 | 
	
		
			
				|  |  | +        newSort
 | 
	
		
			
				|  |  | +    FROM
 | 
	
		
			
				|  |  | +        ( SELECT id, item_id, `name`, ROW_NUMBER () OVER ( PARTITION BY item_id ORDER BY `name` ) AS newSort FROM core_resumption_rule_point WHERE deleted = 0 ) AS SortData
 | 
	
		
			
				|  |  | +    WHERE
 | 
	
		
			
				|  |  | +            SortData.id = core_resumption_rule_point.id
 | 
	
		
			
				|  |  | +);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- core_safetycheck_rule_item 刷排序号
 | 
	
		
			
				|  |  | +UPDATE core_safetycheck_rule_item
 | 
	
		
			
				|  |  | +SET sort = (
 | 
	
		
			
				|  |  | +    SELECT
 | 
	
		
			
				|  |  | +        newSort
 | 
	
		
			
				|  |  | +    FROM
 | 
	
		
			
				|  |  | +        ( SELECT id, rule_id, `name`, ROW_NUMBER () OVER ( PARTITION BY rule_id ORDER BY `name` ) AS newSort FROM core_safetycheck_rule_item WHERE deleted = 0 ) AS SortData
 | 
	
		
			
				|  |  | +    WHERE
 | 
	
		
			
				|  |  | +            SortData.id = core_safetycheck_rule_item.id
 | 
	
		
			
				|  |  | +);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- core_safetycheck_rule_point 刷排序号
 | 
	
		
			
				|  |  | +UPDATE core_safetycheck_rule_point
 | 
	
		
			
				|  |  | +SET sort = (
 | 
	
		
			
				|  |  | +    SELECT
 | 
	
		
			
				|  |  | +        newSort
 | 
	
		
			
				|  |  | +    FROM
 | 
	
		
			
				|  |  | +        ( SELECT id, item_id, `name`, ROW_NUMBER () OVER ( PARTITION BY item_id ORDER BY `name` ) AS newSort FROM core_safetycheck_rule_point WHERE deleted = 0 ) AS SortData
 | 
	
		
			
				|  |  | +    WHERE
 | 
	
		
			
				|  |  | +            SortData.id = core_safetycheck_rule_point.id
 | 
	
		
			
				|  |  | +);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- 刷表的创建时间和修改时间
 | 
	
		
			
				|  |  | +update core_resumption_rule SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_resumption_rule SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_resumption_plan SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_resumption_plan SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_safetycheck_rule SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_safetycheck_rule SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_safecheck_plan SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_safecheck_plan SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_monitoring_retrieval_plan SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_monitoring_retrieval_plan SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_edu_training_plan SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_edu_training_plan SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +update core_drill_plan SET create_time = NOW() where create_time IS NULL;
 | 
	
		
			
				|  |  | +update core_drill_plan SET update_time = create_time where update_time IS NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +-- core_safety_task 刷检查开始时间和结束时间
 | 
	
		
			
				|  |  | +update core_safety_task set start_time = submit_time,end_time = submit_time where submit_by is not null;
 |