| | |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("条码不能为空"); |
| | | } |
| | | mat = matService.selectByBarcode(param.getBarcode()); |
| | | mat = matService.selectByMatnr(param.getBarcode()); |
| | | if (Cools.isEmpty(mat)) { |
| | | return R.error(param.getBarcode() + "条码商品资料不存在,请先添加!"); |
| | | } |
| | |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true); |
| | | // 检索库位 |
| | | List<Mat> mats = Collections.singletonList(mat); |
| | | List<String> matnrList = mats.stream().map(Mat::getMatnr).distinct().collect(Collectors.toList()); |
| | | List<String> matnrList = mats.stream().map(Mat::getMaktx).distinct().collect(Collectors.toList()); |
| | | StartupDto dto = commonService.getLocNo(1, 1, devpNo, matnrList, locTypeDto,0); |
| | | int workNo = dto.getWorkNo(); |
| | | Date now = new Date(); |
| | |
| | | // 生成工作档明细 |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetl.sync(mat); |
| | | wrkDetl.setAnfme(1.0D); |
| | | wrkDetl.setAnfme(mat.getWeight()); |
| | | // wrkDetl.setAnfme(1.0D); |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setIoTime(wrkMast.getIoTime()); |
| | | wrkDetl.setAppeTime(now); |
| | |
| | | throw new CoolException(CodeRes.NONE_DETL_900); |
| | | } |
| | | // 检索库位 |
| | | List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMatnr).distinct().collect(Collectors.toList()); |
| | | List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMaktx).distinct().collect(Collectors.toList()); |
| | | return commonService.getLocNo(1, ioType - 50, devpNo, matnrList, locTypeDto,0); // 库位号, 堆垛机,目标站 |
| | | } |
| | | |