ALLOCATEARRIVALMapper.xml 5.1 KB
<?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.tianbo.analysis.dao.ALLOCATEARRIVALMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
    <result column="ID" property="id" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
    <result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="DATE" />
    <result column="CUSTOMOS" property="customos" jdbcType="VARCHAR" />
    <result column="ARRIVALPIECES" property="arrivalpieces" jdbcType="VARCHAR" />
    <result column="ARRIVALWEIGHT" property="arrivalweight" jdbcType="VARCHAR" />
    <result column="UNLOADINGLAND" property="unloadingland" jdbcType="VARCHAR" />
    <result column="PRODUCTCODE" property="productcode" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
    insert into ALLOCATEARRIVAL (ID, CREATEDATE, WAYBILLNO, 
      CARRIER, FLIGHTNO, FLIGHTDATE, 
      CUSTOMOS, ARRIVALPIECES, ARRIVALWEIGHT, 
      UNLOADINGLAND, PRODUCTCODE, STATUS, 
      RECEIPTINFORMATION)
    values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR}, 
      #{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, 
      #{customos,jdbcType=VARCHAR}, #{arrivalpieces,jdbcType=VARCHAR}, #{arrivalweight,jdbcType=VARCHAR}, 
      #{unloadingland,jdbcType=VARCHAR}, #{productcode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, 
      #{receiptinformation,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
    insert into ALLOCATEARRIVAL
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="waybillno != null" >
        WAYBILLNO,
      </if>
      <if test="carrier != null" >
        CARRIER,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="flightdate != null" >
        FLIGHTDATE,
      </if>
      <if test="customos != null" >
        CUSTOMOS,
      </if>
      <if test="arrivalpieces != null" >
        ARRIVALPIECES,
      </if>
      <if test="arrivalweight != null" >
        ARRIVALWEIGHT,
      </if>
      <if test="unloadingland != null" >
        UNLOADINGLAND,
      </if>
      <if test="productcode != null" >
        PRODUCTCODE,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="waybillno != null" >
        #{waybillno,jdbcType=VARCHAR},
      </if>
      <if test="carrier != null" >
        #{carrier,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="customos != null" >
        #{customos,jdbcType=VARCHAR},
      </if>
      <if test="arrivalpieces != null" >
        #{arrivalpieces,jdbcType=VARCHAR},
      </if>
      <if test="arrivalweight != null" >
        #{arrivalweight,jdbcType=VARCHAR},
      </if>
      <if test="unloadingland != null" >
        #{unloadingland,jdbcType=VARCHAR},
      </if>
      <if test="productcode != null" >
        #{productcode,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="receiptinformation != null" >
        #{receiptinformation,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>


  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" >
    UPDATE ALLOCATEARRIVAL
    SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
    STATUS = #{status,jdbcType=VARCHAR}
    WHERE
    CARRIER = #{carrier,jdbcType=VARCHAR}
    AND
    FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
    AND
    WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  </update>

  <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.ALLOCATEARRIVAL" resultType="com.tianbo.analysis.model.ALLOCATEARRIVAL">
    SELECT ID
    FROM ALLOCATEARRIVAL
    WHERE
    FLIGHTNO= #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
    AND
    WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  </select>
</mapper>