| | |
| | | add("ea1f0459efc02a79f046f982767939ae"); |
| | | }}; |
| | | |
| | | public static final ArrayList<String> agvSta1 = new ArrayList<String>() {{ |
| | | add("5400101");add("5400102");add("5400103");add("5400104");add("5400105");add("5400106");add("5400107"); |
| | | }}; |
| | | public static final ArrayList<String> agvSta2 = new ArrayList<String>() {{ |
| | | add("5400201");add("5400202");add("5400203");add("5400204");add("5400205");add("5400206");add("5400207"); |
| | | }}; |
| | | public static final ArrayList<String> agvSta3 = new ArrayList<String>() {{ |
| | | add("5400301");add("5400302");add("5400303");add("5400304");add("5400305");add("5400306");add("5400307"); |
| | | }}; |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | | @Autowired |
| | |
| | | return R.ok(); |
| | | |
| | | } |
| | | @PostMapping("/agv/AGVDismantle") |
| | | @ManagerAuth |
| | | public R pdaAGVDismantle(@RequestBody Map<String,Object> map){ |
| | | return mobileService.AgvDismantle(map); |
| | | } |
| | | @PostMapping("/agv/finishedCall") |
| | | @ManagerAuth |
| | | public R pdaAgvFinishedCall(@RequestBody Map<String,Object> map){ |
| | |
| | | @ManagerAuth |
| | | public R pdaAgvLineCall(@RequestBody Map<String,Object> map){ |
| | | return mobileService.lineCall(map); |
| | | } |
| | | @PostMapping("/agv/lineCall2") |
| | | @ManagerAuth |
| | | public R pdaAgvLineCall2(@RequestBody Map<String,Object> map){ |
| | | return mobileService.lineCall2(map); |
| | | } |
| | | |
| | | @GetMapping("/agv/site/list") |
| | |
| | | return mobileService.unbind(site); |
| | | } |
| | | |
| | | @PostMapping("/agv/unbind2") |
| | | @ManagerAuth |
| | | public R pdaAgvUnbind2(@RequestBody Map<String,Object> map){ |
| | | |
| | | String site = (String) map.get("site"); // 暂存位 |
| | | |
| | | if (Cools.isEmpty(site)) { |
| | | return R.parse("暂存位不能为空"); |
| | | } |
| | | |
| | | return mobileService.unbind2(site); |
| | | } |
| | | |
| | | @PostMapping("/agv/bind") |
| | | @ManagerAuth |
| | | public R pdaAgvBind(@RequestBody Map<String,Object> map){ |
| | |
| | | if (Cools.isEmpty(site)) { |
| | | return R.parse("暂存位不能为空"); |
| | | } |
| | | boolean b = mobileService.bindPodAndBerth(site); |
| | | if (b){ |
| | | return R.ok(); |
| | | |
| | | // 判断site在哪个列表中,并获取对应的列表 |
| | | ArrayList<String> targetList = null; |
| | | if (agvSta1.contains(site)) { |
| | | targetList = agvSta1; |
| | | } else if (agvSta2.contains(site)) { |
| | | targetList = agvSta2; |
| | | } else if (agvSta3.contains(site)) { |
| | | targetList = agvSta3; |
| | | } |
| | | return R.error(); |
| | | |
| | | // 如果site在agvSta1、agvSta2或agvSta3中,循环调用bindPodAndBerth |
| | | if (targetList != null) { |
| | | // 循环调用bindPodAndBerth处理列表中的所有数据 |
| | | for (String siteItem : targetList) { |
| | | boolean b = mobileService.bindPodAndBerth(siteItem); |
| | | } |
| | | return R.ok(); |
| | | } else { |
| | | // 原有逻辑:不在指定站点中,只处理单个site |
| | | boolean b = mobileService.bindPodAndBerth(site); |
| | | if (b){ |
| | | return R.ok(); |
| | | } |
| | | return R.error(); |
| | | } |
| | | } |
| | | |
| | | private void getAgvTaskParam(ForwardAGVTaskParam agvTaskCreateParam,String agv,String sta){ |