<?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.bailuntec.mapper.DcSemiStockReportMapper">
  <resultMap id="BaseResultMap" type="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="unique_no" jdbcType="VARCHAR" property="uniqueNo" />
    <result column="log_id" jdbcType="INTEGER" property="logId" />
    <result column="warehouse_type" jdbcType="CHAR" property="warehouseType" />
    <result column="warehouse_type_str" jdbcType="VARCHAR" property="warehouseTypeStr" />
    <result column="material_id" jdbcType="INTEGER" property="materialId" />
    <result column="stock" jdbcType="INTEGER" property="stock" />
    <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="warehouse_id" jdbcType="INTEGER" property="warehouseId" />
    <result column="stock_type" jdbcType="CHAR" property="stockType" />
    <result column="stock_type_str" jdbcType="VARCHAR" property="stockTypeStr" />
    <result column="material_code" jdbcType="VARCHAR" property="materialCode" />
    <result column="material_name" jdbcType="VARCHAR" property="materialName" />
    <result column="material_category" jdbcType="VARCHAR" property="materialCategory" />
    <result column="new_price" jdbcType="DECIMAL" property="newPrice" />
    <result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" />
    <result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="is_selfcontained" jdbcType="BIT" property="isSelfcontained" />
    <result column="is_selfcontained_str" jdbcType="VARCHAR" property="isSelfcontainedStr" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="is_zichang" jdbcType="BIT" property="isZichang" />
    <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, unique_no, log_id, warehouse_type, warehouse_type_str, material_id, stock, create_user_name, 
    create_time, warehouse_id, stock_type, stock_type_str, material_code, material_name, 
    material_category, new_price, warehouse_name, supplier_name, order_no, is_selfcontained, 
    is_selfcontained_str, remarks, is_zichang, gmt_create, gmt_modified
  </sql>
  <select id="selectByExample" parameterType="com.bailuntec.domain.example.DcSemiStockReportExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from dc_semi_stock_report
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="rows != null">
      <if test="offset != null">
        limit ${offset}, ${rows}
      </if>
      <if test="offset == null">
        limit ${rows}
      </if>
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from dc_semi_stock_report
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_semi_stock_report
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.bailuntec.domain.example.DcSemiStockReportExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from dc_semi_stock_report
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_semi_stock_report (id, unique_no, log_id, 
      warehouse_type, warehouse_type_str, material_id, 
      stock, create_user_name, create_time, 
      warehouse_id, stock_type, stock_type_str, 
      material_code, material_name, material_category, 
      new_price, warehouse_name, supplier_name, 
      order_no, is_selfcontained, is_selfcontained_str, 
      remarks, is_zichang, gmt_create, 
      gmt_modified)
    values (#{id,jdbcType=INTEGER}, #{uniqueNo,jdbcType=VARCHAR}, #{logId,jdbcType=INTEGER}, 
      #{warehouseType,jdbcType=CHAR}, #{warehouseTypeStr,jdbcType=VARCHAR}, #{materialId,jdbcType=INTEGER}, 
      #{stock,jdbcType=INTEGER}, #{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{warehouseId,jdbcType=INTEGER}, #{stockType,jdbcType=CHAR}, #{stockTypeStr,jdbcType=VARCHAR}, 
      #{materialCode,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{materialCategory,jdbcType=VARCHAR}, 
      #{newPrice,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{supplierName,jdbcType=VARCHAR}, 
      #{orderNo,jdbcType=VARCHAR}, #{isSelfcontained,jdbcType=BIT}, #{isSelfcontainedStr,jdbcType=VARCHAR}, 
      #{remarks,jdbcType=VARCHAR}, #{isZichang,jdbcType=BIT}, #{gmtCreate,jdbcType=TIMESTAMP}, 
      #{gmtModified,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into dc_semi_stock_report
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="uniqueNo != null">
        unique_no,
      </if>
      <if test="logId != null">
        log_id,
      </if>
      <if test="warehouseType != null">
        warehouse_type,
      </if>
      <if test="warehouseTypeStr != null">
        warehouse_type_str,
      </if>
      <if test="materialId != null">
        material_id,
      </if>
      <if test="stock != null">
        stock,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="warehouseId != null">
        warehouse_id,
      </if>
      <if test="stockType != null">
        stock_type,
      </if>
      <if test="stockTypeStr != null">
        stock_type_str,
      </if>
      <if test="materialCode != null">
        material_code,
      </if>
      <if test="materialName != null">
        material_name,
      </if>
      <if test="materialCategory != null">
        material_category,
      </if>
      <if test="newPrice != null">
        new_price,
      </if>
      <if test="warehouseName != null">
        warehouse_name,
      </if>
      <if test="supplierName != null">
        supplier_name,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="isSelfcontained != null">
        is_selfcontained,
      </if>
      <if test="isSelfcontainedStr != null">
        is_selfcontained_str,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="isZichang != null">
        is_zichang,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="uniqueNo != null">
        #{uniqueNo,jdbcType=VARCHAR},
      </if>
      <if test="logId != null">
        #{logId,jdbcType=INTEGER},
      </if>
      <if test="warehouseType != null">
        #{warehouseType,jdbcType=CHAR},
      </if>
      <if test="warehouseTypeStr != null">
        #{warehouseTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialId != null">
        #{materialId,jdbcType=INTEGER},
      </if>
      <if test="stock != null">
        #{stock,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="warehouseId != null">
        #{warehouseId,jdbcType=INTEGER},
      </if>
      <if test="stockType != null">
        #{stockType,jdbcType=CHAR},
      </if>
      <if test="stockTypeStr != null">
        #{stockTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialCode != null">
        #{materialCode,jdbcType=VARCHAR},
      </if>
      <if test="materialName != null">
        #{materialName,jdbcType=VARCHAR},
      </if>
      <if test="materialCategory != null">
        #{materialCategory,jdbcType=VARCHAR},
      </if>
      <if test="newPrice != null">
        #{newPrice,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="isSelfcontained != null">
        #{isSelfcontained,jdbcType=BIT},
      </if>
      <if test="isSelfcontainedStr != null">
        #{isSelfcontainedStr,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="isZichang != null">
        #{isZichang,jdbcType=BIT},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.bailuntec.domain.example.DcSemiStockReportExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from dc_semi_stock_report
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_semi_stock_report
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.uniqueNo != null">
        unique_no = #{record.uniqueNo,jdbcType=VARCHAR},
      </if>
      <if test="record.logId != null">
        log_id = #{record.logId,jdbcType=INTEGER},
      </if>
      <if test="record.warehouseType != null">
        warehouse_type = #{record.warehouseType,jdbcType=CHAR},
      </if>
      <if test="record.warehouseTypeStr != null">
        warehouse_type_str = #{record.warehouseTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="record.materialId != null">
        material_id = #{record.materialId,jdbcType=INTEGER},
      </if>
      <if test="record.stock != null">
        stock = #{record.stock,jdbcType=INTEGER},
      </if>
      <if test="record.createUserName != null">
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.warehouseId != null">
        warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
      </if>
      <if test="record.stockType != null">
        stock_type = #{record.stockType,jdbcType=CHAR},
      </if>
      <if test="record.stockTypeStr != null">
        stock_type_str = #{record.stockTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="record.materialCode != null">
        material_code = #{record.materialCode,jdbcType=VARCHAR},
      </if>
      <if test="record.materialName != null">
        material_name = #{record.materialName,jdbcType=VARCHAR},
      </if>
      <if test="record.materialCategory != null">
        material_category = #{record.materialCategory,jdbcType=VARCHAR},
      </if>
      <if test="record.newPrice != null">
        new_price = #{record.newPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.warehouseName != null">
        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierName != null">
        supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      </if>
      <if test="record.orderNo != null">
        order_no = #{record.orderNo,jdbcType=VARCHAR},
      </if>
      <if test="record.isSelfcontained != null">
        is_selfcontained = #{record.isSelfcontained,jdbcType=BIT},
      </if>
      <if test="record.isSelfcontainedStr != null">
        is_selfcontained_str = #{record.isSelfcontainedStr,jdbcType=VARCHAR},
      </if>
      <if test="record.remarks != null">
        remarks = #{record.remarks,jdbcType=VARCHAR},
      </if>
      <if test="record.isZichang != null">
        is_zichang = #{record.isZichang,jdbcType=BIT},
      </if>
      <if test="record.gmtCreate != null">
        gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.gmtModified != null">
        gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_semi_stock_report
    set id = #{record.id,jdbcType=INTEGER},
      unique_no = #{record.uniqueNo,jdbcType=VARCHAR},
      log_id = #{record.logId,jdbcType=INTEGER},
      warehouse_type = #{record.warehouseType,jdbcType=CHAR},
      warehouse_type_str = #{record.warehouseTypeStr,jdbcType=VARCHAR},
      material_id = #{record.materialId,jdbcType=INTEGER},
      stock = #{record.stock,jdbcType=INTEGER},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
      stock_type = #{record.stockType,jdbcType=CHAR},
      stock_type_str = #{record.stockTypeStr,jdbcType=VARCHAR},
      material_code = #{record.materialCode,jdbcType=VARCHAR},
      material_name = #{record.materialName,jdbcType=VARCHAR},
      material_category = #{record.materialCategory,jdbcType=VARCHAR},
      new_price = #{record.newPrice,jdbcType=DECIMAL},
      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
      supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      order_no = #{record.orderNo,jdbcType=VARCHAR},
      is_selfcontained = #{record.isSelfcontained,jdbcType=BIT},
      is_selfcontained_str = #{record.isSelfcontainedStr,jdbcType=VARCHAR},
      remarks = #{record.remarks,jdbcType=VARCHAR},
      is_zichang = #{record.isZichang,jdbcType=BIT},
      gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_semi_stock_report
    <set>
      <if test="uniqueNo != null">
        unique_no = #{uniqueNo,jdbcType=VARCHAR},
      </if>
      <if test="logId != null">
        log_id = #{logId,jdbcType=INTEGER},
      </if>
      <if test="warehouseType != null">
        warehouse_type = #{warehouseType,jdbcType=CHAR},
      </if>
      <if test="warehouseTypeStr != null">
        warehouse_type_str = #{warehouseTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialId != null">
        material_id = #{materialId,jdbcType=INTEGER},
      </if>
      <if test="stock != null">
        stock = #{stock,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="warehouseId != null">
        warehouse_id = #{warehouseId,jdbcType=INTEGER},
      </if>
      <if test="stockType != null">
        stock_type = #{stockType,jdbcType=CHAR},
      </if>
      <if test="stockTypeStr != null">
        stock_type_str = #{stockTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialCode != null">
        material_code = #{materialCode,jdbcType=VARCHAR},
      </if>
      <if test="materialName != null">
        material_name = #{materialName,jdbcType=VARCHAR},
      </if>
      <if test="materialCategory != null">
        material_category = #{materialCategory,jdbcType=VARCHAR},
      </if>
      <if test="newPrice != null">
        new_price = #{newPrice,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        supplier_name = #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="isSelfcontained != null">
        is_selfcontained = #{isSelfcontained,jdbcType=BIT},
      </if>
      <if test="isSelfcontainedStr != null">
        is_selfcontained_str = #{isSelfcontainedStr,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        remarks = #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="isZichang != null">
        is_zichang = #{isZichang,jdbcType=BIT},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update dc_semi_stock_report
    set unique_no = #{uniqueNo,jdbcType=VARCHAR},
      log_id = #{logId,jdbcType=INTEGER},
      warehouse_type = #{warehouseType,jdbcType=CHAR},
      warehouse_type_str = #{warehouseTypeStr,jdbcType=VARCHAR},
      material_id = #{materialId,jdbcType=INTEGER},
      stock = #{stock,jdbcType=INTEGER},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      warehouse_id = #{warehouseId,jdbcType=INTEGER},
      stock_type = #{stockType,jdbcType=CHAR},
      stock_type_str = #{stockTypeStr,jdbcType=VARCHAR},
      material_code = #{materialCode,jdbcType=VARCHAR},
      material_name = #{materialName,jdbcType=VARCHAR},
      material_category = #{materialCategory,jdbcType=VARCHAR},
      new_price = #{newPrice,jdbcType=DECIMAL},
      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      supplier_name = #{supplierName,jdbcType=VARCHAR},
      order_no = #{orderNo,jdbcType=VARCHAR},
      is_selfcontained = #{isSelfcontained,jdbcType=BIT},
      is_selfcontained_str = #{isSelfcontainedStr,jdbcType=VARCHAR},
      remarks = #{remarks,jdbcType=VARCHAR},
      is_zichang = #{isZichang,jdbcType=BIT},
      gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <insert id="upsertSelective" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_semi_stock_report
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="uniqueNo != null">
        unique_no,
      </if>
      <if test="logId != null">
        log_id,
      </if>
      <if test="warehouseType != null">
        warehouse_type,
      </if>
      <if test="warehouseTypeStr != null">
        warehouse_type_str,
      </if>
      <if test="materialId != null">
        material_id,
      </if>
      <if test="stock != null">
        stock,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="warehouseId != null">
        warehouse_id,
      </if>
      <if test="stockType != null">
        stock_type,
      </if>
      <if test="stockTypeStr != null">
        stock_type_str,
      </if>
      <if test="materialCode != null">
        material_code,
      </if>
      <if test="materialName != null">
        material_name,
      </if>
      <if test="materialCategory != null">
        material_category,
      </if>
      <if test="newPrice != null">
        new_price,
      </if>
      <if test="warehouseName != null">
        warehouse_name,
      </if>
      <if test="supplierName != null">
        supplier_name,
      </if>
      <if test="orderNo != null">
        order_no,
      </if>
      <if test="isSelfcontained != null">
        is_selfcontained,
      </if>
      <if test="isSelfcontainedStr != null">
        is_selfcontained_str,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="isZichang != null">
        is_zichang,
      </if>
      <if test="gmtCreate != null">
        gmt_create,
      </if>
      <if test="gmtModified != null">
        gmt_modified,
      </if>
    </trim>
    values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="uniqueNo != null">
        #{uniqueNo,jdbcType=VARCHAR},
      </if>
      <if test="logId != null">
        #{logId,jdbcType=INTEGER},
      </if>
      <if test="warehouseType != null">
        #{warehouseType,jdbcType=CHAR},
      </if>
      <if test="warehouseTypeStr != null">
        #{warehouseTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialId != null">
        #{materialId,jdbcType=INTEGER},
      </if>
      <if test="stock != null">
        #{stock,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="warehouseId != null">
        #{warehouseId,jdbcType=INTEGER},
      </if>
      <if test="stockType != null">
        #{stockType,jdbcType=CHAR},
      </if>
      <if test="stockTypeStr != null">
        #{stockTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialCode != null">
        #{materialCode,jdbcType=VARCHAR},
      </if>
      <if test="materialName != null">
        #{materialName,jdbcType=VARCHAR},
      </if>
      <if test="materialCategory != null">
        #{materialCategory,jdbcType=VARCHAR},
      </if>
      <if test="newPrice != null">
        #{newPrice,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="isSelfcontained != null">
        #{isSelfcontained,jdbcType=BIT},
      </if>
      <if test="isSelfcontainedStr != null">
        #{isSelfcontainedStr,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="isZichang != null">
        #{isZichang,jdbcType=BIT},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
    on duplicate key update 
    <trim suffixOverrides=",">
      <if test="id != null">
        id = #{id,jdbcType=INTEGER},
      </if>
      <if test="uniqueNo != null">
        unique_no = #{uniqueNo,jdbcType=VARCHAR},
      </if>
      <if test="logId != null">
        log_id = #{logId,jdbcType=INTEGER},
      </if>
      <if test="warehouseType != null">
        warehouse_type = #{warehouseType,jdbcType=CHAR},
      </if>
      <if test="warehouseTypeStr != null">
        warehouse_type_str = #{warehouseTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialId != null">
        material_id = #{materialId,jdbcType=INTEGER},
      </if>
      <if test="stock != null">
        stock = #{stock,jdbcType=INTEGER},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="warehouseId != null">
        warehouse_id = #{warehouseId,jdbcType=INTEGER},
      </if>
      <if test="stockType != null">
        stock_type = #{stockType,jdbcType=CHAR},
      </if>
      <if test="stockTypeStr != null">
        stock_type_str = #{stockTypeStr,jdbcType=VARCHAR},
      </if>
      <if test="materialCode != null">
        material_code = #{materialCode,jdbcType=VARCHAR},
      </if>
      <if test="materialName != null">
        material_name = #{materialName,jdbcType=VARCHAR},
      </if>
      <if test="materialCategory != null">
        material_category = #{materialCategory,jdbcType=VARCHAR},
      </if>
      <if test="newPrice != null">
        new_price = #{newPrice,jdbcType=DECIMAL},
      </if>
      <if test="warehouseName != null">
        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        supplier_name = #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="orderNo != null">
        order_no = #{orderNo,jdbcType=VARCHAR},
      </if>
      <if test="isSelfcontained != null">
        is_selfcontained = #{isSelfcontained,jdbcType=BIT},
      </if>
      <if test="isSelfcontainedStr != null">
        is_selfcontained_str = #{isSelfcontainedStr,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        remarks = #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="isZichang != null">
        is_zichang = #{isZichang,jdbcType=BIT},
      </if>
      <if test="gmtCreate != null">
        gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="gmtModified != null">
        gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <insert id="upsert" parameterType="com.bailuntec.domain.entity.DcSemiStockReport">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    insert into dc_semi_stock_report
    (id, unique_no, log_id, warehouse_type, warehouse_type_str, material_id, stock, create_user_name, 
      create_time, warehouse_id, stock_type, stock_type_str, material_code, material_name, 
      material_category, new_price, warehouse_name, supplier_name, order_no, is_selfcontained, 
      is_selfcontained_str, remarks, is_zichang, gmt_create, gmt_modified)
    values
    (#{id,jdbcType=INTEGER}, #{uniqueNo,jdbcType=VARCHAR}, #{logId,jdbcType=INTEGER}, 
      #{warehouseType,jdbcType=CHAR}, #{warehouseTypeStr,jdbcType=VARCHAR}, #{materialId,jdbcType=INTEGER}, 
      #{stock,jdbcType=INTEGER}, #{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{warehouseId,jdbcType=INTEGER}, #{stockType,jdbcType=CHAR}, #{stockTypeStr,jdbcType=VARCHAR}, 
      #{materialCode,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{materialCategory,jdbcType=VARCHAR}, 
      #{newPrice,jdbcType=DECIMAL}, #{warehouseName,jdbcType=VARCHAR}, #{supplierName,jdbcType=VARCHAR}, 
      #{orderNo,jdbcType=VARCHAR}, #{isSelfcontained,jdbcType=BIT}, #{isSelfcontainedStr,jdbcType=VARCHAR}, 
      #{remarks,jdbcType=VARCHAR}, #{isZichang,jdbcType=BIT}, #{gmtCreate,jdbcType=TIMESTAMP}, 
      #{gmtModified,jdbcType=TIMESTAMP})
    on duplicate key update 
    id = #{id,jdbcType=INTEGER}, 
    unique_no = #{uniqueNo,jdbcType=VARCHAR}, 
    log_id = #{logId,jdbcType=INTEGER}, 
    warehouse_type = #{warehouseType,jdbcType=CHAR}, 
    warehouse_type_str = #{warehouseTypeStr,jdbcType=VARCHAR}, 
    material_id = #{materialId,jdbcType=INTEGER}, 
    stock = #{stock,jdbcType=INTEGER}, 
    create_user_name = #{createUserName,jdbcType=VARCHAR}, 
    create_time = #{createTime,jdbcType=TIMESTAMP}, 
    warehouse_id = #{warehouseId,jdbcType=INTEGER}, 
    stock_type = #{stockType,jdbcType=CHAR}, 
    stock_type_str = #{stockTypeStr,jdbcType=VARCHAR}, 
    material_code = #{materialCode,jdbcType=VARCHAR}, 
    material_name = #{materialName,jdbcType=VARCHAR}, 
    material_category = #{materialCategory,jdbcType=VARCHAR}, 
    new_price = #{newPrice,jdbcType=DECIMAL}, 
    warehouse_name = #{warehouseName,jdbcType=VARCHAR}, 
    supplier_name = #{supplierName,jdbcType=VARCHAR}, 
    order_no = #{orderNo,jdbcType=VARCHAR}, 
    is_selfcontained = #{isSelfcontained,jdbcType=BIT}, 
    is_selfcontained_str = #{isSelfcontainedStr,jdbcType=VARCHAR}, 
    remarks = #{remarks,jdbcType=VARCHAR}, 
    is_zichang = #{isZichang,jdbcType=BIT}, 
    gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 
    gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
  </insert>
  <select id="selectOneByExample" parameterType="com.bailuntec.domain.example.DcSemiStockReportExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from dc_semi_stock_report
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
</mapper>