| | |
| | | @PostMapping("/pakin/loc/v1") |
| | | @ResponseBody |
| | | public R getLocNo(@RequestBody SearchLocParam param) { |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | | } |
| | |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | log.info("WCS入库接口返参:{},托盘码:{}", dto.toString(), param.getBarcode()); |
| | | return R.ok().add(dto); |
| | | } |
| | | |
| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | | List<String> matNos = pltBarcodes.stream().map(PltBarcode::getMatNo).distinct().collect(Collectors.toList()); |
| | | |
| | | // 获取类别标识(1原材料,2成品) |
| | | List<String> str5 = pltBarcodes.stream().map(PltBarcode::getStr5).distinct().collect(Collectors.toList()); |
| | | if (str5.isEmpty() || str5.get(0) == null) { |
| | | throw new CoolException("物料类别获取失败"); |
| | | } |
| | | |
| | | StartupDto dto; |
| | | if (devpNo == 304) { |
| | | dto = commonService.getLocNoBy304(barcode); |
| | | dto = commonService.getLocNoBy304(str5.get(0)); |
| | | } else { |
| | | dto = commonService.getLocNo(1, 1, devpNo, false, matNos, locTypeDto,0); |
| | | } |