|
|
@@ -37,6 +37,8 @@ public interface IntrusionService {
|
|
37
|
37
|
private String deviceIP;
|
|
38
|
38
|
// 机构编码
|
|
39
|
39
|
private String orgCode;
|
|
|
40
|
+ // 通道号
|
|
|
41
|
+ private String channelCode;
|
|
40
|
42
|
}
|
|
41
|
43
|
|
|
42
|
44
|
// 定义内部类
|
|
|
@@ -80,9 +82,48 @@ public interface IntrusionService {
|
|
80
|
82
|
intrusionModel.setAlarmType(sAlarmType);
|
|
81
|
83
|
intrusionModel.setAlarmNow(alarmNow);
|
|
82
|
84
|
intrusionModel.setOrgCode(orgCode);
|
|
|
85
|
+ // 添加通道号
|
|
|
86
|
+ intrusionModel.setChannelCode(getChannelCode(deviceIP));
|
|
83
|
87
|
// 设置异常闯入设备数据-hashCode
|
|
84
|
88
|
redisUtil.hset(MyConstant.INTRUSION_ALARM_IP, deviceIP, intrusionModel, tenMinutes);
|
|
85
|
89
|
log.info("Up it!-> sAlarmType: {} alarmNow: {} deviceIP: {} orgCode: {}", sAlarmType, alarmNow, deviceIP, orgCode);
|
|
86
|
90
|
}
|
|
|
91
|
+
|
|
|
92
|
+ private String getChannelCode(String deviceIP) {
|
|
|
93
|
+ switch (deviceIP) {
|
|
|
94
|
+ case "192.168.193.16":
|
|
|
95
|
+ return "1000377$1$0$0";
|
|
|
96
|
+ case "192.168.193.17":
|
|
|
97
|
+ return "1000378$1$0$0";
|
|
|
98
|
+ case "192.168.143.10":
|
|
|
99
|
+ return "1000262$1$0$0";
|
|
|
100
|
+ case "192.168.143.11":
|
|
|
101
|
+ return "1000264$1$0$0";
|
|
|
102
|
+ case "192.168.163.21":
|
|
|
103
|
+ return "1000098$1$0$0";
|
|
|
104
|
+ case "192.168.153.15":
|
|
|
105
|
+ return "1000119$1$0$0";
|
|
|
106
|
+ case "192.168.153.16":
|
|
|
107
|
+ return "1000121$1$0$0";
|
|
|
108
|
+ case "192.168.153.20":
|
|
|
109
|
+ return "1000126$1$0$0";
|
|
|
110
|
+ case "192.168.153.22":
|
|
|
111
|
+ return "1000129$1$0$0";
|
|
|
112
|
+ case "192.168.153.23":
|
|
|
113
|
+ return "1000131$1$0$0";
|
|
|
114
|
+ case "192.168.153.25":
|
|
|
115
|
+ return "1000134$1$0$0";
|
|
|
116
|
+ case "192.168.173.162":
|
|
|
117
|
+ return "1000221$1$0$0";
|
|
|
118
|
+ case "192.168.173.163":
|
|
|
119
|
+ return "1000220$1$0$0";
|
|
|
120
|
+ case "192.168.173.164":
|
|
|
121
|
+ return "1000200$1$0$0";
|
|
|
122
|
+ default:
|
|
|
123
|
+ return "";
|
|
|
124
|
+ }
|
|
|
125
|
+ }
|
|
87
|
126
|
}
|
|
|
127
|
+
|
|
|
128
|
+
|
|
88
|
129
|
}
|