|
@@ -47,7 +47,7 @@
|
|
|
qp.update_time,
|
|
|
qp.create_by,
|
|
|
qp.qr_type,
|
|
|
- bm.material_name,
|
|
|
+ ifnull(bm.material_name,bo.material_name) as material_name,
|
|
|
bf.factory_name AS factory_cover_name,
|
|
|
bcf.name AS box_code_format_name,
|
|
|
ui.user_name AS create_by_name,
|
|
@@ -57,6 +57,7 @@
|
|
|
LEFT JOIN qr_box_code_format bcf ON qp.box_code_format_id = bcf.id
|
|
|
LEFT JOIN base_material bm ON qp.material_id = bm.id
|
|
|
LEFT JOIN base_factory bf ON qp.factory_cover_id = bf.id
|
|
|
+ LEFT JOIN qr_package_booking_order bo on bo.booking_order=qp.booking_order and bo.is_delete=0
|
|
|
LEFT JOIN user_info ui ON qp.create_by = ui.id
|
|
|
<where>
|
|
|
qp.is_delete = 0
|
|
@@ -66,6 +67,12 @@
|
|
|
<if test="param.materialId != null">
|
|
|
AND qp.material_id = #{param.materialId}
|
|
|
</if>
|
|
|
+ <if test="param.materialName != null and param.materialName != '' ">
|
|
|
+ and
|
|
|
+ (bm.material_name like concat('%',#{param.materialName},'%')
|
|
|
+ or
|
|
|
+ bo.material_name like concat('%',#{param.materialName},'%'))
|
|
|
+ </if>
|
|
|
<if test="param.qrType != null">
|
|
|
AND qp.qr_type = #{param.qrType}
|
|
|
</if>
|