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 96b925e..36f9972 100644 --- a/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java +++ b/src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java @@ -28,6 +28,7 @@ public class OutboundNotificationReportData { private String customerName; private String partNo; private String partDesc; + private String spec; private String queryRelatedOrderNo; // 查询条件:关联单号 private String queryRelatedOrderLineNo; // 查询条件:关联单行号 private String queryOutBatchNo; // 查询条件:合约号码 diff --git a/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml index d14c265..6720da1 100644 --- a/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml +++ b/src/main/resources/mapper/report/OutboundNotificationReportMapper.xml @@ -43,6 +43,7 @@ h.customer_order_no AS customerOrderNo, d.part_no AS detailPartNo, d.part_desc AS detailPartDesc, + p.Spec AS spec, d.unit, um.umName, d.required_qty AS requiredQty, @@ -61,6 +62,7 @@ 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 LEFT JOIN WareHouse wh WITH(NOLOCK) ON h.site = wh.site AND h.bu_no = wh.bu_no AND h.out_warehouse = wh.WareHouseID 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 part p WITH(NOLOCK) ON d.site = p.site AND d.bu_no = p.bu_no AND d.part_no = p.partNo 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 @@ -94,6 +96,9 @@ AND d.part_desc LIKE '%' + #{query.partDesc} + '%' + + AND p.Spec LIKE '%' + #{query.spec} + '%' + AND h.required_outbound_date >= #{query.startDate} @@ -126,6 +131,7 @@ 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 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 part p WITH(NOLOCK) ON d.site = p.site AND d.bu_no = p.bu_no AND d.part_no = p.partNo 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})) @@ -156,6 +162,9 @@ AND d.part_desc LIKE '%' + #{query.partDesc} + '%' + + AND p.Spec LIKE '%' + #{query.spec} + '%' + AND h.required_outbound_date >= #{query.startDate}