|
@@ -384,13 +384,31 @@ public class CommSendService {
|
|
|
return send(sm, seat, sim, RETRY_COUNT_CLEAR_ONE_FAULT, commStrategy.getSleepLong());
|
|
|
}
|
|
|
|
|
|
- public AjaxResult debugClearAllOnlineSimAllFault() {
|
|
|
- l.info("debugClearAllOnlineSimAllFault");
|
|
|
- simService.listAllOnline().forEach(s -> {
|
|
|
- // AjaxResult ar = debugClearAllFaultBySeatId(0);// todo:尚未实现
|
|
|
- });
|
|
|
+ /**
|
|
|
+ * debug清除所有座次上的模拟器的所有故障
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public AjaxResult debugClearAllSeatAllFault() {
|
|
|
debugFaultService.deleteAll();
|
|
|
- return AjaxResult.success("清除成功,清除所有在线模拟器所有故障!");
|
|
|
+ List<Seat> list = seatService.listAllEnable();
|
|
|
+ for (Seat seat : list) {
|
|
|
+ if (seat == null) {
|
|
|
+ AjaxResult.error("座次数据异常!");
|
|
|
+ }
|
|
|
+ //
|
|
|
+ commCheckService.checkOneSeatState(seat, true);
|
|
|
+ // 重新查询
|
|
|
+ seat = seatService.selectSeatBySeatId(seat.getSeatId());
|
|
|
+ if (seat.getCurrentSimId() == null || seat.getCurrentSimId() == 0L) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ AjaxResult ar = debugClearAllFaultBySeatId(seat.getSeatId());
|
|
|
+ if (ar.isError()) {
|
|
|
+ return ar;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return AjaxResult.success("清除成功,清除所有座次正确连接的模拟器的,所有的故障!");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -425,7 +443,7 @@ public class CommSendService {
|
|
|
}
|
|
|
list.add(sm);
|
|
|
}
|
|
|
- return AjaxResult.success("清除成功,清除当前模拟器所有故障!");
|
|
|
+ return AjaxResult.success("清除成功,清除当前模拟器所有的故障!");
|
|
|
}
|
|
|
|
|
|
/**
|