From d87f68eb535935814f287b3740474e7eb24b3643 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期三, 22 十一月 2023 09:10:23 +0800 Subject: [PATCH] 自动补货流程更新 --- src/main/java/com/zy/common/web/WcsController.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java index 76cd9f5..b50cb8c 100644 --- a/src/main/java/com/zy/common/web/WcsController.java +++ b/src/main/java/com/zy/common/web/WcsController.java @@ -53,6 +53,8 @@ private AgvWorkService agvWorkService; @Autowired private AgvBasDevpService agvBasDevpService; + @Autowired + private AgvWrkMastService agvWrkMastService; // @Autowired // private ErpService erpService; @@ -299,7 +301,7 @@ throw new CoolException(CodeRes.NONE_DETL_900); } // 妫�绱㈠簱浣� - List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMaktx).distinct().collect(Collectors.toList()); + List<String> matnrList = wrkDetls.stream().map(WrkDetl::getMatnr).distinct().collect(Collectors.toList()); return commonService.getLocNo(1, ioType - 50, devpNo, matnrList, locTypeDto,0); // 搴撲綅鍙凤紝 鍫嗗灈鏈猴紝鐩爣绔� } @@ -345,9 +347,16 @@ AgvBasDevp agvBasDevp = agvBasDevpService.getByDevNo(param.getDevNo()); if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){ - //鍘绘壘agv宸ヤ綔妗d换鍔� throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦ㄦ垨鑰呯珯鐐逛笉涓虹┖"); } + if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(containerCode))){ + throw new CoolException("璇ユ枡绠变綅缁勬墭"); + } + + //鍘绘壘agv宸ヤ綔妗d换鍔� + if(!Cools.isEmpty(agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode",containerCode)))){ + throw new CoolException("璇ユ枡绠辨鍦ㄥ叆搴撲腑"); + } //缁戝畾绔欑偣 agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode); -- Gitblit v1.9.1