| | |
| | | return R.ok().add(dto); |
| | | } |
| | | |
| | | @PostMapping("/pakin/agv/loc/v1") |
| | | @ResponseBody |
| | | public synchronized R getLocNoAgv(@RequestBody SearchLocParam param) { |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getSourceStaNo())) { |
| | | return R.error("源站编号不能为空"); |
| | | } |
| | | if (param.getIoType() == 1) { |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("条码不能为空"); |
| | | } |
| | | } |
| | | if (Cools.isEmpty(param.getLocType1())){ |
| | | return R.error("高低检测信号不能为空"); |
| | | } |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getSourceStaNo(), true); |
| | | sourceStaNo.setLocType1(param.getLocType1()); |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | |
| | | StartupDto dto = null; |
| | | switch (param.getIoType()) { |
| | | case 1://满托盘入库 |
| | | case 10://空托盘入库 |
| | | dto = startupFullPutStoreAgv(param.getSourceStaNo(), param.getBarcode(), locTypeDto); |
| | | break; |
| | | // dto = emptyPlateIn(param.getSourceStaNo(), locTypeDto, param.getBarcode()); |
| | | // break; |
| | | default: |
| | | break; |
| | | } |
| | | log.info("WCS入库接口返参:{},托盘码:{}", dto, param.getBarcode()); |
| | | return R.ok().add(dto); |
| | | } |
| | | |
| | | @PostMapping("/auto/emptyIn/v1") |
| | | @ResponseBody |
| | | public R autoEmptyIn(@RequestBody LocTypeDto locTypeDto){ |
| | |
| | | |
| | | |
| | | /** |
| | | * 全板入库AGV |
| | | */ |
| | | @Transactional |
| | | public StartupDto startupFullPutStoreAgv(Integer devpNo, String barcode, LocTypeDto locTypeDto) { |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | | FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(); |
| | | // FindLocNoAttributeVo findLocNoAttributeVo = new FindLocNoAttributeVo(waitPakins.get(0)); |
| | | StartupDto dto = commonService.getLocNo( 1, devpNo,findLocNoAttributeVo, locTypeDto); |
| | | // 更新目标库位状态 |
| | | Date now = new Date(); |
| | | LocMast locMast = locMastService.selectById(dto.getLocNo()); |
| | | if (locMast.getLocSts().equals("O")){ |
| | | locMast.setLocSts("S"); // S.入库预约 |
| | | locMast.setBarcode(barcode); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)){ |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | | } else { |
| | | throw new CoolException(dto.getLocNo()+"目标库位已被占用"); |
| | | } |
| | | return dto; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 全板入库 |
| | | */ |
| | | @Transactional |