LEFT JOIN (SELECT * from base_dictionary_data where f_dictionary_type_id = '521699870097015173' and f_delete_mark is null) c on a.product_type_id = c.f_en_code
LEFT JOIN jg_product_brand d on a.brand_id = d.id
LEFT JOIN (SELECT aa.*,bb.product_unit_code from jg_product_unitwarehouse aa LEFT JOIN jg_product_unit bb on aa.id = bb.product_unitwarehouse_id WHERE aa.F_Delete_mark is null and bb.F_delete_mark is null) e on a.inventory_unit_id = e.product_unit_code
LEFT JOIN jg_business_line f on a.warehouse_id = f.id
LEFT JOIN jg_business_cargo g on a.storage_area_id = g.id
${ew.customSqlSegment} and a.f_delete_mark is null and b.f_delete_mark is null
and c.f_delete_mark is null and d.f_delete_mark is null and e.f_delete_mark is null and f.f_delete_mark is null and g.f_delete_mark is null