| | |
| | | |
| | | @PostMapping("/pakin/loc/v1") |
| | | @ResponseBody |
| | | public R getLocNo(@RequestBody SearchLocParam param) { |
| | | public synchronized R getLocNo(@RequestBody SearchLocParam param) { |
| | | log.info("收到WCS入库接口请求====>>入参:{}", param); |
| | | if (Cools.isEmpty(param.getIoType())) { |
| | | return R.error("入出库类型不能为空"); |
| | | } |
| | |
| | | } |
| | | pltBarcodes = pltBarcodeService.selectList(new EntityWrapper<PltBarcode>().eq("barcode", param.getBarcode())); |
| | | if (Cools.isEmpty(pltBarcodes)) { |
| | | return R.error("条码数据错误"); |
| | | return R.error("条码未组托:" + param.getBarcode()); |
| | | } |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())); |
| | |
| | | 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); |
| | | // dto = commonService.getLocNo(1, 1, devpNo, false, matNos, locTypeDto,0); |
| | | dto = commonService.getLocNoNew(1, devpNo,barcode); |
| | | } |
| | | int workNo = dto.getWorkNo(); |
| | | |
| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | | StartupDto dto; |
| | | if (devpNo >= 300) { |
| | | // if (devpNo >= 300) { |
| | | dto = commonService.emptyIngetLocNo(devpNo); |
| | | } else { |
| | | dto = commonService.getLocNo(1, 10, devpNo, true, null, locTypeDto, 0); |
| | | } |
| | | // } else { |
| | | // dto = commonService.getLocNo(1, 10, devpNo, true, null, locTypeDto, 0); |
| | | // } |
| | | int workNo = dto.getWorkNo(); |
| | | // 生成工作档 |
| | | WrkMast wrkMast = new WrkMast(); |