From 6df97fba67b0e0698a02673e65c6eca00879d5be Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 05 十二月 2025 08:16:44 +0800
Subject: [PATCH] #出库单

---
 src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 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 a983123..9d075f5 100644
--- a/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/TaskServiceImpl.java
@@ -34,6 +34,8 @@
     private TaskService taskService;
     @Autowired
     private TaskDetlLogService taskDetlLogService;
+    @Autowired
+    private BasStationService basStationService;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -154,6 +156,18 @@
                 locMast.setModiUser(userId);
                 locCacheService.updateById(locMast);
             }
+
+            BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getSourceStaNo()));
+            if (station.getLocSts().equals("R")) {
+                station.setLocSts(wrkMast.getIoType().equals(1)?"F":"D");
+                station.setModiTime(new Date());
+                station.setModiUser(userId);
+                if (!basStationService.updateById(station)) {
+                    throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐�");
+                }
+            } else {
+                throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐ワ紝鐩爣搴撲綅鐘舵�侊細" + station.getLocSts());
+            }
             // 鍑哄簱鍙栨秷锛堜慨鏀规簮搴撲綅锛�
         } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) {
             locNo = wrkMast.getSourceLocNo();
@@ -176,6 +190,18 @@
                 locMast.setModiUser(userId);
                 locCacheService.updateById(locMast);
             }
+
+            BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>().eq("dev_no", wrkMast.getStaNo()));
+            if (station.getLocSts().equals("S")) {
+                station.setLocSts("O");
+                station.setModiTime(new Date());
+                station.setModiUser(userId);
+                if (!basStationService.updateById(station)) {
+                    throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐�");
+                }
+            } else {
+                throw new CoolException("鏇存柊婧愮珯鐐圭姸鎬佸け璐ワ紝鐩爣搴撲綅鐘舵�侊細" + station.getLocSts());
+            }
         } else {
             throw new CoolException("褰撳墠宸ヤ綔鐘舵�佹棤娉曞彇娑�");
         }

--
Gitblit v1.9.1