From f10ba245a8101e959c915122623b98982f0cce79 Mon Sep 17 00:00:00 2001
From: mrzhssss <pro6@qq.com>
Date: 星期五, 17 二月 2023 10:03:38 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 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 fff66e0..7450d05 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -92,23 +92,24 @@
}
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) {
+ WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode());
+ if (wrkMast != null && wrkMast.getIoType() < 100){
+ throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
+
+ }
+ if (countLoc > 0 ) {
throw new CoolException("宸ヤ綔妗�/搴撳瓨鏉$爜鏁版嵁宸插瓨鍦�===>>" + param.getBarcode());
}
+
+
//璁剧疆闈瀗ull鎵瑰彿锛�
for (CombParam.CombMat combMat : param.getCombMats()) {
if (combMat.getBatch() == null){
combMat.setBatch("");
}
}
- for (CombParam.CombMat combMat : param.getCombMats()) {
- Integer sum = orderDetlService.sameOrderComb(param.getOrderNo(), combMat.getMatnr(),combMat.getBatch());
- OrderDetl orderDetl = orderDetlService.selectItem(param.getOrderNo(), combMat.getMatnr(), combMat.getBatch());
- if ( combMat.getAnfme() > (orderDetl.getAnfme() - sum)) {
- throw new CoolException("缁勬墭鏁伴噺宸茶秴鍑鸿鍗曢渶姹傞噺锛岃妫�鏌ユ槸鍚︽湁鍏朵粬鐨勭粍鎵樺凡瀹屾垚");
- }
- }
+
+
Date now = new Date();
@@ -152,6 +153,18 @@
}
// 鍏宠仈缁勬墭
} else {
+ for (CombParam.CombMat combMat : param.getCombMats()) {
+ Integer sum = orderDetlService.sameOrderComb(param.getOrderNo(), combMat.getMatnr(),combMat.getBatch());
+ OrderDetl orderDetl = orderDetlService.selectItem(param.getOrderNo(), combMat.getMatnr(), combMat.getBatch());
+ if (orderDetl == null) {
+ throw new CoolException("鎵句笉鍒扮粍鎵樼殑鍗曟嵁鏄庣粏");
+
+ }
+ Double anfme = orderDetl.getAnfme();
+ if ( anfme > (anfme - sum)) {
+ throw new CoolException("缁勬墭鏁伴噺宸茶秴鍑鸿鍗曢渶姹傞噺锛岃妫�鏌ユ槸鍚︽湁鍏朵粬鐨勭粍鎵樺凡瀹屾垚");
+ }
+ }
Order order = orderService.selectByNo(param.getOrderNo());
if (order.getSettle() > 2) {
throw new CoolException("鍗曟嵁缂栧彿宸茶繃鏈�");
--
Gitblit v1.9.1