Browse Source

2026-02-09

收货入库和拣货出库增加部门
master
fengyuan_yang 4 months ago
parent
commit
5efcc80b2c
  1. 2
      src/main/java/com/gaotao/modules/report/entity/InboundNotificationReportData.java
  2. 2
      src/main/java/com/gaotao/modules/report/entity/OutboundNotificationReportData.java
  3. 3
      src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml
  4. 11
      src/main/resources/mapper/report/InboundNotificationReportMapper.xml
  5. 11
      src/main/resources/mapper/report/OutboundNotificationReportMapper.xml

2
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;

2
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;

3
src/main/resources/mapper/outboundNotification/OutboundNotificationHeadMapper.xml

@ -85,6 +85,9 @@
OR s.SupplierName LIKE '%' + #{query.customerName} + '%'
)
</if>
<if test="query.departmentNo != null and query.departmentNo != ''">
AND a.department_no = #{query.departmentNo}
</if>
<if test="query.createdStartDate != null">
AND a.created_date >= #{query.createdStartDate}
</if>

11
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
<where>
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 @@
<if test="query.rollNo != null and query.rollNo != ''">
AND d.roll_no LIKE '%' + #{query.rollNo} + '%'
</if>
<if test="query.departmentNo != null and query.departmentNo != ''">
AND h.department_no = #{query.departmentNo}
</if>
</where>
ORDER BY h.created_date DESC, h.order_no, d.part_no
OFFSET #{offset} ROWS FETCH NEXT #{limit} ROWS ONLY
@ -155,6 +161,9 @@
<if test="query.rollNo != null and query.rollNo != ''">
AND d.roll_no LIKE '%' + #{query.rollNo} + '%'
</if>
<if test="query.departmentNo != null and query.departmentNo != ''">
AND h.department_no = #{query.departmentNo}
</if>
</where>
</select>

11
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
<where>
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 @@
<if test="query.queryOutBatchNo != null and query.queryOutBatchNo != ''">
AND d.out_batch_no LIKE '%' + #{query.queryOutBatchNo} + '%'
</if>
<if test="query.departmentNo != null and query.departmentNo != ''">
AND h.department_no = #{query.departmentNo}
</if>
</where>
ORDER BY h.created_date DESC, h.order_no, d.part_no
OFFSET #{offset} ROWS FETCH NEXT #{limit} ROWS ONLY
@ -163,6 +169,9 @@
<if test="query.queryOutBatchNo != null and query.queryOutBatchNo != ''">
AND d.out_batch_no LIKE '%' + #{query.queryOutBatchNo} + '%'
</if>
<if test="query.departmentNo != null and query.departmentNo != ''">
AND h.department_no = #{query.departmentNo}
</if>
</where>
</select>

Loading…
Cancel
Save