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