| | |
| | | |
| | | /** |
| | | * 出库确认 - 扫托盘码 |
| | | * 1.全板 返回 101 |
| | | * 2.拣料 返回 103 |
| | | * 31.全板出库等待下架 -->32.等待AGV搬运空板回库 |
| | | */ |
| | | @RequestMapping("/pakout/confirm/barcode/auth") |
| | | @ManagerAuth |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode){ |
| | | if (Cools.isEmpty(barcode)) { |
| | | return R.ok(); |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode, |
| | | @RequestParam(required = false) String staNo){ |
| | | if (Cools.isEmpty(barcode)||Cools.isEmpty(staNo)) { |
| | | return R.error("托盘码或者AGV站点不能为空"); |
| | | } |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |
| | | if (wrkMast != null) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | // 去除已出库确认的明细 |
| | | wrkDetls.removeIf(wrkDetl -> wrkDetl.getInspect() != null && wrkDetl.getInspect() != 0); |
| | | return R.ok().add(Cools.add("wrkNo", wrkMast.getWrkNo()).add("ioType", wrkMast.getIoType()).add("list", wrkDetls)); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", barcode).eq("io_type", 101)); |
| | | if (Cools.isEmpty(wrkMast)) { |
| | | return R.error("没有找到该托盘="+barcode+"对应的出库任务"); |
| | | } |
| | | wrkMast.setWrkSts(32L);//32.等待AGV搬运空板回库 |
| | | wrkMast.setMemo(staNo);//AGV取空托盘站点 |
| | | wrkMast.setOveMk("Y"); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | rcsParam.put("priority",1);//优先级越小先执行 |
| | | rcsParam.put("robot_type",1);//车 辆 类 型 0:XC 1:XCD 2:XP_T 3:XP_L |
| | | rcsParam.put("MoverID","XCD"); |
| | | String wait_location = ""; |
| | | if(staNo.equals("5001") || staNo.equals("5002") ){ |
| | | wait_location = "4"; |
| | | }else if(staNo.equals("6001") ){ |
| | | wait_location = "122"; |
| | | }else if(staNo.equals("6002") ){ |
| | | wait_location = "120"; |
| | | }else if(staNo.equals("7001") ){ |
| | | wait_location = "120"; |
| | | }else if(staNo.equals("7002") ){ |
| | | wait_location = "120"; |
| | | } |
| | | rcsParam.put("wait_location",wait_location);//任务完成休息站点名称 |
| | | |
| | | LinkedHashMap<String,Object> map=new LinkedHashMap<>(); |
| | | map.put("data",rcsParam); |
| | |
| | | if(bool){ |
| | | return R.ok(noww); |
| | | }else { |
| | | return R.error("下发任务失败"); |
| | | return R.error(msg); |
| | | } |
| | | |
| | | } |