|
|
|
@ -777,24 +777,22 @@ public class PatrolTaskController extends BaseController { |
|
|
|
List<String> infoListFull = map.get("listFull"); |
|
|
|
logger.info("[TASK] taskId1: {}, infoList1: {}, infoListFull1: {}", patrolTask.getTaskId(), infoList, infoListFull); |
|
|
|
if (!infoList.isEmpty()) { |
|
|
|
if (receiveCode.startsWith("areaPatrolServer")) { |
|
|
|
List areaPatrolDevList = new ArrayList(); |
|
|
|
if (StringUtils.isNotBlank(receiveCode)) { |
|
|
|
List otherDevList = new ArrayList(); |
|
|
|
for (int i = 0; i < infoListFull.size(); i++) { |
|
|
|
String dev = infoListFull.get(i); |
|
|
|
if (dev.startsWith("areaPatrolServer")) { |
|
|
|
areaPatrolDevList.add(infoList.get(i)); |
|
|
|
if (dev.startsWith(receiveCode)) { |
|
|
|
otherDevList.add(infoList.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, areaPatrolDevList)); |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, otherDevList)); |
|
|
|
} else { |
|
|
|
List otherDevList = new ArrayList(); |
|
|
|
List selfDevList = new ArrayList(); |
|
|
|
for (int i = 0; i < infoListFull.size(); i++) { |
|
|
|
String dev = infoListFull.get(i); |
|
|
|
if (!dev.startsWith("areaPatrolServer")) { |
|
|
|
otherDevList.add(infoList.get(i)); |
|
|
|
} |
|
|
|
selfDevList.add(infoListFull.get(i)); |
|
|
|
} |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, otherDevList)); |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, selfDevList)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
patrolSendTask.setDeviceList("[empty device list 2]"); |
|
|
|
@ -980,24 +978,22 @@ public class PatrolTaskController extends BaseController { |
|
|
|
List<String> infoListFull = map.get("listFull"); |
|
|
|
logger.info("[TASK] taskId2: {}, infoList2: {}, infoListFull2: {}", patrolTask.getTaskId(), infoList, infoListFull); |
|
|
|
if (!infoList.isEmpty()) { |
|
|
|
if (receiveCode.startsWith("areaPatrolServer")) { |
|
|
|
List areaPatrolDevList = new ArrayList(); |
|
|
|
if (StringUtils.isNotBlank(receiveCode)) { |
|
|
|
List otherDevList = new ArrayList(); |
|
|
|
for (int i = 0; i < infoListFull.size(); i++) { |
|
|
|
String dev = infoListFull.get(i); |
|
|
|
if (dev.startsWith("areaPatrolServer")) { |
|
|
|
areaPatrolDevList.add(infoList.get(i)); |
|
|
|
if (dev.startsWith(receiveCode)) { |
|
|
|
otherDevList.add(infoList.get(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, areaPatrolDevList)); |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, otherDevList)); |
|
|
|
} else { |
|
|
|
List otherDevList = new ArrayList(); |
|
|
|
List selfDevList = new ArrayList(); |
|
|
|
for (int i = 0; i < infoListFull.size(); i++) { |
|
|
|
String dev = infoListFull.get(i); |
|
|
|
if (!dev.startsWith("areaPatrolServer")) { |
|
|
|
otherDevList.add(infoList.get(i)); |
|
|
|
} |
|
|
|
selfDevList.add(infoListFull.get(i)); |
|
|
|
} |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, otherDevList)); |
|
|
|
patrolSendTask.setDeviceList(String.join(StringUtils.COMMA, selfDevList)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
patrolSendTask.setDeviceList("[empty device list 4]"); |
|
|
|
|