<?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.emergency.avenue.storage.mapper.InboundMapper">


	<select id="inboundCount" resultType="java.lang.Integer">
        select
        count(*)
from
        inbound_material_info imi
left join inbound_info io
on
        imi.inbound_id= io.inbound_id
where
        io.dept_id=#{deptId} and imi.material_name=#{out.materialName}
        AND imi.inbound_time=#{out.inboundTime} and imi.unit_price=#{out.unitPrice}
        AND imi.is_available=#{out.isAvailable}
	</select>
</mapper>
