From 973eed10d720c7dbd0020407c3b89fe1d385944f Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 08 十二月 2025 09:42:20 +0800
Subject: [PATCH] wms功能完善

---
 src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java
index 5c2334e..5e37433 100644
--- a/src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/TaskDetlLogServiceImpl.java
@@ -30,18 +30,18 @@
     @Transactional(rollbackFor = Exception.class)
     public boolean save(Integer wrkNo) {
         List<TaskDetl> detls = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", wrkNo));
-        if (Objects.isNull(detls) || detls.isEmpty()) {
-            throw new CoolException("鏁版嵁閿欒锛氫换鍔′笉瀛樺湪锛侊紒");
+        if (!detls.isEmpty()) {
+            detls.forEach(detl -> {
+                TaskDetlLog detlLog = new TaskDetlLog();
+                BeanUtils.copyProperties(detl, detlLog);
+                detlLog.setId(null);
+                detlLog.setLogId(detl.getId());
+                if (!this.insert(detlLog)) {
+                    throw new CoolException("宸ヤ綔妗f槑缁嗗巻鍙蹭繚瀛樺け璐ワ紒锛�");
+                }
+            });
         }
-        detls.forEach(detl -> {
-            TaskDetlLog detlLog = new TaskDetlLog();
-            BeanUtils.copyProperties(detl, detlLog);
-            detlLog.setId(null);
-            detlLog.setLogId(detl.getId());
-            if (!this.insert(detlLog)) {
-                throw new CoolException("宸ヤ綔妗f槑缁嗗巻鍙蹭繚瀛樺け璐ワ紒锛�");
-            }
-        });
-        return false;
+
+        return true;
     }
 }

--
Gitblit v1.9.1