|
@@ -45,8 +45,9 @@ public class AutoRfidReaderTask {
|
|
*/
|
|
*/
|
|
public void run() {
|
|
public void run() {
|
|
String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_OUT);
|
|
String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_OUT);
|
|
|
|
+ String[] tagIds = tagId.split(",");
|
|
List<String> tagList = rfidReaderClient.readTagsOut();
|
|
List<String> tagList = rfidReaderClient.readTagsOut();
|
|
- execute(tagId, tagList, true);
|
|
+ execute(tagIds, tagList, AutoDoorClient.AUTO_DOOR_NO.A, true);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -55,26 +56,30 @@ public class AutoRfidReaderTask {
|
|
*/
|
|
*/
|
|
public void run01() {
|
|
public void run01() {
|
|
String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_IN);
|
|
String tagId = iSysConfigService.selectConfigByKey(REDIS_KEY_RFID_TAGID_IN);
|
|
|
|
+ String[] tagIds = tagId.split(",");
|
|
List<String> tagList = rfidReaderClient.readTagsIn();
|
|
List<String> tagList = rfidReaderClient.readTagsIn();
|
|
- execute(tagId, tagList, false);
|
|
+ execute(tagIds, tagList, AutoDoorClient.AUTO_DOOR_NO.B, false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
* 执行任务
|
|
* 执行任务
|
|
*
|
|
*
|
|
- * @param tagId 需要校验的标签ID
|
|
+ * @param tagIds 需要校验的标签ID
|
|
* @param tagList RFID读取到的tagId
|
|
* @param tagList RFID读取到的tagId
|
|
|
|
+ * @param doorNo 门编号
|
|
* @param isOutdoor 是否墙外的自动门
|
|
* @param isOutdoor 是否墙外的自动门
|
|
*/
|
|
*/
|
|
- public void execute(String tagId, List<String> tagList, boolean isOutdoor) {
|
|
+ public void execute(String[] tagIds, List<String> tagList, AutoDoorClient.AUTO_DOOR_NO doorNo, boolean isOutdoor) {
|
|
if (tagList == null) {
|
|
if (tagList == null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
|
|
if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
|
|
- autoDoorClient.sendClose(isOutdoor);
|
|
+ autoDoorClient.sendClose(doorNo);
|
|
|
|
|
|
if (isOutdoor) {
|
|
if (isOutdoor) {
|
|
|
|
+
|
|
|
|
+
|
|
closeOutDoorNum++;
|
|
closeOutDoorNum++;
|
|
} else {
|
|
} else {
|
|
closeInDoorNum++;
|
|
closeInDoorNum++;
|
|
@@ -82,11 +87,18 @@ public class AutoRfidReaderTask {
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- boolean contains = tagList.contains(tagId);
|
|
+ boolean contains = false;
|
|
|
|
+ for (String tagId : tagIds) {
|
|
|
|
+ if (contains = tagList.contains(tagId)) {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
if (contains) {
|
|
if (contains) {
|
|
- autoDoorClient.sendOpen(isOutdoor);
|
|
+ autoDoorClient.sendOpen(doorNo);
|
|
if (isOutdoor) {
|
|
if (isOutdoor) {
|
|
|
|
+
|
|
|
|
+
|
|
closeOutDoorNum = 0;
|
|
closeOutDoorNum = 0;
|
|
} else {
|
|
} else {
|
|
closeInDoorNum = 0;
|
|
closeInDoorNum = 0;
|
|
@@ -96,9 +108,11 @@ public class AutoRfidReaderTask {
|
|
|
|
|
|
|
|
|
|
if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
|
|
if (isOutdoor ? closeOutDoorNum < 10 : closeInDoorNum < 10) {
|
|
- autoDoorClient.sendClose(isOutdoor);
|
|
+ autoDoorClient.sendClose(doorNo);
|
|
|
|
|
|
if (isOutdoor) {
|
|
if (isOutdoor) {
|
|
|
|
+
|
|
|
|
+
|
|
closeOutDoorNum++;
|
|
closeOutDoorNum++;
|
|
} else {
|
|
} else {
|
|
closeInDoorNum++;
|
|
closeInDoorNum++;
|