From 5677bbf8ba92c286d59b90321c863c14255c734e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 29 七月 2024 09:23:49 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
index 03e1024..1dc9867 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -117,7 +117,7 @@
// 鏇存柊璁㈠崟瀹屾垚鏁伴噺
OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
if (orderDetl==null){
- orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null);
+ orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
}
try {
if(!Cools.isEmpty(orderDetl)){
@@ -157,9 +157,14 @@
}
for (WrkDetl wrkDetl : wrkDetls53) {
- LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
+// LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
+ // 绠卞彿+鍗峰彿
+ LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("batch",wrkDetl.getBatch())
+ .eq("model",wrkDetl.getModel()));
if (null != locDetl) {
- if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) {
+
+// if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) {
+ if (!locDetlService.updateAnfme2(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl.getModel(), wrkDetl.getBatch())) {
// exceptionHandle("鎷f枡鍏ュ簱 ===>> 淇敼搴撳瓨鏄庣粏鏁伴噺澶辫触锛沎workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return FAIL.setMsg("鎷f枡鍏ュ簱 ===>> 淇敼搴撳瓨鏄庣粏鏁伴噺澶辫触; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]");
@@ -169,7 +174,7 @@
// 鏇存柊璁㈠崟瀹屾垚鏁伴噺
OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
if (orderDetl==null){
- orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null);
+ orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
}
try {
if(!Cools.isEmpty(orderDetl)){
@@ -355,13 +360,20 @@
}
for (WrkDetl wrkDetl : wrkDetls101) {
// 鏇存柊璁㈠崟瀹屾垚鏁伴噺
- OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
- if (orderDetl==null){
- orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null);
- }
+// OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), wrkDetl.getBatch());
+// if (orderDetl==null){
+// orderDetl = orderDetlService.selectItem(wrkDetl.getOrderNo(), wrkDetl.getMatnr(), null);
+// }
+ // 绠卞彿+鍗峰彿
+ OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>().eq("batch",wrkDetl.getBatch())
+ .eq("model",wrkDetl.getModel()));
+
try {
if(!Cools.isEmpty(orderDetl)){
- if(!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), wrkDetl.getMatnr(),
+ // 鏇存柊璁㈠崟瀹屾垚鏁伴噺
+// orderDetlService.update(null,new EntityWrapper<OrderDetl>().eq("order_no",orderDetl.getOrderNo())
+// .eq("batch",orderDetl.getBatch()).eq("model", orderDetl.getModel()));
+ if(!orderDetlService.increaseQtyByOrderNo(wrkDetl.getOrderNo(), orderDetl.getModel(),
orderDetl.getBatch(),wrkDetl.getAnfme())){
// exceptionHandle("鍏ㄦ澘鍑哄簱 ===>> 鏇存柊璁㈠崟瀹屾垚鏁伴噺澶辫触锛沎workNo={0}],[locNo={1}]",
// wrkMast.getWrkNo(), wrkMast.getLocNo());
--
Gitblit v1.9.1