|
|
|
@ -147,7 +147,13 @@ public class PatrolDeviceStatusSynTask { |
|
|
|
for (int i = 0; i < patrolDeviceObjects.size(); ++i) { |
|
|
|
JSONObject item = patrolDeviceObjects.getJSONObject(i); |
|
|
|
String patrolDeviceCode = item.getString("patrolDeviceCode"); |
|
|
|
if (StringUtils.isEmpty(patrolDeviceCode)) { |
|
|
|
patrolDeviceCode = item.getString("patroldeviceCode"); |
|
|
|
} |
|
|
|
Long eqpBookId = item.getLongValue("eqpBookId"); |
|
|
|
if (eqpBookId == 0) { |
|
|
|
eqpBookId = item.getLongValue("eqpbookId"); |
|
|
|
} |
|
|
|
if (ivsDeviceStatusMap.containsKey(patrolDeviceCode)) { |
|
|
|
boolean online = ivsDeviceStatusMap.get(patrolDeviceCode); |
|
|
|
if (online) { |
|
|
|
@ -172,7 +178,13 @@ public class PatrolDeviceStatusSynTask { |
|
|
|
if (webSendFlag == 1) { |
|
|
|
JSONObject item = patrolDeviceObjects.getJSONObject(0); |
|
|
|
String patrolDeviceCode = item.getString("patrolDeviceCode"); |
|
|
|
if (StringUtils.isEmpty(patrolDeviceCode)) { |
|
|
|
patrolDeviceCode = item.getString("patroldeviceCode"); |
|
|
|
} |
|
|
|
Long eqpBookId = item.getLongValue("eqpBookId"); |
|
|
|
if (eqpBookId == 0) { |
|
|
|
eqpBookId = item.getLongValue("eqpbookId"); |
|
|
|
} |
|
|
|
JSONObject returnJsonObject = patrolDeviceMesHandle(patrolDeviceCode, null, eqpBookId, heart_beat_interval, heartBeatInterval, dateTimeNowFormat); |
|
|
|
parseMessage(JSON.toJSONString(returnJsonObject)); |
|
|
|
} |
|
|
|
|