From 60fdc9564c65b90a8911ff10a25f3f3a63d3812c Mon Sep 17 00:00:00 2001
From: pjb <123456>
Date: 星期五, 20 六月 2025 11:06:27 +0800
Subject: [PATCH] 出库任务历史档优化

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/OrderTimer.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/OrderTimer.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/OrderTimer.java
index 05b2a98..88a2d54 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/OrderTimer.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/OrderTimer.java
@@ -45,6 +45,7 @@
                 //杞巻鍙叉。
                 OrderLog orderLog = new OrderLog();
                 orderLog.sync(order);
+                orderLog.setId(null);
                 if (!orderLogService.save(orderLog)) {
                     throw new CoolException("璁㈠崟杞巻鍙叉。澶辫触");
                 }
@@ -54,6 +55,7 @@
                 for (OrderDetl orderDetl : orderDetls) {
                     OrderDetlLog orderDetlLog = new OrderDetlLog();
                     orderDetlLog.sync(orderDetl);
+                    orderDetlLog.setId(null);
                     if(!orderDetlLogService.save(orderDetlLog)) {
                         throw new CoolException("璁㈠崟鏄庣粏杞巻鍙叉。澶辫触");
                     }
@@ -74,7 +76,7 @@
                     }
 
                     //鍒犻櫎璁㈠崟鏄庣粏
-                    if (!orderDetlService.removeById(orderDetl.getId())) {
+                    if (!orderDetlService.removeById(orderDetl)) {
                         throw new CoolException("鍒犻櫎璁㈠崟鏄庣粏澶辫触");
                     }
                 }

--
Gitblit v1.9.1