MANIFESTLOSTCHANGEMapper.xml 7.5 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.MANIFESTLOSTCHANGEMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
    <result column="ID" property="id" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
    <result column="CWAYBILLNOMASTER" property="cwaybillnomaster" jdbcType="VARCHAR" />
    <result column="CWAYBILLNOSECONDARY" property="cwaybillnosecondary" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="RECEIPTION" property="receiption" jdbcType="VARCHAR" />
    <result column="CFLIGHTNO" property="cflightno" jdbcType="VARCHAR" />
    <result column="CFLIGHTDATE" property="cflightdate" jdbcType="DATE" />
    <result column="SEQUENCENUMERIC" property="sequencenumeric" jdbcType="VARCHAR" />
    <result column="QUANTITY" property="quantity" jdbcType="VARCHAR" />
    <result column="CARGODESCRIPTION" property="cargodescription" jdbcType="VARCHAR" />
    <result column="GOODSMEASURE" property="goodsmeasure" jdbcType="VARCHAR" />
    <result column="CUSTOMCODE" property="customcode" jdbcType="VARCHAR" />
    <result column="REASON" property="reason" jdbcType="VARCHAR" />
    <result column="CONTACTNAME" property="contactname" jdbcType="VARCHAR" />
    <result column="CONTACTTEL" property="contacttel" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
    insert into MANIFESTLOSTCHANGE (ID, FLIGHTNO, FLIGHTDATE, 
      WAYBILLNOMASTER, WAYBILLNOSECONDARY, CWAYBILLNOMASTER, 
      CWAYBILLNOSECONDARY, CREATEDATE, STATUS, 
      RECEIPTION, CFLIGHTNO, CFLIGHTDATE, 
      SEQUENCENUMERIC, QUANTITY, CARGODESCRIPTION, 
      GOODSMEASURE, CUSTOMCODE, REASON, 
      CONTACTNAME, CONTACTTEL)
    values (#{id,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, 
      #{waybillnomaster,jdbcType=VARCHAR}, #{waybillnosecondary,jdbcType=VARCHAR}, #{cwaybillnomaster,jdbcType=VARCHAR}, 
      #{cwaybillnosecondary,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{receiption,jdbcType=VARCHAR}, #{cflightno,jdbcType=VARCHAR}, #{cflightdate,jdbcType=TIMESTAMP}, 
      #{sequencenumeric,jdbcType=VARCHAR}, #{quantity,jdbcType=VARCHAR}, #{cargodescription,jdbcType=VARCHAR}, 
      #{goodsmeasure,jdbcType=VARCHAR}, #{customcode,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, 
      #{contactname,jdbcType=VARCHAR}, #{contacttel,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
    insert into MANIFESTLOSTCHANGE
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="flightdate != null" >
        FLIGHTDATE,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="waybillnosecondary != null" >
        WAYBILLNOSECONDARY,
      </if>
      <if test="cwaybillnomaster != null" >
        CWAYBILLNOMASTER,
      </if>
      <if test="cwaybillnosecondary != null" >
        CWAYBILLNOSECONDARY,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="receiption != null" >
        RECEIPTION,
      </if>
      <if test="cflightno != null" >
        CFLIGHTNO,
      </if>
      <if test="cflightdate != null" >
        CFLIGHTDATE,
      </if>
      <if test="sequencenumeric != null" >
        SEQUENCENUMERIC,
      </if>
      <if test="quantity != null" >
        QUANTITY,
      </if>
      <if test="cargodescription != null" >
        CARGODESCRIPTION,
      </if>
      <if test="goodsmeasure != null" >
        GOODSMEASURE,
      </if>
      <if test="customcode != null" >
        CUSTOMCODE,
      </if>
      <if test="reason != null" >
        REASON,
      </if>
      <if test="contactname != null" >
        CONTACTNAME,
      </if>
      <if test="contacttel != null" >
        CONTACTTEL,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="waybillnomaster != null" >
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="waybillnosecondary != null" >
        #{waybillnosecondary,jdbcType=VARCHAR},
      </if>
      <if test="cwaybillnomaster != null" >
        #{cwaybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="cwaybillnosecondary != null" >
        #{cwaybillnosecondary,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="receiption != null" >
        #{receiption,jdbcType=VARCHAR},
      </if>
      <if test="cflightno != null" >
        #{cflightno,jdbcType=VARCHAR},
      </if>
      <if test="cflightdate != null" >
        #{cflightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="sequencenumeric != null" >
        #{sequencenumeric,jdbcType=VARCHAR},
      </if>
      <if test="quantity != null" >
        #{quantity,jdbcType=VARCHAR},
      </if>
      <if test="cargodescription != null" >
        #{cargodescription,jdbcType=VARCHAR},
      </if>
      <if test="goodsmeasure != null" >
        #{goodsmeasure,jdbcType=VARCHAR},
      </if>
      <if test="customcode != null" >
        #{customcode,jdbcType=VARCHAR},
      </if>
      <if test="reason != null" >
        #{reason,jdbcType=VARCHAR},
      </if>
      <if test="contactname != null" >
        #{contactname,jdbcType=VARCHAR},
      </if>
      <if test="contacttel != null" >
        #{contacttel,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>

  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" >
    UPDATE MANIFESTLOSTCHANGE
    SET
    RECEIPTION= #{receiption,jdbcType=VARCHAR},
    STATUS = #{status,jdbcType=VARCHAR}
    WHERE
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
    AND
    WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
    AND
    FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
  </update>
  <select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE" resultType="com.tianbo.analysis.model.MANIFESTLOSTCHANGE">
    SELECT ID
    FROM MANIFESTLOSTCHANGE
    WHERE
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
    AND
    WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
    <if test="flightno != null" >
      AND
      FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    </if>
    <if test="flightdate != null" >
      AND
      trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
    </if>
  </select>
</mapper>