From dc40d8612fb49ad1282eca24d7bc1b3112c1f604 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 21 十一月 2025 09:45:20 +0800
Subject: [PATCH] 1

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java |   60 ++++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index 36f6740..36f4f97 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -309,6 +309,9 @@
         waitPakins.forEach(pakin -> {
             BasContainer container = basContainerService.getOne(new LambdaUpdateWrapper<BasContainer>()
                     .eq(BasContainer::getCode, pakin.getBarcode()));
+            if (Objects.isNull(container)) {
+                throw new CoolException("瀹瑰櫒鏈淮鎶ゅ叆搴擄紝璇风淮鎶ゅ悗鍐嶆搷浣滐紒锛�");
+            }
             /**鑾峰彇搴撲綅*/
             String targetLoc = LocManageUtil.getTargetLoc(warehouseArea.getId(), container.getContainerType());
             if (Cools.isEmpty(targetLoc)) {
@@ -683,10 +686,9 @@
         if (Objects.isNull(loc)) {
             throw new CoolException("搴撳瓨涓嶅瓨鍦紒锛�");
         }
-        if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
-            throw new CoolException("褰撳墠搴撲綅鐘舵�佷笉澶勪簬S.鍏ュ簱棰勭害锛屼笉鍙墽琛屽叆搴撴搷浣滐紒");
-        }
-
+//        if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_S.type)) {
+//            throw new CoolException("褰撳墠搴撲綅鐘舵�佷笉澶勪簬S.鍏ュ簱棰勭害锛屼笉鍙墽琛屽叆搴撴搷浣滐紒");
+//        }
         loc.setUseStatus(LocStsType.LOC_STS_TYPE_F.type)
                 .setBarcode(task.getBarcode())
                 .setUpdateBy(loginUserId).setUpdateTime(new Date());
@@ -705,6 +707,7 @@
             LocItem locItem = new LocItem();
             LocItemWorking locWorking = locItemWorkingService.getOne(new LambdaQueryWrapper<LocItemWorking>()
                     .eq(LocItemWorking::getTaskId, taskItem.getTaskId())
+                    .eq(LocItemWorking::getFieldsIndex, taskItem.getFieldsIndex())
                     .eq(StringUtils.isNotBlank(taskItem.getBatch()), LocItemWorking::getBatch, taskItem.getBatch())
                     .eq(LocItemWorking::getMatnrId, taskItem.getMatnrId()));
             if (Objects.isNull(locWorking)) {
@@ -1205,28 +1208,37 @@
             throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
         }
 
-        if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
-            if (!this.update(new LambdaUpdateWrapper<Task>()
-                    .eq(Task::getId, task.getId())
-                    .set(Task::getUpdateBy, loginUserId)
-                    .set(Task::getUpdateTime, new Date())
-                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
-                throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
-            }
-        } else {
-            if (!this.update(new LambdaUpdateWrapper<Task>()
-                    .eq(Task::getId, task.getId())
-                    .set(Task::getUpdateBy, loginUserId)
-                    .set(Task::getUpdateTime, new Date())
-                    .set(Task::getTaskStatus, TaskStsType.UPDATED_OUT.id))) {
-                throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
-            }
-            //鍏ㄦ澘鍑哄簱锛屽垹闄や复鏃跺簱瀛�
-            if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
-                throw new CoolException("涓存椂搴撳瓨娓呴櫎澶辫触锛侊紒");
-            }
+        if (!this.update(new LambdaUpdateWrapper<Task>()
+                .eq(Task::getId, task.getId())
+                .set(Task::getUpdateBy, loginUserId)
+                .set(Task::getUpdateTime, new Date())
+                .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+            throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
         }
 
+
+//        if (task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)) {
+//            if (!this.update(new LambdaUpdateWrapper<Task>()
+//                    .eq(Task::getId, task.getId())
+//                    .set(Task::getUpdateBy, loginUserId)
+//                    .set(Task::getUpdateTime, new Date())
+//                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+//                throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
+//            }
+//        } else {
+//            if (!this.update(new LambdaUpdateWrapper<Task>()
+//                    .eq(Task::getId, task.getId())
+//                    .set(Task::getUpdateBy, loginUserId)
+//                    .set(Task::getUpdateTime, new Date())
+//                    .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+//                throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
+//            }
+////            //鍏ㄦ澘鍑哄簱锛屽垹闄や复鏃跺簱瀛�
+////            if (!locItemWorkingService.remove(new LambdaQueryWrapper<LocItemWorking>().eq(LocItemWorking::getTaskId, task.getId()))) {
+////                throw new CoolException("涓存椂搴撳瓨娓呴櫎澶辫触锛侊紒");
+////            }
+//        }
+
     }
 
     /**

--
Gitblit v1.9.1