<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.bailuntec.mapper.BaseStockMapper">
    <select id="listStock" parameterType="string" resultType="baseStockVO">
        SELECT
        tb1.`bailun_sku`,
        tb1.`warehouse_code`,
        tb2.`warehouse_name`,
        tb1.`quantity_reservation`,
        tb1.`quantity_transport`,
        tb1.`quantity_transfer`,
        tb1.`quantity_freeze`,
        tb1.`quantity_supplier`,
        tb1.`quantity_presell`,
        tb1.`quantity_defective`,
        tb1.`quantity_transit`,
        tb1.`wait_check`,
        tb1.`wait_putaway`,
        tb1.`usable_stock`,
        tb1.`usable_sales`,
        tb1.`usable_sales_private`,
        tb1.`usable_sales_share`,
        tb1.`in_warehouse_share`,
        tb1.`in_warehouse_private`,
        tb1.`in_warehouse`,
        tb1.`occupy_stock_share`,
        tb1.`occupy_stock_private`,
        tb1.`occupy_stock`,
        tb1.`occupy_activity`,
        tb1.`occupy_order_private`,
        tb1.`occupy_order_share`,
        tb1.`occupy_order`,
        tb1.`create_time`,
        tb1.`update_time`
        FROM
        dc_base_warehouse tb2
        INNER JOIN dc_base_stock tb1 ON tb1.warehouse_code = tb2.warehouse_code
        AND bailun_sku IN
        <foreach item="sku" index="index" collection="skuArray" open="(" separator="," close=")">
            #{sku}
        </foreach>
    </select>
</mapper>