From 0bedfead3ffe6d2251d7428d772de0a4df6b5201 Mon Sep 17 00:00:00 2001 From: zwl <1051256694@qq.com> Date: 星期一, 21 七月 2025 15:52:49 +0800 Subject: [PATCH] 1.向mes查询物料 2.入库上报mes --- src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java index 9a0bc7f..dc2c5be 100644 --- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java @@ -85,16 +85,35 @@ if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { throw new CoolException(BaseRes.PARAM); } + if(param.getCombMats().size()>1){ + throw new CoolException("璇锋彁鍙栦竴涓晢鍝侊紝鎴栬�呭埛鏂伴噸鏂扮粍鎵橈紒"); + } // 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁 if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { throw new CoolException(param.getBarcode() + "鏁版嵁姝e湪杩涜鍏ュ簱"); } +// if(param.getBarcode().length()!=8){ +// throw new CoolException("鏉$爜闀垮害涓嶆槸8浣�===>>" + param.getBarcode()); +// } + if (param.getCombMats().size()>1){ + throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode()); + } + Mat mat1 = matService.selectByMatnr(param.getCombMats().get(0).getMatnr()); + if(!Cools.isEmpty(mat1)){ + param.getCombMats().get(0).setBatch(mat1.getMatnr()); + param.getCombMats().get(0).setAnfme(mat1.getPrice()); + } + if(Cools.isEmpty(param.getCombMats().get(0).getBatch())){ + throw new CoolException("鎵瑰彿锛堝敮涓�鐮侊級涓嶈兘涓虹┖===>>" + param.getBarcode()); + } + int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())); - if (countLoc > 0 || countWrk > 0) { - throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode()); + int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",param.getBarcode())); + if (countLoc > 0 || countWrk > 0 || countwait > 0) { + throw new CoolException("缁勬墭妗�/宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode()); } Date now = new Date(); @@ -139,7 +158,7 @@ // 鍏宠仈缁勬墭 } else { Order order = orderService.selectByNo(param.getOrderNo()); - if (order.getSettle() > 2) { + if (Cools.isEmpty(order) || order.getSettle() > 2) { throw new CoolException("鍗曟嵁缂栧彿宸茶繃鏈�"); } // 鐢熸垚鍏ュ簱閫氱煡妗� -- Gitblit v1.9.1