|
@@ -133,7 +133,7 @@ public class WatchJWServerHandler extends HexBinaryAcceptanceHandlerAdapter {
|
|
|
sendMsg2Kafka((msg + deviceId + "," + DateUtil.formatDate2String(new Date())).getBytes(), deviceId, channel);
|
|
|
logger.warn("心跳报文下发 msg+" + msg);
|
|
|
voiceReplyToClient(deviceId, channel);
|
|
|
- snedApthReplyToClient(deviceId, channel);
|
|
|
+ sendApthReplyToClient(deviceId, channel);
|
|
|
break;
|
|
|
case "AP01":
|
|
|
String gpsState = msg.substring(12, 13);
|
|
@@ -244,19 +244,18 @@ public class WatchJWServerHandler extends HexBinaryAcceptanceHandlerAdapter {
|
|
|
* @param deviceId
|
|
|
* @param channel
|
|
|
*/
|
|
|
- protected void snedApthReplyToClient(String deviceId, Channel channel) {
|
|
|
+ protected void sendApthReplyToClient(String deviceId, Channel channel) {
|
|
|
try {
|
|
|
- if (!beatMap.isEmpty()
|
|
|
- || beatMap.containsKey(deviceId)
|
|
|
- || Integer.valueOf(2).equals(beatMap.get(deviceId))) {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- Boolean lag = deviceCronClient.getSendApThByDeviceId(deviceId);
|
|
|
- if (lag) {
|
|
|
- setBPXLToClient(deviceId, channel);
|
|
|
- } else {
|
|
|
- beatMap.remove(deviceId);
|
|
|
+ if (beatMap.isEmpty()
|
|
|
+ || !beatMap.containsKey(deviceId)
|
|
|
+ || beatMap.get(deviceId) == 1) {
|
|
|
+
|
|
|
+ Boolean lag = deviceCronClient.getSendApThByDeviceId(deviceId);
|
|
|
+ if (lag) {
|
|
|
+ setBPXLToClient(deviceId, channel);
|
|
|
+ } else {
|
|
|
+ beatMap.remove(deviceId);
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.error("心率下行发送异常!!!!! deviceId=" + deviceId);
|