PREPAREMASTERMapper.xml 12.9 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.PREPAREMASTERMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.PREPAREMASTER" >
    <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="DATE" />
    <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />
    <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />
    <result column="PREPARETOTALPIECE" property="preparetotalpiece" jdbcType="VARCHAR" />
    <result column="PREPARETOTALWEIGHT" property="preparetotalweight" jdbcType="VARCHAR" />
    <result column="STOWAGEDATE" property="stowagedate" jdbcType="TIMESTAMP" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="CARRIER" property="carrier" jdbcType="VARCHAR" />
    <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR" />
    <result column="PAYMODE" property="paymode" jdbcType="VARCHAR" />
    <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />
    <result column="AGENTCODE" property="agentcode" jdbcType="VARCHAR" />
    <result column="AGENTNAME" property="agentname" jdbcType="VARCHAR" />
    <result column="SHIPPERNAME" property="shippername" jdbcType="VARCHAR" />
    <result column="SHIPPERCITY" property="shippercity" jdbcType="VARCHAR" />
    <result column="SHIPPERADDRESS" property="shipperaddress" jdbcType="VARCHAR" />
    <result column="CONSIGNEENAME" property="consigneename" jdbcType="VARCHAR" />
    <result column="CONSIGNEECITY" property="consigneecity" jdbcType="VARCHAR" />
    <result column="CONSIGNEEADDRESS" property="consigneeaddress" jdbcType="VARCHAR" />
    <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
    <result column="SHIPPER_CODE" property="shipperCode" jdbcType="VARCHAR" />
    <result column="SHIPPER_COUNTRYCODE" property="shipperCountrycode" jdbcType="VARCHAR" />
    <result column="SHIPPER_PHONE" property="shipperPhone" jdbcType="VARCHAR" />
    <result column="SHIPPER_FAX" property="shipperFax" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_CODE" property="consigneeCode" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_COUNTRYCODE" property="consigneeCountrycode" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_FAX" property="consigneeFax" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR" />
    <result column="SHIPPER_AEO" property="shipperAeo" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_AEO" property="consigneeAeo" jdbcType="VARCHAR" />
    <result column="UNLOADINGSTATION" property="unloadingstation" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.PREPAREMASTER" >
    insert into PREPAREMASTER (AUTOID, FLIGHTNO, FLIGHTDATE, 
      ORIGINATINGSTATION, DESTINATIONSTATION, 
      WAYBILLNOMASTER, TOTALWEIGHT, TOTALPIECE, 
      PREPARETOTALPIECE, PREPARETOTALWEIGHT, 
      STOWAGEDATE, STATUS, CARRIER, 
      CUSTOMSSTATUS, PAYMODE, CUSTOMSCODE, 
      AGENTCODE, AGENTNAME, SHIPPERNAME, 
      SHIPPERCITY, SHIPPERADDRESS, CONSIGNEENAME, 
      CONSIGNEECITY, CONSIGNEEADDRESS, RECEIPTINFORMATION, 
      CREATEDATE, PRODUCTNAME, SHIPPER_CODE, 
      SHIPPER_COUNTRYCODE, SHIPPER_PHONE, SHIPPER_FAX, 
      CONSIGNEE_CODE, CONSIGNEE_COUNTRYCODE, CONSIGNEE_FAX, 
      CONSIGNEE_PHONE, SHIPPER_AEO, CONSIGNEE_AEO, 
      UNLOADINGSTATION)
    values (#{autoid,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP}, 
      #{originatingstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, 
      #{waybillnomaster,jdbcType=VARCHAR}, #{totalweight,jdbcType=VARCHAR}, #{totalpiece,jdbcType=VARCHAR}, 
      #{preparetotalpiece,jdbcType=VARCHAR}, #{preparetotalweight,jdbcType=VARCHAR}, 
      #{stowagedate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, #{carrier,jdbcType=VARCHAR}, 
      #{customsstatus,jdbcType=VARCHAR}, #{paymode,jdbcType=VARCHAR}, #{customscode,jdbcType=VARCHAR}, 
      #{agentcode,jdbcType=VARCHAR}, #{agentname,jdbcType=VARCHAR}, #{shippername,jdbcType=VARCHAR}, 
      #{shippercity,jdbcType=VARCHAR}, #{shipperaddress,jdbcType=VARCHAR}, #{consigneename,jdbcType=VARCHAR}, 
      #{consigneecity,jdbcType=VARCHAR}, #{consigneeaddress,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=TIMESTAMP}, #{productname,jdbcType=VARCHAR}, #{shipperCode,jdbcType=VARCHAR}, 
      #{shipperCountrycode,jdbcType=VARCHAR}, #{shipperPhone,jdbcType=VARCHAR}, #{shipperFax,jdbcType=VARCHAR}, 
      #{consigneeCode,jdbcType=VARCHAR}, #{consigneeCountrycode,jdbcType=VARCHAR}, #{consigneeFax,jdbcType=VARCHAR}, 
      #{consigneePhone,jdbcType=VARCHAR}, #{shipperAeo,jdbcType=VARCHAR}, #{consigneeAeo,jdbcType=VARCHAR}, 
      #{unloadingstation,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.PREPAREMASTER" >
    insert into PREPAREMASTER
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        AUTOID,
      </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="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="totalweight != null" >
        TOTALWEIGHT,
      </if>
      <if test="totalpiece != null" >
        TOTALPIECE,
      </if>
      <if test="preparetotalpiece != null" >
        PREPARETOTALPIECE,
      </if>
      <if test="preparetotalweight != null" >
        PREPARETOTALWEIGHT,
      </if>
      <if test="stowagedate != null" >
        STOWAGEDATE,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="carrier != null" >
        CARRIER,
      </if>
      <if test="customsstatus != null" >
        CUSTOMSSTATUS,
      </if>
      <if test="paymode != null" >
        PAYMODE,
      </if>
      <if test="customscode != null" >
        CUSTOMSCODE,
      </if>
      <if test="agentcode != null" >
        AGENTCODE,
      </if>
      <if test="agentname != null" >
        AGENTNAME,
      </if>
      <if test="shippername != null" >
        SHIPPERNAME,
      </if>
      <if test="shippercity != null" >
        SHIPPERCITY,
      </if>
      <if test="shipperaddress != null" >
        SHIPPERADDRESS,
      </if>
      <if test="consigneename != null" >
        CONSIGNEENAME,
      </if>
      <if test="consigneecity != null" >
        CONSIGNEECITY,
      </if>
      <if test="consigneeaddress != null" >
        CONSIGNEEADDRESS,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="shipperCode != null" >
        SHIPPER_CODE,
      </if>
      <if test="shipperCountrycode != null" >
        SHIPPER_COUNTRYCODE,
      </if>
      <if test="shipperPhone != null" >
        SHIPPER_PHONE,
      </if>
      <if test="shipperFax != null" >
        SHIPPER_FAX,
      </if>
      <if test="consigneeCode != null" >
        CONSIGNEE_CODE,
      </if>
      <if test="consigneeCountrycode != null" >
        CONSIGNEE_COUNTRYCODE,
      </if>
      <if test="consigneeFax != null" >
        CONSIGNEE_FAX,
      </if>
      <if test="consigneePhone != null" >
        CONSIGNEE_PHONE,
      </if>
      <if test="shipperAeo != null" >
        SHIPPER_AEO,
      </if>
      <if test="consigneeAeo != null" >
        CONSIGNEE_AEO,
      </if>
      <if test="unloadingstation != null" >
        UNLOADINGSTATION,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        #{autoid,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="waybillnomaster != null" >
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="totalweight != null" >
        #{totalweight,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null" >
        #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="preparetotalpiece != null" >
        #{preparetotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="preparetotalweight != null" >
        #{preparetotalweight,jdbcType=VARCHAR},
      </if>
      <if test="stowagedate != null" >
        #{stowagedate,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="carrier != null" >
        #{carrier,jdbcType=VARCHAR},
      </if>
      <if test="customsstatus != null" >
        #{customsstatus,jdbcType=VARCHAR},
      </if>
      <if test="paymode != null" >
        #{paymode,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null" >
        #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="agentcode != null" >
        #{agentcode,jdbcType=VARCHAR},
      </if>
      <if test="agentname != null" >
        #{agentname,jdbcType=VARCHAR},
      </if>
      <if test="shippername != null" >
        #{shippername,jdbcType=VARCHAR},
      </if>
      <if test="shippercity != null" >
        #{shippercity,jdbcType=VARCHAR},
      </if>
      <if test="shipperaddress != null" >
        #{shipperaddress,jdbcType=VARCHAR},
      </if>
      <if test="consigneename != null" >
        #{consigneename,jdbcType=VARCHAR},
      </if>
      <if test="consigneecity != null" >
        #{consigneecity,jdbcType=VARCHAR},
      </if>
      <if test="consigneeaddress != null" >
        #{consigneeaddress,jdbcType=VARCHAR},
      </if>
      <if test="receiptinformation != null" >
        #{receiptinformation,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="productname != null" >
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="shipperCode != null" >
        #{shipperCode,jdbcType=VARCHAR},
      </if>
      <if test="shipperCountrycode != null" >
        #{shipperCountrycode,jdbcType=VARCHAR},
      </if>
      <if test="shipperPhone != null" >
        #{shipperPhone,jdbcType=VARCHAR},
      </if>
      <if test="shipperFax != null" >
        #{shipperFax,jdbcType=VARCHAR},
      </if>
      <if test="consigneeCode != null" >
        #{consigneeCode,jdbcType=VARCHAR},
      </if>
      <if test="consigneeCountrycode != null" >
        #{consigneeCountrycode,jdbcType=VARCHAR},
      </if>
      <if test="consigneeFax != null" >
        #{consigneeFax,jdbcType=VARCHAR},
      </if>
      <if test="consigneePhone != null" >
        #{consigneePhone,jdbcType=VARCHAR},
      </if>
      <if test="shipperAeo != null" >
        #{shipperAeo,jdbcType=VARCHAR},
      </if>
      <if test="consigneeAeo != null" >
        #{consigneeAeo,jdbcType=VARCHAR},
      </if>
      <if test="unloadingstation != null" >
        #{unloadingstation,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.PREPAREMASTER" >
    UPDATE PREPAREMASTER
    SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
    STATUS = #{status,jdbcType=VARCHAR }
    WHERE
    FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE }
    AND
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
    AND
    CARRIER = #{carrier,jdbcType=VARCHAR}
  </update>

  <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.PREPAREMASTER" resultType="com.tianbo.analysis.model.PREPAREMASTER">
    SELECT AUTOID
    FROM PREPAREMASTER
    WHERE
    FLIGHTNO= #{flightno,jdbcType=VARCHAR}
    AND
    trunc(FLIGHTDATE)= #{flightdate,jdbcType=DATE }
    AND
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
    AND
    CARRIER = #{carrier,jdbcType=VARCHAR}
  </select>
</mapper>