|
|
|
@ -141,6 +141,10 @@ public class TerminalExtServiceImpl implements TerminalExtService {
|
|
|
|
|
Map<Integer, Protocols> protocolMap = cacheService.getProtocolMap();
|
|
|
|
|
List<View_Dy_Line_Tower_Terminals> result = new ArrayList<>();
|
|
|
|
|
for (View_Dy_Line_Tower_Terminals item : list) {
|
|
|
|
|
Protocols protocols = protocolMap.get(item.getProtocol());
|
|
|
|
|
if (protocols != null) {
|
|
|
|
|
item.setProtocolName(protocols.getName());
|
|
|
|
|
}
|
|
|
|
|
MntnStatus status = statusMapper.selectByPrimaryKey(item.getId());
|
|
|
|
|
if (status != null) {
|
|
|
|
|
item.setMntnStatus(status);
|
|
|
|
@ -148,23 +152,15 @@ public class TerminalExtServiceImpl implements TerminalExtService {
|
|
|
|
|
if (status.getRawReportTime() != null) {
|
|
|
|
|
item.setLastHeartbeat(BigInteger.valueOf(status.getRawReportTime()));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
status = new MntnStatus();
|
|
|
|
|
}
|
|
|
|
|
if (vo.needMatch()) {
|
|
|
|
|
if (status != null) {
|
|
|
|
|
if (status.match(vo)) {
|
|
|
|
|
result.add(item);
|
|
|
|
|
Protocols protocols = protocolMap.get(item.getProtocol());
|
|
|
|
|
if (protocols != null) {
|
|
|
|
|
item.setProtocolName(protocols.getName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (status.match(vo)) {
|
|
|
|
|
result.add(item);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
result.add(item);
|
|
|
|
|
Protocols protocols = protocolMap.get(item.getProtocol());
|
|
|
|
|
if (protocols != null) {
|
|
|
|
|
item.setProtocolName(protocols.getName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|