From 52b21b24130c75197c039ae0fd761e2ef5b43cb3 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期三, 03 十二月 2025 17:35:34 +0800
Subject: [PATCH] #

---
 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