|
|
@ -12,6 +12,7 @@ |
|
|
a.order_status, |
|
|
a.order_status, |
|
|
d.part_no, |
|
|
d.part_no, |
|
|
d.part_desc, |
|
|
d.part_desc, |
|
|
|
|
|
p.spec, |
|
|
D.related_order_no AS po_orderNo, |
|
|
D.related_order_no AS po_orderNo, |
|
|
D.related_order_line_no AS po_itemNo, |
|
|
D.related_order_line_no AS po_itemNo, |
|
|
c.SupplierName, |
|
|
c.SupplierName, |
|
|
@ -27,6 +28,7 @@ |
|
|
b.inspector_no |
|
|
b.inspector_no |
|
|
from inbound_notification_head a |
|
|
from inbound_notification_head a |
|
|
inner join inbound_notification_detail D on a.site = D.site and a.bu_no = D.bu_no and a.order_no = D.order_no AND A.order_type ='采购入库' |
|
|
inner join inbound_notification_detail D on a.site = D.site and a.bu_no = D.bu_no and a.order_no = D.order_no AND A.order_type ='采购入库' |
|
|
|
|
|
LEFT JOIN PART P ON D.site = P.Site AND D.part_no = P.PartNo |
|
|
inner join qc_iqc_record b on D.site = b.site and D.bu_no = b.bu_no and D.inspection_no = b.inspection_no |
|
|
inner join qc_iqc_record b on D.site = b.site and D.bu_no = b.bu_no and D.inspection_no = b.inspection_no |
|
|
left join Supplier c on a.site = c.Site and a.Supplier_ID = c.supplierID |
|
|
left join Supplier c on a.site = c.Site and a.Supplier_ID = c.supplierID |
|
|
<where> |
|
|
<where> |
|
|
@ -48,6 +50,9 @@ |
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
<if test="query.partDesc != null and query.partDesc != ''"> |
|
|
and b.part_desc like '%'+ #{query.partDesc,jdbcType=CHAR} +'%' |
|
|
and b.part_desc like '%'+ #{query.partDesc,jdbcType=CHAR} +'%' |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="query.spec != null and query.spec != ''"> |
|
|
|
|
|
and p.spec like '%'+ #{query.spec} +'%' |
|
|
|
|
|
</if> |
|
|
<if test="query.startDate != null"> |
|
|
<if test="query.startDate != null"> |
|
|
and b.inspector_date > #{query.startDate} |
|
|
and b.inspector_date > #{query.startDate} |
|
|
</if> |
|
|
</if> |
|
|
|