MANIFESTLOADMapper.xml 5.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.MANIFESTLOADMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.MANIFESTLOAD" >
    <result column="ID" property="id" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="DATE" />
    <result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="RECEIPTION" property="receiption" 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.MANIFESTLOAD" >
    insert into MANIFESTLOAD (ID, CREATEDATE, FLIGHTNO, 
      WAYBILLNOMASTER, FLIGHTDATE, WAYBILLNOSECONDARY, 
      REMARK, STATUS, RECEIPTION, 
      CUSTOMCODE, REASON, CONTACTNAME, 
      CONTACTTEL)
    values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{flightno,jdbcType=VARCHAR}, 
      #{waybillnomaster,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, #{waybillnosecondary,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{receiption,jdbcType=VARCHAR}, 
      #{customcode,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR}, #{contactname,jdbcType=VARCHAR}, 
      #{contacttel,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.MANIFESTLOAD" >
    insert into MANIFESTLOAD
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="flightdate != null" >
        FLIGHTDATE,
      </if>
      <if test="waybillnosecondary != null" >
        WAYBILLNOSECONDARY,
      </if>
      <if test="remark != null" >
        REMARK,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="receiption != null" >
        RECEIPTION,
      </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="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="waybillnomaster != null" >
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="waybillnosecondary != null" >
        #{waybillnosecondary,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="receiption != null" >
        #{receiption,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.MANIFESTLOAD" >
    UPDATE MANIFESTLOAD
    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.MANIFESTLOAD" resultType="com.tianbo.analysis.model.MANIFESTLOAD">
    SELECT ID
    FROM MANIFESTLOAD
    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>