| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.ruoyi.web.job; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.hutool.core.collection.CollUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.convert.Convert; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.util.ObjectUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.hutool.core.util.StrUtil; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -143,7 +144,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //不是user表中的数据不处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (!StrUtil.equalsAnyIgnoreCase(table, "ship_recognition", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!StrUtil.equalsAnyIgnoreCase(table, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "ship_recognition", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                "ship_snap_address", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "alert", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "monitor_point", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 "device", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -160,13 +163,19 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 // 黑烟船舶数据入库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.createDocument(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "monitor_point")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 检测点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.createDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CacheConstants.DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "device")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 设备信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "ship_static_info")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 船舶信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (ObjectUtil.isNotEmpty(afterDataMap.get("mmsi"))) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -192,7 +201,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument_test") || StrUtil.equalsIgnoreCase(table, "sem_instrument"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-站点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.createDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-违规船舶 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 查询站点信息 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -209,13 +220,19 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             case UPDATE: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.updateDocument(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "monitor_point")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 检测点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.updateDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CacheConstants.DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "device")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 设备信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "ship_static_info")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 船舶信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.updateDocument(ElasticConstants.SO2_SHIP_STATIC_INFO, Convert.toStr(afterDataMap.get("mmsi")), afterDataMap); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -225,7 +242,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument_test") || StrUtil.equalsIgnoreCase(table, "sem_instrument"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-站点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.updateDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id")), afterDataMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-违规船舶 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 查询站点信息 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -240,13 +259,19 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             case DELETE: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_recognition")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.deleteDocument(ElasticConstants.HEIYAN_SHIP_RECOGNITION, Convert.toStr(afterDataMap.get("id"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else if (StrUtil.equalsIgnoreCase(database, "heiyan") && StrUtil.equalsIgnoreCase(table, "ship_snap_address")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "monitor_point")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 检测点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.deleteDocument(ElasticConstants.SO2_MONITOR_POINT, Convert.toStr(afterDataMap.get("id"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CacheConstants.DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "device")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 设备信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "so2") && StrUtil.equalsIgnoreCase(table, "ship_static_info")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 船舶信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.deleteDocument(ElasticConstants.SO2_SHIP_STATIC_INFO, Convert.toStr(afterDataMap.get("mmsi"))); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -256,7 +281,9 @@ public class CanalScheduling implements Runnable, ApplicationContextAware { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && (StrUtil.equalsIgnoreCase(table, "sem_instrument_test") || StrUtil.equalsIgnoreCase(table, "sem_instrument"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-站点信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.deleteDocument(ElasticConstants.AIS_SEM_INSTRUMENT, Convert.toStr(afterDataMap.get("id"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    redisCache.deleteObject(CacheConstants.SO2_DEVICE_STATIC); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    redisCache.deleteObject(CollUtil.set(false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_STATIC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            CacheConstants.DEVICE_TYPE_STATIC)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else if (StrUtil.equalsIgnoreCase(database, "ais_database") && StrUtil.equalsIgnoreCase(table, "illegal_ship")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 嗅探系统-违规船舶 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     client.deleteDocument(ElasticConstants.AIS_ILLEGAL_SHIP, Convert.toStr(afterDataMap.get("id"))); 
			 |