From 5efcc80b2c129c94de6d905928a2434e8de38d4d Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Mon, 9 Feb 2026 13:57:14 +0800
Subject: [PATCH] =?UTF-8?q?2026-02-09=20=E6=94=B6=E8=B4=A7=E5=85=A5?=
=?UTF-8?q?=E5=BA=93=E5=92=8C=E6=8B=A3=E8=B4=A7=E5=87=BA=E5=BA=93=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E9=83=A8=E9=97=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../report/entity/InboundNotificationReportData.java | 2 ++
.../report/entity/OutboundNotificationReportData.java | 2 ++
.../OutboundNotificationHeadMapper.xml | 3 +++
.../mapper/report/InboundNotificationReportMapper.xml | 11 ++++++++++-
.../report/OutboundNotificationReportMapper.xml | 11 ++++++++++-
5 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java b/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java
index bee3ae4..30714d9 100644
--- a/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java
+++ b/src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java
@@ -66,6 +66,8 @@ public class InboundNotificationReportData {
private String closeFlag;
private String inWarehouse;
private String inWarehouseName;
+ private String departmentNo;
+ private String departmentName;
// 明细表字段
private String detailPartNo;
diff --git a/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java b/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java
index 4bf8299..96b925e 100644
--- a/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java
+++ b/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java
@@ -69,6 +69,8 @@ public class OutboundNotificationReportData {
private String outWarehouse;
private String outWarehouseName;
private String customerOrderNo;
+ private String departmentNo;
+ private String departmentName;
// 明细表字段
private String detailPartNo;
diff --git a/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml b/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml
index f837bf3..99573fd 100644
--- a/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml
+++ b/src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml
@@ -85,6 +85,9 @@
OR s.SupplierName LIKE '%' + #{query.customerName} + '%'
)
+
+ AND a.department_no = #{query.departmentNo}
+
AND a.created_date >= #{query.createdStartDate}
diff --git a/src/main/resources/mapper/report/InboundNotificationReportMapper.xml b/src/main/resources/mapper/report/InboundNotificationReportMapper.xml
index 3ceb36e..cd9316d 100644
--- a/src/main/resources/mapper/report/InboundNotificationReportMapper.xml
+++ b/src/main/resources/mapper/report/InboundNotificationReportMapper.xml
@@ -47,13 +47,16 @@
d.in_batch_no AS inBatchNo,
d.related_order_no AS detailRelatedOrderNo,
d.related_order_line_no AS detailRelatedOrderLineNo,
- d.roll_no AS rollNo
+ d.roll_no AS rollNo,
+ h.department_no AS departmentNo,
+ dep.department_desc AS departmentName
FROM inbound_notification_head h WITH(NOLOCK)
LEFT JOIN Supplier s WITH(NOLOCK) ON h.site = s.site AND h.supplier_id = s.SupplierID
LEFT JOIN WareHouse wh WITH(NOLOCK) ON h.site = wh.site AND h.bu_no = wh.bu_no AND h.in_warehouse = wh.WareHouseID
LEFT JOIN inbound_notification_detail d WITH(NOLOCK) ON h.site = d.site AND h.bu_no = d.bu_no AND h.order_no = d.order_no
LEFT JOIN WareHouse dwh WITH(NOLOCK) ON d.site = dwh.site AND d.bu_no = dwh.bu_no AND d.in_warehouse = dwh.WareHouseID
LEFT JOIN um WITH(NOLOCK) ON d.site = um.site AND d.unit = um.UMID
+ LEFT JOIN erp_department dep WITH(NOLOCK) ON h.department_no = dep.department_no
h.site IN (SELECT site FROM AccessSite WHERE UPPER(userID) = UPPER(#{userName}))
AND h.bu_no IN (SELECT bu_no FROM AccessBu WHERE UPPER(username) = UPPER(#{userName}))
@@ -99,6 +102,9 @@
AND d.roll_no LIKE '%' + #{query.rollNo} + '%'
+
+ AND h.department_no = #{query.departmentNo}
+
ORDER BY h.created_date DESC, h.order_no, d.part_no
OFFSET #{offset} ROWS FETCH NEXT #{limit} ROWS ONLY
@@ -155,6 +161,9 @@
AND d.roll_no LIKE '%' + #{query.rollNo} + '%'
+
+ AND h.department_no = #{query.departmentNo}
+
diff --git a/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml
index 20d699e..b68a43f 100644
--- a/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml
+++ b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml
@@ -53,7 +53,9 @@
d.out_batch_no AS outBatchNo,
d.related_order_no AS detailRelatedOrderNo,
d.related_order_line_no AS detailRelatedOrderLineNo,
- d.inspection_flag AS inspectionFlag
+ d.inspection_flag AS inspectionFlag,
+ h.department_no AS departmentNo,
+ dep.department_desc AS departmentName
FROM outbound_notification_head h WITH(NOLOCK)
LEFT JOIN Customer c WITH(NOLOCK) ON h.site = c.site AND LTRIM(RTRIM(h.customer_id)) = c.CustomerID
LEFT JOIN Supplier sup WITH(NOLOCK) ON h.site = sup.site AND (NULLIF(LTRIM(RTRIM(h.customer_id)), '') IS NULL OR c.CustomerID IS NULL) AND LTRIM(RTRIM(h.customer_id)) = sup.SupplierID
@@ -61,6 +63,7 @@
LEFT JOIN outbound_notification_detail d WITH(NOLOCK) ON h.site = d.site AND h.bu_no = d.bu_no AND h.order_no = d.order_no
LEFT JOIN WareHouse dwh WITH(NOLOCK) ON d.site = dwh.site AND d.bu_no = dwh.bu_no AND d.out_warehouse = dwh.WareHouseID
LEFT JOIN um WITH(NOLOCK) ON d.site = um.site AND d.unit = um.UMID
+ LEFT JOIN erp_department dep WITH(NOLOCK) ON h.department_no = dep.department_no
h.site IN (SELECT site FROM AccessSite WHERE UPPER(userID) = UPPER(#{userName}))
AND h.bu_no IN (SELECT bu_no FROM AccessBu WHERE UPPER(username) = UPPER(#{userName}))
@@ -106,6 +109,9 @@
AND d.out_batch_no LIKE '%' + #{query.queryOutBatchNo} + '%'
+
+ AND h.department_no = #{query.departmentNo}
+
ORDER BY h.created_date DESC, h.order_no, d.part_no
OFFSET #{offset} ROWS FETCH NEXT #{limit} ROWS ONLY
@@ -163,6 +169,9 @@
AND d.out_batch_no LIKE '%' + #{query.queryOutBatchNo} + '%'
+
+ AND h.department_no = #{query.departmentNo}
+