| | |
| | | ArrayList<JSONObject> list = new ArrayList<>(); |
| | | List<BasShuttle> shuttles = basShuttleService.selectList(new EntityWrapper<BasShuttle>().orderBy("shuttle_no")); |
| | | for (BasShuttle basShuttle : shuttles) { |
| | | // 表格行 |
| | | JSONObject baseObj = new JSONObject(); |
| | | baseObj.put("shuttleNo", basShuttle.getShuttleNo()); |
| | | list.add(baseObj); |
| | | // 获取四向穿梭车信息 |
| | | NyShuttleThread shuttleThread = (NyShuttleThread) SlaveConnection.get(SlaveType.Shuttle, basShuttle.getShuttleNo()); |
| | | if (shuttleThread == null) { |
| | |
| | | JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol)); |
| | | if (shuttleProtocol == null || shuttleProtocol.getShuttleNo()==null) { |
| | | if (shuttleData != null) { |
| | | list.add(shuttleData); |
| | | baseObj.putAll(shuttleData); |
| | | } |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | list.add(shuttleData); |
| | | baseObj.putAll(shuttleData); |
| | | } |
| | | return R.ok().add(list); |
| | | } |