select material_base_info_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_code, shipper_name, material_code, material_name, bar_code, material_classify_code, material_classify_name, material_type, material_type_name, pack_id, pack_code, pack_name, unit_code, unit_name, brand_id, brand_code, brand_name, shelf_life, weight_limit, volume_limit, material_shape, material_shape_name, material_size, material_length, material_width, material_height, remark, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag,common,sku_code, unit_price, currency, origin_country, hs_code, declaration_unit, statutory_unit, statutory_second_unit,specification_Model from material_base_info
,b.shipper_id, b.shipper_code, b.shipper_name, b.material_code, b.material_name, b.bar_code, b.material_classify_code, b.material_classify_name,
b.material_type, b.material_type_name, b.common
and organization_id = #{organizationId}
and organization_name like concat('%', #{organizationName}, '%')
and top_organization_id = #{topOrganizationId}
and shipper_id = #{shipperId}
and shipper_code like concat('%', #{shipperCode}, '%')
and shipper_name like concat('%', #{shipperName}, '%')
and material_code = #{materialCode}
and material_name like concat('%', #{materialName}, '%')
and bar_code = #{barCode}
and material_classify_code = #{materialClassifyCode}
and material_classify_name like concat('%', #{materialClassifyName}, '%')
and material_type = #{materialType}
and material_type_name like concat('%', #{materialTypeName}, '%')
and pack_id = #{packId}
and pack_code = #{packCode}
and pack_name like concat('%', #{packName}, '%')
and brand_id = #{brandId}
and brand_code = #{brandCode}
and brand_name like concat('%', #{brandName}, '%')
and shelf_life = #{shelfLife}
and weight_limit = #{weightLimit}
and volume_limit = #{volumeLimit}
and material_shape = #{materialShape}
and material_shape_name like concat('%', #{materialShapeName}, '%')
and material_size = #{materialSize}
and material_length = #{materialLength}
and material_width = #{materialWidth}
and material_height = #{materialHeight}
and nullify = #{nullify}
and create_by_name like concat('%', #{createByName}, '%')
and update_by_name like concat('%', #{updateByName}, '%')
and ( instr(material_name, #{compoundOrQuery}) > 0
or
instr(material_code, #{compoundOrQuery}) > 0
or
instr(bar_code, #{compoundOrQuery}) > 0
)
and common = #{common} and (
1 = 1
or common = 1 ) and del_flag = #{delFlag} and del_flag = 1
and shipper_id = #{shipperId}
and shipper_code like concat('%', #{shipperCode}, '%')
and shipper_name like concat('%', #{shipperName}, '%')
and material_code = #{materialCode}
and material_name like concat('%', #{materialName}, '%')
and bar_code = #{barCode}
and material_classify_code = #{materialClassifyCode}
and material_classify_name like concat('%', #{materialClassifyName}, '%')
and material_type = #{materialType}
and material_type_name like concat('%', #{materialTypeName}, '%')
and (shipper_code like concat('%', #{shipperInfo}, '%') or shipper_name like concat('%', #{shipperInfo}, '%'))
and (material_code = #{materialInfo} or material_name like concat('%', #{materialInfo}, '%') or bar_code = #{materialInfo})