INPORTALLOCATEMapper.xml 5.8 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.INPORTALLOCATEMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.INPORTALLOCATE" >
    <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="TALLYPIECES" property="tallypieces" jdbcType="VARCHAR" />
    <result column="TALLYWEIGHT" property="tallyweight" jdbcType="VARCHAR" />
    <result column="ALLOCATEPIECES" property="allocatepieces" jdbcType="VARCHAR" />
    <result column="ALLOCATEWEIGHT" property="allocateweight" jdbcType="VARCHAR" />
    <result column="ALLOCATEDESTINATION" property="allocatedestination" jdbcType="VARCHAR" />
    <result column="TRAILERNUMBER" property="trailernumber" 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.INPORTALLOCATE" >
    insert into INPORTALLOCATE (ID, CREATEDATE, WAYBILLNO, 
      CARRIER, FLIGHTNO, FLIGHTDATE, 
      CUSTOMOS, TALLYPIECES, TALLYWEIGHT, 
      ALLOCATEPIECES, ALLOCATEWEIGHT, ALLOCATEDESTINATION, 
      TRAILERNUMBER, STATUS, RECEIPTINFORMATION
      )
    values (#{id,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, #{waybillno,jdbcType=VARCHAR}, 
      #{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, 
      #{customos,jdbcType=VARCHAR}, #{tallypieces,jdbcType=VARCHAR}, #{tallyweight,jdbcType=VARCHAR}, 
      #{allocatepieces,jdbcType=VARCHAR}, #{allocateweight,jdbcType=VARCHAR}, #{allocatedestination,jdbcType=VARCHAR}, 
      #{trailernumber,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.INPORTALLOCATE" >
    insert into INPORTALLOCATE
    <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="tallypieces != null" >
        TALLYPIECES,
      </if>
      <if test="tallyweight != null" >
        TALLYWEIGHT,
      </if>
      <if test="allocatepieces != null" >
        ALLOCATEPIECES,
      </if>
      <if test="allocateweight != null" >
        ALLOCATEWEIGHT,
      </if>
      <if test="allocatedestination != null" >
        ALLOCATEDESTINATION,
      </if>
      <if test="trailernumber != null" >
        TRAILERNUMBER,
      </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="tallypieces != null" >
        #{tallypieces,jdbcType=VARCHAR},
      </if>
      <if test="tallyweight != null" >
        #{tallyweight,jdbcType=VARCHAR},
      </if>
      <if test="allocatepieces != null" >
        #{allocatepieces,jdbcType=VARCHAR},
      </if>
      <if test="allocateweight != null" >
        #{allocateweight,jdbcType=VARCHAR},
      </if>
      <if test="allocatedestination != null" >
        #{allocatedestination,jdbcType=VARCHAR},
      </if>
      <if test="trailernumber != null" >
        #{trailernumber,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.INPORTALLOCATE" >
    UPDATE INPORTALLOCATE
    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.INPORTALLOCATE" resultType="com.tianbo.analysis.model.INPORTALLOCATE">
    SELECT ID
    FROM INPORTALLOCATE
    WHERE
    FLIGHTNO= #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE}
    AND
    WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
  </select>
</mapper>