From a1f531ee3acc549aabfed8efb6c821e6f6209fa4 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期三, 26 十一月 2025 08:06:59 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 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 3d4baa0..7562426 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -585,6 +585,17 @@
// if (param.getCombMats().size() > 1) {
// throw new CoolException("涓嶅厑璁告贩鏂�===>>" + param.getBarcode());
// }
+ HashMap<String, Object> containMatnrMap = new HashMap<>();
+ for (CombParam.CombMat mat : param.getCombMats()) {
+ if(!containMatnrMap.containsKey(mat.getMatnr())) {
+ containMatnrMap.put(mat.getMatnr(), 1);
+ }
+ }
+
+ if (containMatnrMap.size() > 1) {
+ 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()));
@@ -659,6 +670,17 @@
}
if (order.getSettle() > 2) {
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("璇ヨ鍗曠墿鏂欏凡缁忕粍鎵橈紒");
}
// 璁㈠崟鏄庣粏鏁伴噺鏍¢獙
@@ -1303,6 +1325,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,7 +1344,7 @@
throw new CoolException("宸ヤ綔鐘舵�佹湭澶勪簬宸插嚭搴�");
}
- LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getLocNo()));
+ LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", wrkMast.getSourceLocNo()));
if (locMast == null) {
throw new CoolException("搴撲綅涓嶅瓨鍦�");
}
@@ -1330,20 +1358,12 @@
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);
- LocDetl locDetl = new LocDetl();
- locDetl.setZpallet(param.getNewBarcode());
- locDetl.setModiTime(new Date());
- locDetl.setModiUser(userId);
- locDetlService.update(locDetl, new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()));
+ locDetlService.updateBarcode(locMast.getLocNo(), param.getNewBarcode());
}
}
--
Gitblit v1.9.1