|
|
@ -9,14 +9,17 @@ |
|
|
h.site, |
|
|
h.site, |
|
|
h.order_no AS returnNo, |
|
|
h.order_no AS returnNo, |
|
|
h.bu_no AS buNo, |
|
|
h.bu_no AS buNo, |
|
|
'' AS relatedNo, |
|
|
|
|
|
'' AS relatedLineNo, |
|
|
|
|
|
0 as totalLabels, |
|
|
|
|
|
0 as availableLabels, |
|
|
|
|
|
SUM(CAST(d.required_qty AS float)) as totalQty, |
|
|
|
|
|
0 as availableQty |
|
|
|
|
|
|
|
|
<!-- '' AS relatedNo,--> |
|
|
|
|
|
<!-- '' AS relatedLineNo,--> |
|
|
|
|
|
<!-- 0 as totalLabels,--> |
|
|
|
|
|
<!-- 0 as availableLabels,--> |
|
|
|
|
|
<!-- SUM(CAST(d.required_qty AS float)) as totalQty,--> |
|
|
|
|
|
<!-- 0 as availableQty,--> |
|
|
|
|
|
h.customer_id as customerId, |
|
|
|
|
|
C.CustomerName as customerName |
|
|
FROM outbound_notification_head h |
|
|
FROM outbound_notification_head h |
|
|
INNER JOIN outbound_notification_detail d ON h.order_no = d.order_no AND h.site = d.site and h.bu_no = d.bu_no |
|
|
INNER JOIN outbound_notification_detail d ON h.order_no = d.order_no AND h.site = d.site and h.bu_no = d.bu_no |
|
|
|
|
|
INNER JOIN Customer C ON H.site = C.Site AND H.customer_id = C.CustomerID |
|
|
WHERE h.site = #{site} and h.bu_no in (select bu_no from AccessBu where username = #{userName}) |
|
|
WHERE h.site = #{site} and h.bu_no in (select bu_no from AccessBu where username = #{userName}) |
|
|
AND h.order_type = '采购退货' |
|
|
AND h.order_type = '采购退货' |
|
|
AND h.close_flag = 'N' |
|
|
AND h.close_flag = 'N' |
|
|
@ -31,7 +34,7 @@ |
|
|
<if test="searchCode == null or searchCode == ''"> |
|
|
<if test="searchCode == null or searchCode == ''"> |
|
|
AND CONVERT(DATE, h.required_outbound_date) = CONVERT(DATE, GETDATE()) |
|
|
AND CONVERT(DATE, h.required_outbound_date) = CONVERT(DATE, GETDATE()) |
|
|
</if> |
|
|
</if> |
|
|
GROUP BY h.site, h.order_no, h.bu_no ,h.required_outbound_date |
|
|
|
|
|
|
|
|
GROUP BY h.site, h.order_no, h.bu_no,h.customer_id,C.CustomerName,required_outbound_date |
|
|
ORDER BY h.required_outbound_date DESC |
|
|
ORDER BY h.required_outbound_date DESC |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|