|
|
@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.zd.airbottle.api.feign.RemoteAirBottleService;
|
|
|
import com.zd.common.core.redis.RedisService;
|
|
|
import com.zd.common.core.utils.SpringUtils;
|
|
|
+import com.zd.laboratory.api.dto.WarningNoticeLogDto;
|
|
|
+import com.zd.laboratory.api.feign.RemoteLaboratoryService;
|
|
|
import com.zd.laboratory.mqtt.service.impl.SubMessageSendManager;
|
|
|
import com.zd.laboratory.socket.service.BeaconMate;
|
|
|
import com.zd.model.constant.BaseConstants;
|
|
|
@@ -34,6 +36,8 @@ public class BeaconMateImpl implements BeaconMate {
|
|
|
|
|
|
private SubMessageSendManager messageSendService = SpringUtils.getBean(SubMessageSendManager.class);
|
|
|
|
|
|
+ private RemoteLaboratoryService remoteLaboratoryService = SpringUtils.getBean(RemoteLaboratoryService.class);
|
|
|
+
|
|
|
public void sendBeaconMate(String dataStr){
|
|
|
log.info("1.=====================================》上报蓝牙网关编码:"+dataStr);
|
|
|
JSONObject jsonObject=JSONObject.parseObject(dataStr);
|
|
|
@@ -76,6 +80,7 @@ public class BeaconMateImpl implements BeaconMate {
|
|
|
if(beaconNoticeList!=null){
|
|
|
newNoticeList.addAll(beaconNoticeList);
|
|
|
}
|
|
|
+ StringBuilder beaconTagBuild = new StringBuilder();
|
|
|
//todo 循环检查实验室的信标比对上报的信标,将配对好的信标重新设置默认时间
|
|
|
for(int x=0;x<beaconList.size();x++){
|
|
|
if(array.size()>0){
|
|
|
@@ -98,6 +103,8 @@ public class BeaconMateImpl implements BeaconMate {
|
|
|
if(notice.get("beaconTag").equals(beaconStr)){
|
|
|
log.info("6.=====================================》移除返回来的信标提示语:"+notice);
|
|
|
newNoticeList.remove(notice);
|
|
|
+ beaconTagBuild.append(",");
|
|
|
+ beaconTagBuild.append(beaconStr);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -113,6 +120,13 @@ public class BeaconMateImpl implements BeaconMate {
|
|
|
messageSendService.bluetoothGatewayToMac(subId);
|
|
|
//向前端发送mqtt预案触发提示
|
|
|
messageSendService.riskPlanTriggerNotice();
|
|
|
+ //这里需要调用通知修改接口,把离位改成在位
|
|
|
+ if(beaconTagBuild.length()>0){
|
|
|
+ WarningNoticeLogDto warningNoticeLogDto = new WarningNoticeLogDto();
|
|
|
+ warningNoticeLogDto.setBeaconTag(beaconTagBuild.substring(1));
|
|
|
+ remoteLaboratoryService.updateLocationState(warningNoticeLogDto);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|