|
|
@@ -286,10 +286,16 @@ public class FireDeviceController extends BaseController {
|
|
|
online = true;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //查询实验室是否配置灭火设备
|
|
|
+ HardwareFireDeviceVO vo = new HardwareFireDeviceVO();
|
|
|
+ vo.setSubjectId(subjectId);
|
|
|
+ List<HardwareFireDeviceVO> list = fireDeviceService.selectHardwareFireDeviceList(vo);
|
|
|
+
|
|
|
//int waitTime = 5;//倒计时等待时间(秒)
|
|
|
map.put("online", online);
|
|
|
map.put("waitTime", countDown);
|
|
|
- map.put("direTime", fireTime);
|
|
|
+ map.put("direTime", fireTime+list.get(0).getDeviceCountDown());
|
|
|
new Thread(()->startTT(subjectId,deviceCode,countDown)).start();
|
|
|
return ResultData.success(map);
|
|
|
}
|
|
|
@@ -323,7 +329,8 @@ public class FireDeviceController extends BaseController {
|
|
|
* @throws InterruptedException
|
|
|
*/
|
|
|
@GetMapping(value = "/outfirepc")
|
|
|
- public ResultData outFirePc(Long subjectId,String deviceCode) throws InterruptedException {
|
|
|
+ public ResultData outFirePc(Long subjectId,String deviceCode) {
|
|
|
+ logger.info("=========PC端开始一键灭火=======");
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
//设备是否在线
|
|
|
boolean online=false;
|
|
|
@@ -336,10 +343,16 @@ public class FireDeviceController extends BaseController {
|
|
|
online = true;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //查询实验室是否配置灭火设备
|
|
|
+ HardwareFireDeviceVO vo = new HardwareFireDeviceVO();
|
|
|
+ vo.setSubjectId(subjectId);
|
|
|
+ List<HardwareFireDeviceVO> list = fireDeviceService.selectHardwareFireDeviceList(vo);
|
|
|
+
|
|
|
//int waitTime = 5;//倒计时等待时间(秒)
|
|
|
map.put("online", online);
|
|
|
map.put("waitTime", countDown);
|
|
|
- map.put("direTime", fireTime);
|
|
|
+ map.put("direTime", fireTime+list.get(0).getDeviceCountDown());
|
|
|
new Thread(()->startTT(subjectId,deviceCode,countDown)).start();
|
|
|
return ResultData.success(map);
|
|
|
}
|