| | |
| | | return R.ok().add(res); |
| | | } |
| | | |
| | | @PostMapping("/task/cache/all") |
| | | @ManagerAuth(memo = "全部信息") |
| | | public R allTaskCache(@RequestParam(defaultValue = "0") Integer rgvNo){ |
| | | List<Map<String, Object>> res = new ArrayList<>(); |
| | | try{ |
| | | RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvNo); |
| | | TaskProtocolCache taskProtocolCache = rgvThread.getTaskProtocolCache(); |
| | | ConcurrentHashMap<String, TaskProtocol> allTaskProtocol = taskProtocolCache.getAllTaskProtocol(); |
| | | for (TaskProtocol taskProtocol : allTaskProtocol.values()){ |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | map2.put("rgvNo", rgvNo); |
| | | map2.put("taskNo", taskProtocol.getTaskNo()); |
| | | map2.put("targetPosition", taskProtocol.getTargetPosition()); |
| | | map2.put("isRunning", taskProtocol.getIsRunning()); |
| | | map2.put("taskStatus", taskProtocol.getTaskStatus()); |
| | | map2.put("direction", taskProtocol.isDirection()); |
| | | res.add(map2); |
| | | } |
| | | } catch (Exception e){ |
| | | // return R.error("异常"+e.getMessage()); |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | |
| | | @PostMapping("/run/walk")//Take Put Walk |
| | | @ManagerAuth(memo = "小车行走") |
| | | public R rgvRunWalk(@RequestParam Integer rgvNo, |
| | | @RequestParam Integer taskNo, |
| | | @RequestParam Integer rgvStaNo, |
| | | @RequestParam Long rgvPosDestination |
| | | public R rgvRunWalk(@RequestParam(defaultValue = "0") Integer rgvNo, |
| | | @RequestParam(defaultValue = "0") Integer taskNo, |
| | | @RequestParam(defaultValue = "0") Integer rgvStaNo, |
| | | @RequestParam(defaultValue = "0") Long rgvPosDestination |
| | | ) { |
| | | if (rgvNo==null || rgvNo==0){ |
| | | return R.error("请选择小车"); |
| | |
| | | |
| | | @PostMapping("/run/put")//Take Put Walk |
| | | @ManagerAuth(memo = "小车放货") |
| | | public R rgvPutWalk(@RequestParam Integer rgvNo, |
| | | @RequestParam Integer taskNo, |
| | | @RequestParam Integer rgvStaNo, |
| | | @RequestParam Long rgvPosDestination |
| | | public R rgvPutWalk(@RequestParam(defaultValue = "0") Integer rgvNo, |
| | | @RequestParam(defaultValue = "0") Integer taskNo, |
| | | @RequestParam(defaultValue = "0") Integer rgvStaNo, |
| | | @RequestParam(defaultValue = "0") Long rgvPosDestination |
| | | ) { |
| | | if (rgvNo==null || rgvNo==0){ |
| | | return R.error("请选择小车"); |
| | |
| | | |
| | | @PostMapping("/run/take")//Take Put Walk |
| | | @ManagerAuth(memo = "小车取货") |
| | | public R rgvTakeWalk(@RequestParam Integer rgvNo, |
| | | @RequestParam Integer taskNo, |
| | | @RequestParam Integer rgvStaNo, |
| | | @RequestParam Long rgvPosDestination |
| | | public R rgvTakeWalk(@RequestParam(defaultValue = "0") Integer rgvNo, |
| | | @RequestParam(defaultValue = "0") Integer taskNo, |
| | | @RequestParam(defaultValue = "0") Integer rgvStaNo, |
| | | @RequestParam(defaultValue = "0") Long rgvPosDestination |
| | | ) { |
| | | if (rgvNo==null || rgvNo==0){ |
| | | return R.error("请选择小车"); |