<?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.stock.StockCombinationMapper">

    <select id="getPage" resultType="com.fjhx.params.stock.StockCombinationPageVo">
        select sc.combination_quantity combinationQuantity,
               sc.create_user          createUser,
               sc.create_time          createTime,
               pi.code                 productCode,
               pi.name                 productName,
               pi.specs                productSpecs,
               pi.unit                 productUnit,
               wo.name                 sourceWarehouseName,
               wi.name                 combinationWarehouseName
        from stock_combination sc
                 left join product_info pi on pi.id = sc.product_id
                 left join warehouse wo on wo.id = sc.source_warehouse_id
                 left join warehouse wi on wi.id = sc.combination_warehouse_id
            ${ew.customSqlSegment}
    </select>

</mapper>
