|
|
|
@ -23,15 +23,10 @@ |
|
|
|
from so_receive_boxes s |
|
|
|
left join warehouse w on s.WareHouseID = w.WareHouseID and s.site = w.site and s.bu_no = w.bu_no |
|
|
|
<where> |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
and s.site = #{site} |
|
|
|
</if> |
|
|
|
s.site = #{site} and s.bu_no = #{buNo} |
|
|
|
<if test="orderNo != null and orderNo != ''"> |
|
|
|
and s.order_no = #{orderNo} |
|
|
|
</if> |
|
|
|
<if test="buNo != null and buNo != ''"> |
|
|
|
and s.bu_no = #{buNo} |
|
|
|
</if> |
|
|
|
<if test="boxType != null and boxType != ''"> |
|
|
|
and s.box_type = #{boxType} |
|
|
|
</if> |
|
|
|
@ -155,10 +150,23 @@ |
|
|
|
</delete> |
|
|
|
|
|
|
|
<select id="searchRollForOrderNo" resultType="SoReceiveBoxRollsData"> |
|
|
|
select ROW_NUMBER() OVER (ORDER BY b.received_date) orderId, b.id,b.site,b.bu_no, |
|
|
|
b.box_no,b.final_roll_no,b.roll_qty,b.received_by,b.received_date,b.WareHouseID,b.part_no, |
|
|
|
c.warehouse_id,c.batch_no,c.location_id |
|
|
|
from so_receive_boxes a left join so_receive_box_rolls b on a.site = b.site and a.box_no = b.box_no and a.bu_no = b.bu_no |
|
|
|
select |
|
|
|
ROW_NUMBER() OVER (ORDER BY b.received_date) orderId, |
|
|
|
b.id, |
|
|
|
b.site, |
|
|
|
b.bu_no, |
|
|
|
b.box_no, |
|
|
|
b.final_roll_no, |
|
|
|
b.roll_qty, |
|
|
|
b.received_by, |
|
|
|
b.received_date, |
|
|
|
b.WareHouseID, |
|
|
|
b.part_no, |
|
|
|
c.warehouse_id, |
|
|
|
c.batch_no, |
|
|
|
c.location_id |
|
|
|
from so_receive_boxes a |
|
|
|
left join so_receive_box_rolls b on a.site = b.site and a.box_no = b.box_no and a.bu_no = b.bu_no |
|
|
|
left join inventory_stock c on b.site = c.site and b.final_roll_no = c.roll_no and b.bu_no = c.bu_no |
|
|
|
where a.site = #{site} and a.order_no = #{orderNo} and a.bu_no = #{buNo} |
|
|
|
</select> |
|
|
|
@ -180,12 +188,7 @@ |
|
|
|
s.bu_no as buNo |
|
|
|
FROM so_receive_cases s |
|
|
|
<where> |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
AND s.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="buNo != null and buNo != ''"> |
|
|
|
AND s.bu_no = #{buNo} |
|
|
|
</if> |
|
|
|
s.site = #{site} AND s.bu_no = #{buNo} |
|
|
|
<if test="notifyNo != null and notifyNo != ''"> |
|
|
|
AND s.NotifyNo = #{notifyNo} |
|
|
|
</if> |
|
|
|
@ -333,7 +336,10 @@ |
|
|
|
AND a.order_type = #{orderType} |
|
|
|
</if> |
|
|
|
<if test="orderStatus != null and orderStatus != ''"> |
|
|
|
AND a.order_status = #{orderStatus} |
|
|
|
AND a.order_status in |
|
|
|
<foreach collection="statusArr" close=")" open="(" item="item" separator=","> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="customerId != null and customerId != ''"> |
|
|
|
AND a.customer_id LIKE '%' + #{customerId} + '%' |
|
|
|
|