<?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.prolog.upcloud.base.wh.operate.dao.WmsMoveDConfirmMapper">
  <resultMap id="BaseResultMap" type="com.prolog.upcloud.base.wh.operate.model.WmsMoveDConfirm">
    <id column="MOVE_LINE_ID" jdbcType="VARCHAR" property="moveLineId" />
    <result column="MOVE_HEADER_ID" jdbcType="VARCHAR" property="moveHeaderId" />
    <result column="LINE_NUM" jdbcType="DECIMAL" property="lineNum" />
    <result column="OUT_LOCATOR_ID" jdbcType="VARCHAR" property="outLocatorId" />
    <result column="IN_LOCATOR_ID" jdbcType="VARCHAR" property="inLocatorId" />
    <result column="ITEM_ID" jdbcType="VARCHAR" property="itemId" />
    <result column="BATCH_ID" jdbcType="VARCHAR" property="batchId" />
    <result column="BATCH_NUM" jdbcType="VARCHAR" property="batchNum" />
    <result column="UOM" jdbcType="VARCHAR" property="uom" />
    <result column="CONVERSION_RATE" jdbcType="DECIMAL" property="conversionRate" />
    <result column="QUANTITY" jdbcType="DECIMAL" property="quantity" />
    <result column="PIECE_QUANTITY" jdbcType="DECIMAL" property="pieceQuantity" />
    <result column="GMT_CREATE" jdbcType="TIMESTAMP" property="gmtCreate" />
    <result column="CREATOR" jdbcType="VARCHAR" property="creator" />
    <result column="CREATOR_NAME" jdbcType="VARCHAR" property="creatorName" />
    <result column="GMT_MODIFIED" jdbcType="TIMESTAMP" property="gmtModified" />
    <result column="MODIFIER" jdbcType="VARCHAR" property="modifier" />
    <result column="MODIFIER_NAME" jdbcType="VARCHAR" property="modifierName" />
    <result column="SEGMENT1" jdbcType="VARCHAR" property="segment1" />
    <result column="SEGMENT2" jdbcType="VARCHAR" property="segment2" />
    <result column="SEGMENT3" jdbcType="VARCHAR" property="segment3" />
    <result column="SEGMENT4" jdbcType="VARCHAR" property="segment4" />
    <result column="SEGMENT5" jdbcType="VARCHAR" property="segment5" />
    <result column="STATUS" jdbcType="VARCHAR" property="status" />
    <result column="COMMENTS" jdbcType="VARCHAR" property="comments" />
    <result column="OUT_WAREHOUSE_WORKER_ID" jdbcType="VARCHAR" property="outWarehouseWorkerId" />
    <result column="IN_WAREHOUSE_WORKER_ID" jdbcType="VARCHAR" property="inWarehouseWorkerId" />
    <result column="OUT_CONTAINER_CODE" jdbcType="VARCHAR" property="outContainerCode" />
    <result column="OUT_GOODS_CASE_CODE" jdbcType="VARCHAR" property="outGoodsCaseCode" />
    <result column="IN_CONTAINER_CODE" jdbcType="VARCHAR" property="inContainerCode" />
    <result column="IN_GOODS_CASE_CODE" jdbcType="VARCHAR" property="inGoodsCaseCode" />
  </resultMap>
  <sql id="Base_Column_List">
    MOVE_LINE_ID, MOVE_HEADER_ID, LINE_NUM, OUT_LOCATOR_ID, IN_LOCATOR_ID, ITEM_ID, BATCH_ID,
    BATCH_NUM, UOM, CONVERSION_RATE, QUANTITY, PIECE_QUANTITY, GMT_CREATE, CREATOR, CREATED_NAME,
    GMT_MODIFIED, MODIFIER, MODIFIER_NAME, SEGMENT1, SEGMENT2, SEGMENT3, SEGMENT4, SEGMENT5,
    "STATUS", COMMENTS, OUT_WAREHOUSE_WORKER_ID, IN_WAREHOUSE_WORKER_ID, OUT_CONTAINER_CODE,
    OUT_GOODS_CASE_CODE, IN_CONTAINER_CODE, IN_GOODS_CASE_CODE
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from WMS_MOVE_D_CONFIRM
    where MOVE_LINE_ID = #{moveLineId,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from WMS_MOVE_D_CONFIRM
    where MOVE_LINE_ID = #{moveLineId,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" keyColumn="MOVE_LINE_ID" keyProperty="moveLineId" parameterType="com.prolog.upcloud.base.wh.operate.model.WmsMoveDConfirm" useGeneratedKeys="true">
    insert into WMS_MOVE_D_CONFIRM (MOVE_HEADER_ID, LINE_NUM, OUT_LOCATOR_ID,
      IN_LOCATOR_ID, ITEM_ID, BATCH_ID,
      BATCH_NUM, UOM, CONVERSION_RATE,
      QUANTITY, PIECE_QUANTITY, GMT_CREATE,
      CREATOR, CREATOR_NAME, GMT_MODIFIED,
      MODIFIER, MODIFIER_NAME, SEGMENT1,
      SEGMENT2, SEGMENT3, SEGMENT4,
      SEGMENT5, "STATUS", COMMENTS,
      OUT_WAREHOUSE_WORKER_ID, IN_WAREHOUSE_WORKER_ID,
      OUT_CONTAINER_CODE, OUT_GOODS_CASE_CODE, IN_CONTAINER_CODE,
      IN_GOODS_CASE_CODE)
    values (#{moveHeaderId,jdbcType=VARCHAR}, #{lineNum,jdbcType=DECIMAL}, #{outLocatorId,jdbcType=VARCHAR},
      #{inLocatorId,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}, #{batchId,jdbcType=VARCHAR},
      #{batchNum,jdbcType=VARCHAR}, #{uom,jdbcType=VARCHAR}, #{conversionRate,jdbcType=DECIMAL},
      #{quantity,jdbcType=DECIMAL}, #{pieceQuantity,jdbcType=DECIMAL}, #{gmtCreate,jdbcType=TIMESTAMP},
      #{creator,jdbcType=VARCHAR}, #{createdName,jdbcType=VARCHAR}, #{gmtModified,jdbcType=TIMESTAMP},
      #{modifier,jdbcType=VARCHAR}, #{modifierName,jdbcType=VARCHAR}, #{segment1,jdbcType=VARCHAR},
      #{segment2,jdbcType=VARCHAR}, #{segment3,jdbcType=VARCHAR}, #{segment4,jdbcType=VARCHAR},
      #{segment5,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{comments,jdbcType=VARCHAR},
      #{outWarehouseWorkerId,jdbcType=VARCHAR}, #{inWarehouseWorkerId,jdbcType=VARCHAR},
      #{outContainerCode,jdbcType=VARCHAR}, #{outGoodsCaseCode,jdbcType=VARCHAR}, #{inContainerCode,jdbcType=VARCHAR},
      #{inGoodsCaseCode,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" keyColumn="MOVE_LINE_ID" keyProperty="moveLineId" parameterType="com.prolog.upcloud.base.wh.operate.model.WmsMoveDConfirm" useGeneratedKeys="true">
    insert into WMS_MOVE_D_CONFIRM
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="moveHeaderId != null">
        MOVE_HEADER_ID,
      </if>
      <if test="lineNum != null">
        LINE_NUM,
      </if>
      <if test="outLocatorId != null">
        OUT_LOCATOR_ID,
      </if>
      <if test="inLocatorId != null">
        IN_LOCATOR_ID,
      </if>
      <if test="itemId != null">
        ITEM_ID,
      </if>
      <if test="batchId != null">
        BATCH_ID,
      </if>
      <if test="batchNum != null">
        BATCH_NUM,
      </if>
      <if test="uom != null">
        UOM,
      </if>
      <if test="conversionRate != null">
        CONVERSION_RATE,
      </if>
      <if test="quantity != null">
        QUANTITY,
      </if>
      <if test="pieceQuantity != null">
        PIECE_QUANTITY,
      </if>
      <if test="gmtCreate != null">
        GMT_CREATE,
      </if>
      <if test="creator != null">
        CREATOR,
      </if>
      <if test="createdName != null">
        CREATED_NAME,
      </if>
      <if test="gmtModified != null">
        GMT_MODIFIED,
      </if>
      <if test="modifier != null">
        MODIFIER,
      </if>
      <if test="modifierName != null">
        MODIFIER_NAME,
      </if>
      <if test="segment1 != null">
        SEGMENT1,
      </if>
      <if test="segment2 != null">
        SEGMENT2,
      </if>
      <if test="segment3 != null">
        SEGMENT3,
      </if>
      <if test="segment4 != null">
        SEGMENT4,
      </if>
      <if test="segment5 != null">
        SEGMENT5,
      </if>
      <if test="status != null">
        "STATUS",
      </if>
      <if test="comments != null">
        COMMENTS,
      </if>
      <if test="outWarehouseWorkerId != null">
        OUT_WAREHOUSE_WORKER_ID,
      </if>
      <if test="inWarehouseWorkerId != null">
        IN_WAREHOUSE_WORKER_ID,
      </if>
      <if test="outContainerCode != null">
        OUT_CONTAINER_CODE,
      </if>
      <if test="outGoodsCaseCode != null">
        OUT_GOODS_CASE_CODE,
      </if>
      <if test="inContainerCode != null">
        IN_CONTAINER_CODE,
      </if>
      <if test="inGoodsCaseCode != null">
        IN_GOODS_CASE_CODE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="moveHeaderId != null">
        #{moveHeaderId,jdbcType=VARCHAR},
      </if>
      <if test="lineNum != null">
        #{lineNum,jdbcType=DECIMAL},
      </if>
      <if test="outLocatorId != null">
        #{outLocatorId,jdbcType=VARCHAR},
      </if>
      <if test="inLocatorId != null">
        #{inLocatorId,jdbcType=VARCHAR},
      </if>
      <if test="itemId != null">
        #{itemId,jdbcType=VARCHAR},
      </if>
      <if test="batchId != null">
        #{batchId,jdbcType=VARCHAR},
      </if>
      <if test="batchNum != null">
        #{batchNum,jdbcType=VARCHAR},
      </if>
      <if test="uom != null">
        #{uom,jdbcType=VARCHAR},
      </if>
      <if test="conversionRate != null">
        #{conversionRate,jdbcType=DECIMAL},
      </if>
      <if test="quantity != null">
        #{quantity,jdbcType=DECIMAL},
      </if>
      <if test="pieceQuantity != null">
        #{pieceQuantity,jdbcType=DECIMAL},
      </if>
      <if test="gmtCreate != null">
        #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="creator != null">
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="createdName != null">
        #{createdName,jdbcType=VARCHAR},
      </if>
      <if test="gmtModified != null">
        #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="modifier != null">
        #{modifier,jdbcType=VARCHAR},
      </if>
      <if test="modifierName != null">
        #{modifierName,jdbcType=VARCHAR},
      </if>
      <if test="segment1 != null">
        #{segment1,jdbcType=VARCHAR},
      </if>
      <if test="segment2 != null">
        #{segment2,jdbcType=VARCHAR},
      </if>
      <if test="segment3 != null">
        #{segment3,jdbcType=VARCHAR},
      </if>
      <if test="segment4 != null">
        #{segment4,jdbcType=VARCHAR},
      </if>
      <if test="segment5 != null">
        #{segment5,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="comments != null">
        #{comments,jdbcType=VARCHAR},
      </if>
      <if test="outWarehouseWorkerId != null">
        #{outWarehouseWorkerId,jdbcType=VARCHAR},
      </if>
      <if test="inWarehouseWorkerId != null">
        #{inWarehouseWorkerId,jdbcType=VARCHAR},
      </if>
      <if test="outContainerCode != null">
        #{outContainerCode,jdbcType=VARCHAR},
      </if>
      <if test="outGoodsCaseCode != null">
        #{outGoodsCaseCode,jdbcType=VARCHAR},
      </if>
      <if test="inContainerCode != null">
        #{inContainerCode,jdbcType=VARCHAR},
      </if>
      <if test="inGoodsCaseCode != null">
        #{inGoodsCaseCode,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.prolog.upcloud.base.wh.operate.model.WmsMoveDConfirm">
    update WMS_MOVE_D_CONFIRM
    <set>
      <if test="moveHeaderId != null">
        MOVE_HEADER_ID = #{moveHeaderId,jdbcType=VARCHAR},
      </if>
      <if test="lineNum != null">
        LINE_NUM = #{lineNum,jdbcType=DECIMAL},
      </if>
      <if test="outLocatorId != null">
        OUT_LOCATOR_ID = #{outLocatorId,jdbcType=VARCHAR},
      </if>
      <if test="inLocatorId != null">
        IN_LOCATOR_ID = #{inLocatorId,jdbcType=VARCHAR},
      </if>
      <if test="itemId != null">
        ITEM_ID = #{itemId,jdbcType=VARCHAR},
      </if>
      <if test="batchId != null">
        BATCH_ID = #{batchId,jdbcType=VARCHAR},
      </if>
      <if test="batchNum != null">
        BATCH_NUM = #{batchNum,jdbcType=VARCHAR},
      </if>
      <if test="uom != null">
        UOM = #{uom,jdbcType=VARCHAR},
      </if>
      <if test="conversionRate != null">
        CONVERSION_RATE = #{conversionRate,jdbcType=DECIMAL},
      </if>
      <if test="quantity != null">
        QUANTITY = #{quantity,jdbcType=DECIMAL},
      </if>
      <if test="pieceQuantity != null">
        PIECE_QUANTITY = #{pieceQuantity,jdbcType=DECIMAL},
      </if>
      <if test="gmtCreate != null">
        GMT_CREATE = #{gmtCreate,jdbcType=TIMESTAMP},
      </if>
      <if test="creator != null">
        CREATOR = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="createdName != null">
        CREATED_NAME = #{createdName,jdbcType=VARCHAR},
      </if>
      <if test="gmtModified != null">
        GMT_MODIFIED = #{gmtModified,jdbcType=TIMESTAMP},
      </if>
      <if test="modifier != null">
        MODIFIER = #{modifier,jdbcType=VARCHAR},
      </if>
      <if test="modifierName != null">
        MODIFIER_NAME = #{modifierName,jdbcType=VARCHAR},
      </if>
      <if test="segment1 != null">
        SEGMENT1 = #{segment1,jdbcType=VARCHAR},
      </if>
      <if test="segment2 != null">
        SEGMENT2 = #{segment2,jdbcType=VARCHAR},
      </if>
      <if test="segment3 != null">
        SEGMENT3 = #{segment3,jdbcType=VARCHAR},
      </if>
      <if test="segment4 != null">
        SEGMENT4 = #{segment4,jdbcType=VARCHAR},
      </if>
      <if test="segment5 != null">
        SEGMENT5 = #{segment5,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        "STATUS" = #{status,jdbcType=VARCHAR},
      </if>
      <if test="comments != null">
        COMMENTS = #{comments,jdbcType=VARCHAR},
      </if>
      <if test="outWarehouseWorkerId != null">
        OUT_WAREHOUSE_WORKER_ID = #{outWarehouseWorkerId,jdbcType=VARCHAR},
      </if>
      <if test="inWarehouseWorkerId != null">
        IN_WAREHOUSE_WORKER_ID = #{inWarehouseWorkerId,jdbcType=VARCHAR},
      </if>
      <if test="outContainerCode != null">
        OUT_CONTAINER_CODE = #{outContainerCode,jdbcType=VARCHAR},
      </if>
      <if test="outGoodsCaseCode != null">
        OUT_GOODS_CASE_CODE = #{outGoodsCaseCode,jdbcType=VARCHAR},
      </if>
      <if test="inContainerCode != null">
        IN_CONTAINER_CODE = #{inContainerCode,jdbcType=VARCHAR},
      </if>
      <if test="inGoodsCaseCode != null">
        IN_GOODS_CASE_CODE = #{inGoodsCaseCode,jdbcType=VARCHAR},
      </if>
    </set>
    where MOVE_LINE_ID = #{moveLineId,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.prolog.upcloud.base.wh.operate.model.WmsMoveDConfirm">
    update WMS_MOVE_D_CONFIRM
    set MOVE_HEADER_ID = #{moveHeaderId,jdbcType=VARCHAR},
      LINE_NUM = #{lineNum,jdbcType=DECIMAL},
      OUT_LOCATOR_ID = #{outLocatorId,jdbcType=VARCHAR},
      IN_LOCATOR_ID = #{inLocatorId,jdbcType=VARCHAR},
      ITEM_ID = #{itemId,jdbcType=VARCHAR},
      BATCH_ID = #{batchId,jdbcType=VARCHAR},
      BATCH_NUM = #{batchNum,jdbcType=VARCHAR},
      UOM = #{uom,jdbcType=VARCHAR},
      CONVERSION_RATE = #{conversionRate,jdbcType=DECIMAL},
      QUANTITY = #{quantity,jdbcType=DECIMAL},
      PIECE_QUANTITY = #{pieceQuantity,jdbcType=DECIMAL},
      GMT_CREATE = #{gmtCreate,jdbcType=TIMESTAMP},
      CREATOR = #{creator,jdbcType=VARCHAR},
      CREATOR_NAME = #{createdName,jdbcType=VARCHAR},
      GMT_MODIFIED = #{gmtModified,jdbcType=TIMESTAMP},
      MODIFIER = #{modifier,jdbcType=VARCHAR},
      MODIFIER_NAME = #{modifierName,jdbcType=VARCHAR},
      SEGMENT1 = #{segment1,jdbcType=VARCHAR},
      SEGMENT2 = #{segment2,jdbcType=VARCHAR},
      SEGMENT3 = #{segment3,jdbcType=VARCHAR},
      SEGMENT4 = #{segment4,jdbcType=VARCHAR},
      SEGMENT5 = #{segment5,jdbcType=VARCHAR},
      "STATUS" = #{status,jdbcType=VARCHAR},
      COMMENTS = #{comments,jdbcType=VARCHAR},
      OUT_WAREHOUSE_WORKER_ID = #{outWarehouseWorkerId,jdbcType=VARCHAR},
      IN_WAREHOUSE_WORKER_ID = #{inWarehouseWorkerId,jdbcType=VARCHAR},
      OUT_CONTAINER_CODE = #{outContainerCode,jdbcType=VARCHAR},
      OUT_GOODS_CASE_CODE = #{outGoodsCaseCode,jdbcType=VARCHAR},
      IN_CONTAINER_CODE = #{inContainerCode,jdbcType=VARCHAR},
      IN_GOODS_CASE_CODE = #{inGoodsCaseCode,jdbcType=VARCHAR}
    where MOVE_LINE_ID = #{moveLineId,jdbcType=VARCHAR}
  </update>
</mapper>
