From ecd79ff570939b55f455767f2b310590faa5a191 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期三, 10 九月 2025 22:13:01 +0800
Subject: [PATCH] 1.新增组托时批号必须唯一 2.新增当有出库任务时禁止AGV入库搬运 3.拣料下架从任务状态16改成34

---
 src/main/resources/mapper/OrderMapper.xml |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml
index 1ac517d..7f88f3c 100644
--- a/src/main/resources/mapper/OrderMapper.xml
+++ b/src/main/resources/mapper/OrderMapper.xml
@@ -46,9 +46,26 @@
         update man_order
         set settle = #{settle}
         ,update_time = getdate()
-        ,update_by = #{userId}
+        <if test="userId != null">
+            ,update_by = #{userId}
+        </if>
         where 1=1
         and id = #{orderId}
     </update>
 
+    <select id="selectComplete" resultMap="BaseResultMap">
+        select top 5 *
+        from man_order
+        where 1=1
+        and settle = 4
+        and status = 1
+        and doc_type!=18
+        and doc_type!=19
+        order by create_time asc
+    </select>
+
+    <insert id="addToLogTable">
+        INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id}
+    </insert>
+
 </mapper>

--
Gitblit v1.9.1