DEPARTURESLOADINGMapper.xml 6.3 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.DEPARTURESLOADINGMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.DEPARTURESLOADING" >
    <result column="ID" property="id" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="WAYBILLNO" property="waybillno" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
    <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />
    <result column="STOWAGEPIECES" property="stowagepieces" jdbcType="VARCHAR" />
    <result column="STOWAGEWEIGHT" property="stowageweight" jdbcType="VARCHAR" />
    <result column="WAYBILLPIECES" property="waybillpieces" jdbcType="VARCHAR" />
    <result column="WAYBILLWEIGHT" property="waybillweight" jdbcType="VARCHAR" />
    <result column="STOWAGEDATE" property="stowagedate" jdbcType="TIMESTAMP" />
    <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
    <result column="SPECIALCODE" property="specialcode" jdbcType="VARCHAR" />
    <result column="CUSTOMS" property="customs" jdbcType="VARCHAR" />
    <result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" >
    insert into DEPARTURESLOADING (ID, CREATEDATE, WAYBILLNO, 
      FLIGHTNO, FLIGHTDATE, ORIGINATINGSTATION, 
      DESTINATIONSTATION, STOWAGEPIECES, STOWAGEWEIGHT, 
      WAYBILLPIECES, WAYBILLWEIGHT, STOWAGEDATE, 
      PRODUCTNAME, SPECIALCODE, CUSTOMS, 
      RECEIPTION, STATUS)
    values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR}, 
      #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, #{originatingstation,jdbcType=VARCHAR}, 
      #{destinationstation,jdbcType=VARCHAR}, #{stowagepieces,jdbcType=VARCHAR}, #{stowageweight,jdbcType=VARCHAR}, 
      #{waybillpieces,jdbcType=VARCHAR}, #{waybillweight,jdbcType=VARCHAR}, #{stowagedate,jdbcType=TIMESTAMP}, 
      #{productname,jdbcType=VARCHAR}, #{specialcode,jdbcType=VARCHAR}, #{customs,jdbcType=VARCHAR}, 
      #{receiption,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" >
    insert into DEPARTURESLOADING
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="waybillno != null" >
        WAYBILLNO,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="flightdate != null" >
        FLIGHTDATE,
      </if>
      <if test="originatingstation != null" >
        ORIGINATINGSTATION,
      </if>
      <if test="destinationstation != null" >
        DESTINATIONSTATION,
      </if>
      <if test="stowagepieces != null" >
        STOWAGEPIECES,
      </if>
      <if test="stowageweight != null" >
        STOWAGEWEIGHT,
      </if>
      <if test="waybillpieces != null" >
        WAYBILLPIECES,
      </if>
      <if test="waybillweight != null" >
        WAYBILLWEIGHT,
      </if>
      <if test="stowagedate != null" >
        STOWAGEDATE,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="specialcode != null" >
        SPECIALCODE,
      </if>
      <if test="customs != null" >
        CUSTOMS,
      </if>
      <if test="receiption != null" >
        RECEIPTION,
      </if>
      <if test="status != null" >
        STATUS,
      </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="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="originatingstation != null" >
        #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null" >
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="stowagepieces != null" >
        #{stowagepieces,jdbcType=VARCHAR},
      </if>
      <if test="stowageweight != null" >
        #{stowageweight,jdbcType=VARCHAR},
      </if>
      <if test="waybillpieces != null" >
        #{waybillpieces,jdbcType=VARCHAR},
      </if>
      <if test="waybillweight != null" >
        #{waybillweight,jdbcType=VARCHAR},
      </if>
      <if test="stowagedate != null" >
        #{stowagedate,jdbcType=TIMESTAMP},
      </if>
      <if test="productname != null" >
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="specialcode != null" >
        #{specialcode,jdbcType=VARCHAR},
      </if>
      <if test="customs != null" >
        #{customs,jdbcType=VARCHAR},
      </if>
      <if test="receiption != null" >
        #{receiption,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>


  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" >
    UPDATE DEPARTURESLOADING
    SET RECEIPTINO= #{receiptino,jdbcType=VARCHAR}
    WHERE WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
    AND
    FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
    AND
    WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  </update>

  <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.DEPARTURESLOADING" resultType="com.tianbo.analysis.model.DEPARTURESLOADING">
    SELECT AUTOID
    FROM DEPARTURESLOADING
    WHERE
    FLIGHTNO= #{flightno,jdbcType=VARCHAR}
    AND
    FLIGHTDATE= #{flightDate,jdbcType=TIMESTAMP}
    AND
    WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  </select>

</mapper>