From 8cc06179a0e2f9807a5b1e829bc61f5849578541 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 26 Dec 2025 17:16:54 +0800
Subject: [PATCH] =?UTF-8?q?2025-12-26=20=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../InboundNotificationDetailMapper.xml | 21 ++++++++++++-------
.../mapper/schedule/ScheduleMapper.xml | 4 ++--
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml
index 4cf4af5..a0c0a48 100644
--- a/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml
+++ b/src/main/resources/mapper/inboundNotification/InboundNotificationDetailMapper.xml
@@ -140,21 +140,28 @@
SET
required_qty = CASE
- WHEN roll_no = #{item.rollNo} THEN #{item.requiredQty,jdbcType=DOUBLE}
+ WHEN (roll_no = #{item.rollNo} OR (ISNULL(roll_no, '') = '' AND part_no = #{item.partNo})) THEN #{item.requiredQty,jdbcType=DOUBLE}
ELSE required_qty
END,
in_warehouse = CASE
- WHEN roll_no = #{item.rollNo} THEN #{item.inWarehouse}
+ WHEN (roll_no = #{item.rollNo} OR (ISNULL(roll_no, '') = '' AND part_no = #{item.partNo})) THEN #{item.inWarehouse}
ELSE in_warehouse
END
- WHERE roll_no IN
-
- #{item.rollNo}
-
- AND site = #{list[0].site} and bu_no = #{list[0].buNo} and order_no = #{list[0].orderNo}
+ WHERE site = #{list[0].site} AND bu_no = #{list[0].buNo} AND order_no = #{list[0].orderNo}
+ AND (
+ roll_no IN
+
+ #{item.rollNo}
+
+ OR (ISNULL(roll_no, '') = '' AND part_no IN
+
+ #{item.partNo}
+
+ )
+ )