|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | setVal(tr.children("td").eq(7), table[i-1].chargeCycleTimes); | 
|---|
|  |  |  | setVal(tr.children("td").eq(8), table[i-1].surplusQuantity); | 
|---|
|  |  |  | setVal(tr.children("td").eq(9), table[i-1].countQuantity); | 
|---|
|  |  |  | setVal(tr.children("td").eq(10), table[i-1].statusSum.mileage); | 
|---|
|  |  |  | setVal(tr.children("td").eq(10), table[i-1].statusSum ? table[i - 1].statusSum.mileage : ''); | 
|---|
|  |  |  | setVal(tr.children("td").eq(11), table[i-1].pakMk$); | 
|---|
|  |  |  | setVal(tr.children("td").eq(12), table[i-1].currentLocNo); | 
|---|
|  |  |  | setVal(tr.children("td").eq(13), table[i-1].token); | 
|---|
|  |  |  | 
|---|
|  |  |  | setVal(tr.children("td").eq(7), table[i-1].chargeCycleTimes); | 
|---|
|  |  |  | setVal(tr.children("td").eq(8), table[i-1].surplusQuantity); | 
|---|
|  |  |  | setVal(tr.children("td").eq(9), table[i-1].countQuantity); | 
|---|
|  |  |  | setVal(tr.children("td").eq(10), table[i-1].statusSum.mileage); | 
|---|
|  |  |  | setVal(tr.children("td").eq(10), table[i-1].statusSum ? table[i - 1].statusSum.mileage : ''); | 
|---|
|  |  |  | setVal(tr.children("td").eq(11), table[i-1].pakMk$); | 
|---|
|  |  |  | setVal(tr.children("td").eq(12), table[i-1].currentLocNo); | 
|---|
|  |  |  | setVal(tr.children("td").eq(13), table[i-1].token); | 
|---|