<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fjhx.mapper.quality.QualityInfoMapper">

    <select id="getPage" resultType="com.fjhx.params.quality.QualityInfoPageVo">
        select qi.id         id,
               qi.status     status,
               li.code       logisticsInfoCode,
               p.create_user createUser,
               p.create_time createTime,
               p.code        code,
               s.name        supplierName,
               lc.name       logisticsCompanyName,
               lc.code       logisticsCompanyCode
        from quality_info qi
                 inner join logistics_info li on li.id = qi.logistics_info_id
                 inner join purchase p on p.id = li.business_id
                 inner join supplier s on s.id = p.supplier_id
                 left join logistics_company lc on lc.code = li.logistics_company_code
            ${ew.customSqlSegment}
    </select>

</mapper>
