ORIGINMANIFESTMASTERMapper.xml 14.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.ORIGINMANIFESTMASTERMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
    <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="SEGMENT" property="segment" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />
    <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />
    <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />
    <result column="MANIFESTTOTALPIECE" property="manifesttotalpiece" jdbcType="VARCHAR" />
    <result column="MANIFESTTOTALWEIGHT" property="manifesttotalweight" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
    <result column="CUSTOMSSTATUS" property="customsstatus" jdbcType="VARCHAR" />
    <result column="CARRIER1" property="carrier1" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION1" property="arrivalstation1" jdbcType="VARCHAR" />
    <result column="CARRIER2" property="carrier2" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION2" property="arrivalstation2" jdbcType="VARCHAR" />
    <result column="CARRIER3" property="carrier3" jdbcType="VARCHAR" />
    <result column="ARRIVALSTATION3" property="arrivalstation3" jdbcType="VARCHAR" />
    <result column="PAYMODE" property="paymode" jdbcType="VARCHAR" />
    <result column="SPECIALGOODSCODE" property="specialgoodscode" jdbcType="VARCHAR" />
    <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />
    <result column="SHIPPERNAME" property="shippername" jdbcType="VARCHAR" />
    <result column="SHIPPERADDRESS" property="shipperaddress" jdbcType="VARCHAR" />
    <result column="CONSIGNEENAME" property="consigneename" 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="FLIGHT_DATE" property="flightDate" jdbcType="TIMESTAMP" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="ISBATCH" property="isbatch" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATION_BILL" property="originatingstationBill" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION_BILL" property="destinationstationBill" jdbcType="VARCHAR" />
    <result column="REPORTORDER" property="reportorder" jdbcType="VARCHAR" />
    <result column="ISLAST" property="islast" 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="SPECIFIC_CONSIGNEENAME" property="specificConsigneename" jdbcType="VARCHAR" />
    <result column="SPECIFIC_CONSIGNEE_PHONE" property="specificConsigneePhone" jdbcType="VARCHAR" />
    <result column="CONSIGNEE_PHONE" property="consigneePhone" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
    insert into ORIGINMANIFESTMASTER (AUTOID, WAYBILLNOMASTER, SEGMENT, 
      ORIGINATINGSTATION, DESTINATIONSTATION, 
      TOTALWEIGHT, TOTALPIECE, MANIFESTTOTALPIECE, 
      MANIFESTTOTALWEIGHT, FLIGHTNO, PRODUCTNAME, 
      CUSTOMSSTATUS, CARRIER1, ARRIVALSTATION1, 
      CARRIER2, ARRIVALSTATION2, CARRIER3, 
      ARRIVALSTATION3, PAYMODE, SPECIALGOODSCODE, 
      CUSTOMSCODE, SHIPPERNAME, SHIPPERADDRESS, 
      CONSIGNEENAME, CONSIGNEEADDRESS, RECEIPTINFORMATION, 
      CREATEDATE, FLIGHT_DATE, STATUS, 
      ISBATCH, ORIGINATINGSTATION_BILL, DESTINATIONSTATION_BILL, 
      REPORTORDER, ISLAST, SHIPPER_CODE, 
      SHIPPER_COUNTRYCODE, SHIPPER_PHONE, SHIPPER_FAX, 
      CONSIGNEE_CODE, CONSIGNEE_COUNTRYCODE, CONSIGNEE_FAX, 
      SPECIFIC_CONSIGNEENAME, SPECIFIC_CONSIGNEE_PHONE, 
      CONSIGNEE_PHONE)
    values (#{autoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{segment,jdbcType=VARCHAR}, 
      #{originatingstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, 
      #{totalweight,jdbcType=VARCHAR}, #{totalpiece,jdbcType=VARCHAR}, #{manifesttotalpiece,jdbcType=VARCHAR}, 
      #{manifesttotalweight,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, 
      #{customsstatus,jdbcType=VARCHAR}, #{carrier1,jdbcType=VARCHAR}, #{arrivalstation1,jdbcType=VARCHAR}, 
      #{carrier2,jdbcType=VARCHAR}, #{arrivalstation2,jdbcType=VARCHAR}, #{carrier3,jdbcType=VARCHAR}, 
      #{arrivalstation3,jdbcType=VARCHAR}, #{paymode,jdbcType=VARCHAR}, #{specialgoodscode,jdbcType=VARCHAR}, 
      #{customscode,jdbcType=VARCHAR}, #{shippername,jdbcType=VARCHAR}, #{shipperaddress,jdbcType=VARCHAR}, 
      #{consigneename,jdbcType=VARCHAR}, #{consigneeaddress,jdbcType=VARCHAR}, #{receiptinformation,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=TIMESTAMP}, #{flightDate,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{isbatch,jdbcType=VARCHAR}, #{originatingstationBill,jdbcType=VARCHAR}, #{destinationstationBill,jdbcType=VARCHAR}, 
      #{reportorder,jdbcType=VARCHAR}, #{islast,jdbcType=VARCHAR}, #{shipperCode,jdbcType=VARCHAR}, 
      #{shipperCountrycode,jdbcType=VARCHAR}, #{shipperPhone,jdbcType=VARCHAR}, #{shipperFax,jdbcType=VARCHAR}, 
      #{consigneeCode,jdbcType=VARCHAR}, #{consigneeCountrycode,jdbcType=VARCHAR}, #{consigneeFax,jdbcType=VARCHAR}, 
      #{specificConsigneename,jdbcType=VARCHAR}, #{specificConsigneePhone,jdbcType=VARCHAR}, 
      #{consigneePhone,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
    insert into ORIGINMANIFESTMASTER
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        AUTOID,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="segment != null" >
        SEGMENT,
      </if>
      <if test="originatingstation != null" >
        ORIGINATINGSTATION,
      </if>
      <if test="destinationstation != null" >
        DESTINATIONSTATION,
      </if>
      <if test="totalweight != null" >
        TOTALWEIGHT,
      </if>
      <if test="totalpiece != null" >
        TOTALPIECE,
      </if>
      <if test="manifesttotalpiece != null" >
        MANIFESTTOTALPIECE,
      </if>
      <if test="manifesttotalweight != null" >
        MANIFESTTOTALWEIGHT,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="customsstatus != null" >
        CUSTOMSSTATUS,
      </if>
      <if test="carrier1 != null" >
        CARRIER1,
      </if>
      <if test="arrivalstation1 != null" >
        ARRIVALSTATION1,
      </if>
      <if test="carrier2 != null" >
        CARRIER2,
      </if>
      <if test="arrivalstation2 != null" >
        ARRIVALSTATION2,
      </if>
      <if test="carrier3 != null" >
        CARRIER3,
      </if>
      <if test="arrivalstation3 != null" >
        ARRIVALSTATION3,
      </if>
      <if test="paymode != null" >
        PAYMODE,
      </if>
      <if test="specialgoodscode != null" >
        SPECIALGOODSCODE,
      </if>
      <if test="customscode != null" >
        CUSTOMSCODE,
      </if>
      <if test="shippername != null" >
        SHIPPERNAME,
      </if>
      <if test="shipperaddress != null" >
        SHIPPERADDRESS,
      </if>
      <if test="consigneename != null" >
        CONSIGNEENAME,
      </if>
      <if test="consigneeaddress != null" >
        CONSIGNEEADDRESS,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="flightDate != null" >
        FLIGHT_DATE,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="isbatch != null" >
        ISBATCH,
      </if>
      <if test="originatingstationBill != null" >
        ORIGINATINGSTATION_BILL,
      </if>
      <if test="destinationstationBill != null" >
        DESTINATIONSTATION_BILL,
      </if>
      <if test="reportorder != null" >
        REPORTORDER,
      </if>
      <if test="islast != null" >
        ISLAST,
      </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="specificConsigneename != null" >
        SPECIFIC_CONSIGNEENAME,
      </if>
      <if test="specificConsigneePhone != null" >
        SPECIFIC_CONSIGNEE_PHONE,
      </if>
      <if test="consigneePhone != null" >
        CONSIGNEE_PHONE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        #{autoid,jdbcType=VARCHAR},
      </if>
      <if test="waybillnomaster != null" >
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="segment != null" >
        #{segment,jdbcType=VARCHAR},
      </if>
      <if test="originatingstation != null" >
        #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null" >
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="totalweight != null" >
        #{totalweight,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null" >
        #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalpiece != null" >
        #{manifesttotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalweight != null" >
        #{manifesttotalweight,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="productname != null" >
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="customsstatus != null" >
        #{customsstatus,jdbcType=VARCHAR},
      </if>
      <if test="carrier1 != null" >
        #{carrier1,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation1 != null" >
        #{arrivalstation1,jdbcType=VARCHAR},
      </if>
      <if test="carrier2 != null" >
        #{carrier2,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation2 != null" >
        #{arrivalstation2,jdbcType=VARCHAR},
      </if>
      <if test="carrier3 != null" >
        #{carrier3,jdbcType=VARCHAR},
      </if>
      <if test="arrivalstation3 != null" >
        #{arrivalstation3,jdbcType=VARCHAR},
      </if>
      <if test="paymode != null" >
        #{paymode,jdbcType=VARCHAR},
      </if>
      <if test="specialgoodscode != null" >
        #{specialgoodscode,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null" >
        #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="shippername != null" >
        #{shippername,jdbcType=VARCHAR},
      </if>
      <if test="shipperaddress != null" >
        #{shipperaddress,jdbcType=VARCHAR},
      </if>
      <if test="consigneename != null" >
        #{consigneename,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="flightDate != null" >
        #{flightDate,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="isbatch != null" >
        #{isbatch,jdbcType=VARCHAR},
      </if>
      <if test="originatingstationBill != null" >
        #{originatingstationBill,jdbcType=VARCHAR},
      </if>
      <if test="destinationstationBill != null" >
        #{destinationstationBill,jdbcType=VARCHAR},
      </if>
      <if test="reportorder != null" >
        #{reportorder,jdbcType=VARCHAR},
      </if>
      <if test="islast != null" >
        #{islast,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="specificConsigneename != null" >
        #{specificConsigneename,jdbcType=VARCHAR},
      </if>
      <if test="specificConsigneePhone != null" >
        #{specificConsigneePhone,jdbcType=VARCHAR},
      </if>
      <if test="consigneePhone != null" >
        #{consigneePhone,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>

  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" >
    UPDATE ORIGINMANIFESTMASTER
    SET
    RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR},
    STATUS=#{status,jdbcType=VARCHAR }
    WHERE FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    AND
    FLIGHT_DATE= #{flightDate,jdbcType=TIMESTAMP}
    AND
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
  </update>

  <select id="selectAutoIdByAwb" parameterType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER" resultType="com.tianbo.analysis.model.ORIGINMANIFESTMASTER">
    SELECT AUTOID
    FROM ORIGINMANIFESTMASTER
    WHERE
    FLIGHTNO= #{flightno,jdbcType=VARCHAR}
    AND
    FLIGHT_DATE= #{flightDate,jdbcType=TIMESTAMP}
    AND
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
  </select>
</mapper>