b.item_no,b.fgpart_no,b.soorder_no,b.ops_item_no,b.seq_no,b.issure_qty,b.location_no,FORMAT(b.need_date ,'yyyy-MM-dd') as needDate,b.release_no,b.sequence_no
from SOIssueNotifyOrderList b
left join SOIssueNotifyHeader a on a.notify_no=b.notify_no and a.site=b.site
where a.site=#{site} and a.status='ISSUE' and b.soorder_no=#{notifyNo} and (b.order_type is null or b.order_type='shoporder')
where a.site=#{site} and a.status='ISSUE' and b.soorder_no=#{notifyNo} and (a.order_type is null or a.order_type='shoporder')