| 
					
				 | 
			
			
				@@ -121,9 +121,59 @@ BEGIN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             add rec_status int null comment '推荐状态:0:正常案例、1:行社优秀案例、2:已推荐地区优秀案例、3:地区优秀案例、4:已推荐省级优秀案例、5:省级优秀案例' after status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     END IF; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    IF NOT EXISTS(SELECT * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  FROM information_schema.columns 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  WHERE table_schema = DATABASE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND table_name = 'sync_fjnx_org_business_relation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND column_name = 'tree_show_parent_code') THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ALTER TABLE `sync_fjnx_org_business_relation` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ADD COLUMN `tree_show_parent_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构树上显示的父级编码' AFTER `business_parent_code`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    END IF; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    IF NOT EXISTS(SELECT * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  FROM information_schema.columns 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  WHERE table_schema = DATABASE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND table_name = 'sync_fjnx_org_business_relation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND column_name = 'org_type') THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ALTER TABLE `sync_fjnx_org_business_relation` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ADD COLUMN `org_type` int NULL DEFAULT NULL COMMENT '同步配置表自定义机构类型 1:省联社 2:办事处 3: 地区行社' AFTER `tree_show_parent_code`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    END IF; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    IF NOT EXISTS(SELECT * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  FROM information_schema.columns 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  WHERE table_schema = DATABASE() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND table_name = 'sync_fjnx_org_business_relation' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    AND column_name = 'dqhs_org_code') THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ALTER TABLE `sync_fjnx_org_business_relation` 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ADD COLUMN `dqhs_org_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci  NULL DEFAULT NULL COMMENT '办事处对应的地区行社,机构编码是办事处时需要配置' AFTER `org_type`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    END IF; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 END?? 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 DELIMITER ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 CALL schema_change(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+-- 新增fjnx机构同步 机构关系配置表数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+delete from sync_fjnx_org_business_relation ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (1, 'M39000000', 'M31000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (2, 'M42000000', 'M33000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (3, 'M43000000', 'M34000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (4, 'M39000000', 'M35000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (5, 'M45000000', 'M36000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (6, 'M46000000', 'M37000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (7, 'M47000000', 'M38000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (8, '900000000', 'C900000000', 'C900000000', 1, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (9, 'M40000000', 'C900000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (10, 'M44000000', 'C900000000', 'C900000000', 3, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (11, 'M31000000', NULL, NULL, 2, 'M39000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (12, 'M32000000', NULL, NULL, 2, NULL, NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (13, 'M33000000', NULL, NULL, 2, 'M42000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (14, 'M34000000', NULL, NULL, 2, 'M43000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (15, 'M35000000', NULL, NULL, 2, 'M39000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (16, 'M36000000', NULL, NULL, 2, 'M45000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (17, 'M37000000', NULL, NULL, 2, 'M46000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+INSERT INTO `sync_fjnx_org_business_relation` (`id`, `org_code`, `business_parent_code`, `tree_show_parent_code`, `org_type`, `dqhs_org_code`, `create_time`, `modified_name`, `update_time`, `modified_id`) VALUES (18, 'M38000000', NULL, NULL, 2, 'M47000000', NULL, NULL, NULL, NULL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 -- 新增演练任务推荐状态字典 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 delete from sys_dict_type where dict_type='drill_task_rec_status'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 delete from sys_dict_data where dict_type='drill_task_rec_status'; 
			 |