<?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.deer.wms.base.system.dao.ProcessRecordMapper">
  <resultMap id="BaseResultMap" type="com.deer.wms.base.system.model.ProcessRecord">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="process_id" jdbcType="INTEGER" property="processId" />
    <result column="item_code" jdbcType="VARCHAR" property="itemCode" />
    <result column="batch" jdbcType="VARCHAR" property="batch" />
    <result column="exp" jdbcType="VARCHAR" property="exp" />
    <result column="sub_inventory_id" jdbcType="INTEGER" property="subInventoryId" />
    <result column="flow_code" jdbcType="VARCHAR" property="flowCode" />
    <result column="card_no" jdbcType="VARCHAR" property="cardNo" />
  </resultMap>

  <select id="findList" parameterType="com.deer.wms.base.system.model.ProcessRecordCriteria" resultMap="BaseResultMap">
    select
    *
    from process_record
    where 1=1
    <if test="subInventoryId != null">
        and sub_inventory_id = #{subInventoryId}
    </if>
    <if test="itemCode != null and itemCode != ''">
      and item_code = #{itemCode}
    </if>
    <if test="batch != null and batch != ''">
      and batch = #{batch}
    </if>
    <if test="exp != null and exp != ''">
      and exp = #{exp}
    </if>
  </select>
</mapper>