From 66042dcaa96d66edaf56a863d5576207a13c2db5 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期三, 01 四月 2026 17:37:04 +0800
Subject: [PATCH] no message
---
src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java | 76 +++++++++++++++++++++-----------------
1 files changed, 42 insertions(+), 34 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
index 0543095..48541f9 100644
--- a/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
@@ -59,7 +59,7 @@
BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo()));
if (!Objects.isNull(station)) {
station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
- station.setBarcode(null);
+ station.setBarcode("");
if (!basStationService.updateById(station)) {
throw new CoolException("绔欑偣鐘舵�佷慨鏀瑰け璐�!!");
}
@@ -133,7 +133,7 @@
locMast.setLocSts("Q");
locMast.setModiTime(now);
locMast.setModiUser(userId);
- if (!locCacheService.updateById(locMast)) {
+ if (!locCacheService.update(locMast, new EntityWrapper<LocCache>().eq("loc_no", locMast.getLocNo()))) {
throw new CoolException("淇敼搴撲綅鐘舵�佸け璐�");
}
}
@@ -160,22 +160,22 @@
String locNo = ""; // 寰呬慨鏀圭洰鏍囧簱浣�
String locSts = ""; // 寰呬慨鏀圭洰鏍囧簱浣嶇姸鎬�
// 鍏ュ簱鍙栨秷锛堜慨鏀圭洰鏍囧簱浣嶏級
- if (wrkMast.getWrkSts() < 4) {
+ if (wrkMast.getIoType() == 1 && wrkMast.getWrkSts() < 204) {
locNo = wrkMast.getLocNo();
locSts = "O";
- // 搴撲綅杞Щ
- if (wrkMast.getIoType() == 11) {
- // 搴撲綅杞Щ锛氭簮搴撲綅
- LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getSourceLocNo()));
- if (Cools.isEmpty(locMast)) {
- throw new CoolException("鍙栨秷搴撲綅杞Щ澶辫触锛屾簮搴撲綅涓嶅瓨鍦�:" + wrkMast.getSourceLocNo());
- }
- locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F");
- locMast.setModiTime(now);
- locMast.setModiUser(userId);
- locCacheService.updateById(locMast);
- }
+// // 搴撲綅杞Щ
+// if (wrkMast.getIoType() == 11) {
+// // 搴撲綅杞Щ锛氭簮搴撲綅
+// LocCache locMast = locCacheService.selectOne(new EntityWrapper<LocCache>().eq("loc_no", wrkMast.getSourceLocNo()));
+// if (Cools.isEmpty(locMast)) {
+// throw new CoolException("鍙栨秷搴撲綅杞Щ澶辫触锛屾簮搴撲綅涓嶅瓨鍦�:" + wrkMast.getSourceLocNo());
+// }
+// locMast.setLocSts(wrkMast.getFullPlt().equalsIgnoreCase("N") ? "D" : "F");
+// locMast.setModiTime(now);
+// locMast.setModiUser(userId);
+// locCacheService.update(locMast, new EntityWrapper<LocCache>().eq("loc_no", locMast.getLocNo()));
+// }
BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo()));
if (station.getLocSts().equals("R")) {
@@ -189,7 +189,7 @@
throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐ワ紝鐩爣搴撲綅鐘舵�侊細" + station.getLocSts());
}
// 鍑哄簱鍙栨秷锛堜慨鏀规簮搴撲綅锛�
- } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) {
+ } else if (wrkMast.getWrkSts() > 300 && wrkMast.getWrkSts() < 304) {
locNo = wrkMast.getSourceLocNo();
// 鍑哄簱 ===>> F.鍦ㄥ簱
if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) {
@@ -208,27 +208,19 @@
locMast.setLocSts("O");
locMast.setModiTime(now);
locMast.setModiUser(userId);
- locCacheService.updateById(locMast);
+ locCacheService.update(locMast, new EntityWrapper<LocCache>().eq("loc_no", locMast.getLocNo()));
+// locCacheService.updateById(locMast);
}
BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getStaNo()));
- if (station.getLocSts().equals("S")) {
- station.setLocSts("O");
- station.setBarcode(null);
- station.setModiTime(new Date());
- station.setModiUser(userId);
- if (!basStationService.updateById(station)) {
- throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐�");
- }
- } else {
- throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐ワ紝鐩爣搴撲綅鐘舵�侊細" + station.getLocSts());
+ station.setLocSts("O");
+ station.setBarcode("");
+ station.setModiTime(new Date());
+ station.setModiUser(userId);
+ if (!basStationService.updateById(station)) {
+ throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐�");
}
- } else {
- throw new CoolException("褰撳墠宸ヤ綔鐘舵�佹棤娉曞彇娑�");
- }
-
- //鍙栨秷鍏ュ簱宸ヤ綔妗f椂锛屾煡璇㈢粍鎵樿〃锛屽鏋滄湁灏嗙姸鎬佹敼涓哄緟澶勭悊
- if (wrkMast.getIoType() == 1) {
+ } else if (wrkMast.getIoType() == 1) {
List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode()));
for (WaitPakin waitPakin : waitPakins) {
if (!Cools.isEmpty(waitPakin)) {
@@ -241,7 +233,22 @@
.eq("batch", waitPakin.getBatch()));
}
}
+ BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo()));
+ if (station.getLocSts().equals("R")) {
+ station.setLocSts("O");
+ station.setBarcode("");
+ station.setModiTime(new Date());
+ station.setModiUser(userId);
+ if (!basStationService.updateById(station)) {
+ throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐�");
+ }
+ }
+ } else {
+ throw new CoolException("褰撳墠宸ヤ綔鐘舵�佹棤娉曞彇娑�");
}
+
+ //鍙栨秷鍏ュ簱宸ヤ綔妗f椂锛屾煡璇㈢粍鎵樿〃锛屽鏋滄湁灏嗙姸鎬佹敼涓哄緟澶勭悊
+
//鍙栨秷鍑哄簱宸ヤ綔妗f椂锛屾煡璇㈠崟鎹鐞嗚〃锛屽洖婊氫綔涓氫腑鏁伴噺
if (wrkMast.getIoType() == 101 || wrkMast.getIoType() == 103) {
@@ -324,7 +331,8 @@
locMast.setLocSts(locSts);
locMast.setModiTime(now);
locMast.setModiUser(userId);
- boolean locMastRes = locCacheService.updateById(locMast);
+
+ boolean locMastRes = locCacheService.update(locMast, new EntityWrapper<LocCache>().eq("loc_no", locMast.getLocNo()));
if (!wrkMastRes || !locMastRes) {
throw new CoolException("淇濆瓨鏁版嵁澶辫触");
}
--
Gitblit v1.9.1