<?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.StockTransferMapper">

    <select id="getPage" resultType="java.util.LinkedHashMap">
        select st.id,
               pi.name,
               pi.code,
               pi.unit,
               pi.specs,
               iw.name inWarehouseName,
               ow.name outWarehouseName,
               st.in_quantity,
               st.out_quantity,
               st.create_user,
               st.create_time,
               st.in_time,
               iw.warehouse_keeper_id inUser,
               st.in_status
        from stock_transfer st
                 left join product_info pi on st.product_id = pi.id
                 left join warehouse iw on iw.id = st.in_warehouse_id
                 left join warehouse ow on ow.id = st.out_warehouse_id
            ${ew.customSqlSegment}
    </select>

</mapper>
