From 528df0077f514bf0b0926e113630a570b9046eb2 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期六, 16 八月 2025 08:22:10 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 38 +++++++++++++++++++++++++++++++++----- 1 files changed, 33 insertions(+), 5 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 1dd19a0..4cd06b4 100644 --- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java @@ -661,6 +661,17 @@ throw new CoolException("鍗曟嵁缂栧彿宸蹭綔涓氬畬鎴�"); } + List<WaitPakin> waitPakinList = waitPakinService.selectList(new EntityWrapper<WaitPakin>() + .eq("matnr", elem.getMatnr()) + .eq("batch", elem.getBatch()) + .eq("order_no", elem.getOrderNo()) + .eq("anfme", elem.getAnfme()) + .eq("standby1", elem.getStandby1()) + ); + if (!waitPakinList.isEmpty()) { + throw new CoolException("璇ヨ鍗曠墿鏂欏凡缁忕粍鎵橈紒"); + } + // 璁㈠崟鏄庣粏鏁伴噺鏍¢獙 OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(), elem.getStandby2(), elem.getStandby3(), elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3()); @@ -1303,6 +1314,12 @@ @Override public void toAllOut(PalletToAllOutParam param, Long userId) { + String barcodeSize = param.getBarcode().substring(0, 2); + String newBarcodeSize = param.getNewBarcode().substring(0, 2); + if (!barcodeSize.equals(newBarcodeSize)) { + throw new CoolException("鎵樼洏灏哄涓嶄竴鑷�"); + } + WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); if (wrkMast == null) { throw new CoolException("宸ヤ綔妗d笉瀛樺湪"); @@ -1316,15 +1333,26 @@ throw new CoolException("宸ヤ綔鐘舵�佹湭澶勪簬宸插嚭搴�"); } + LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo())); + if (locMast == null) { + throw new CoolException("搴撲綅涓嶅瓨鍦�"); + } + + if (!locMast.getLocSts().equals("P")) { + throw new CoolException("搴撲綅绫诲瀷涓嶆槸鎷f枡鍑哄簱"); + } + wrkMast.setBarcode(param.getNewBarcode()); wrkMast.setModiTime(new Date()); wrkMast.setModiUser(userId); wrkMastService.updateById(wrkMast); - WrkDetl wrkDetl = new WrkDetl(); - wrkDetl.setZpallet(param.getNewBarcode()); - wrkDetl.setModiTime(new Date()); - wrkDetl.setModiUser(userId); - wrkDetlService.update(wrkDetl, new EntityWrapper<WrkDetl>().eq("wrk_no", wrkMast.getWrkNo())); + wrkDetlService.updateBarcode(wrkMast.getWrkNo(), param.getNewBarcode()); + + locMast.setBarcode(param.getNewBarcode()); + locMast.setModiTime(new Date()); + locMastService.updateById(locMast); + + locDetlService.updateBarcode(locMast.getLocNo(), param.getNewBarcode()); } } -- Gitblit v1.9.1