| | |
| | | return R.ok().add(JSON.toJSONString(new ArrayList<>(OutputQueue.BARCODE))); |
| | | } |
| | | |
| | | @GetMapping("/barcode/list") |
| | | public R barcodeList(){ |
| | | ArrayList<HashMap<String, Object>> list = new ArrayList<>(); |
| | | for (Slave slave : slaveProperties.getBarcode()) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, slave.getId()); |
| | | map.put("id", slave.getId()); |
| | | map.put("barcode", barcodeThread.getBarcode()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | /** |
| | | * 获取地图数据 |
| | | */ |