From cb68c3e4547653ee7d308aa4da51f31363647a0f Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期四, 23 十一月 2023 18:09:43 +0800 Subject: [PATCH] 自动补货 --- src/main/java/com/zy/common/web/WcsController.java | 14 ++++++++++++-- 1 files changed, 12 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 a0081aa..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); // 搴撲綅鍙凤紝 鍫嗗灈鏈猴紝鐩爣绔� } @@ -347,12 +349,20 @@ if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){ 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); //鐢熸垚宸ヤ綔妗� List<AgvBasDevp> agvBasDevpList = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("dev_no", param.getDevNo())); - agvWorkService.createWaitPainWrkMastStart(agvBasDevpList, null); + agvWorkService.createWaitPainWrkMastStart(agvBasDevpList, null, true); return R.ok(); -- Gitblit v1.9.1