修复国标级联录像查询 #485
parent
78fac69cd5
commit
590358c313
|
@ -70,15 +70,20 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent
|
||||||
|
|
||||||
rootElement = getRootElement(evt, device.getCharset());
|
rootElement = getRootElement(evt, device.getCharset());
|
||||||
String sn = getText(rootElement, "SN");
|
String sn = getText(rootElement, "SN");
|
||||||
|
RecordInfo recordInfo = new RecordInfo();
|
||||||
|
recordInfo.setDeviceId(device.getDeviceId());
|
||||||
|
recordInfo.setSn(sn);
|
||||||
|
recordInfo.setName(getText(rootElement, "Name"));
|
||||||
String sumNumStr = getText(rootElement, "SumNum");
|
String sumNumStr = getText(rootElement, "SumNum");
|
||||||
int sumNum = 0;
|
int sumNum = 0;
|
||||||
if (!StringUtils.isEmpty(sumNumStr)) {
|
if (!StringUtils.isEmpty(sumNumStr)) {
|
||||||
sumNum = Integer.parseInt(sumNumStr);
|
sumNum = Integer.parseInt(sumNumStr);
|
||||||
}
|
}
|
||||||
|
recordInfo.setSumNum(sumNum);
|
||||||
Element recordListElement = rootElement.element("RecordList");
|
Element recordListElement = rootElement.element("RecordList");
|
||||||
if (recordListElement == null || sumNum == 0) {
|
if (recordListElement == null || sumNum == 0) {
|
||||||
logger.info("无录像数据");
|
logger.info("无录像数据");
|
||||||
|
eventPublisher.recordEndEventPush(recordInfo);
|
||||||
recordDataCatch.put(device.getDeviceId(), sn, sumNum, new ArrayList<>());
|
recordDataCatch.put(device.getDeviceId(), sn, sumNum, new ArrayList<>());
|
||||||
releaseRequest(device.getDeviceId(), sn);
|
releaseRequest(device.getDeviceId(), sn);
|
||||||
} else {
|
} else {
|
||||||
|
@ -112,6 +117,9 @@ public class RecordInfoResponseMessageHandler extends SIPRequestProcessorParent
|
||||||
record.setRecorderId(getText(itemRecord, "RecorderID"));
|
record.setRecorderId(getText(itemRecord, "RecorderID"));
|
||||||
recordList.add(record);
|
recordList.add(record);
|
||||||
}
|
}
|
||||||
|
recordInfo.setRecordList(recordList);
|
||||||
|
// 发送消息,如果是上级查询此录像,则会通过这里通知给上级
|
||||||
|
eventPublisher.recordEndEventPush(recordInfo);
|
||||||
int count = recordDataCatch.put(device.getDeviceId(), sn, sumNum, recordList);
|
int count = recordDataCatch.put(device.getDeviceId(), sn, sumNum, recordList);
|
||||||
logger.info("[国标录像], {}->{}: {}/{}", device.getDeviceId(), sn, count, sumNum);
|
logger.info("[国标录像], {}->{}: {}/{}", device.getDeviceId(), sn, count, sumNum);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue