TALLYMASTERMapper.xml 10.2 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.TALLYMASTERMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.TALLYMASTER" >
    <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="TCD_NAME" property="tcdName" jdbcType="VARCHAR" />
    <result column="TCD_TYPECODE" property="tcdTypecode" jdbcType="VARCHAR" />
    <result column="TALLTYPE" property="talltype" jdbcType="VARCHAR" />
    <result column="FLIGHTNO" property="flightno" jdbcType="VARCHAR" />
    <result column="FLIGHTDATE" property="flightdate" jdbcType="TIMESTAMP" />
    <result column="SEGMENT" property="segment" jdbcType="VARCHAR" />
    <result column="ORIGINATINGSTATION" property="originatingstation" jdbcType="VARCHAR" />
    <result column="O_NAME" property="oName" jdbcType="VARCHAR" />
    <result column="DESTINATIONSTATION" property="destinationstation" jdbcType="VARCHAR" />
    <result column="FD_NAME" property="fdName" jdbcType="VARCHAR" />
    <result column="TOTALWEIGHT" property="totalweight" jdbcType="VARCHAR" />
    <result column="TOTALGROSSWEIGHTMEASUREUC" property="totalgrossweightmeasureuc" jdbcType="VARCHAR" />
    <result column="TOTALPIECE" property="totalpiece" jdbcType="VARCHAR" />
    <result column="TALLYTOTALPIECE" property="tallytotalpiece" jdbcType="VARCHAR" />
    <result column="TALLYTOTALWEIGHT" property="tallytotalweight" jdbcType="VARCHAR" />
    <result column="GROSSWEIGHTMEASUREUC" property="grossweightmeasureuc" jdbcType="VARCHAR" />
    <result column="LOADSTARTTIME" property="loadstarttime" jdbcType="TIMESTAMP" />
    <result column="LOADENDTIME" property="loadendtime" jdbcType="TIMESTAMP" />
    <result column="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="CUSTOMSCODE" property="customscode" jdbcType="VARCHAR" />
    <result column="PRODUCTNAME" property="productname" jdbcType="VARCHAR" />
    <result column="DISCHARGEDATE" property="dischargedate" jdbcType="TIMESTAMP" />
    <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
    <result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="DEAL_FLAG" property="dealFlag" jdbcType="VARCHAR" />
    <result column="BILL_TALLY_FLAG" property="billTallyFlag" jdbcType="VARCHAR" />
    <result column="DEAL_TIME" property="dealTime" jdbcType="TIMESTAMP" />
    <result column="TRANSPORTSPLITDESCRIPTION" property="transportsplitdescription" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.TALLYMASTER" >
    insert into TALLYMASTER (AUTOID, WAYBILLNOMASTER, TCD_NAME, 
      TCD_TYPECODE, TALLTYPE, FLIGHTNO, 
      FLIGHTDATE, SEGMENT, ORIGINATINGSTATION, 
      O_NAME, DESTINATIONSTATION, FD_NAME, 
      TOTALWEIGHT, TOTALGROSSWEIGHTMEASUREUC, 
      TOTALPIECE, TALLYTOTALPIECE, TALLYTOTALWEIGHT, 
      GROSSWEIGHTMEASUREUC, LOADSTARTTIME, 
      LOADENDTIME, STATUS, CUSTOMSCODE, 
      PRODUCTNAME, DISCHARGEDATE, RECEIPTINFORMATION, 
      CREATEDATE, DEAL_FLAG, BILL_TALLY_FLAG, 
      DEAL_TIME, TRANSPORTSPLITDESCRIPTION)
    values (#{autoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{tcdName,jdbcType=VARCHAR}, 
      #{tcdTypecode,jdbcType=VARCHAR}, #{talltype,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, 
      #{flightdate,jdbcType=TIMESTAMP}, #{segment,jdbcType=VARCHAR}, #{originatingstation,jdbcType=VARCHAR}, 
      #{oName,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, #{fdName,jdbcType=VARCHAR}, 
      #{totalweight,jdbcType=VARCHAR}, #{totalgrossweightmeasureuc,jdbcType=VARCHAR}, 
      #{totalpiece,jdbcType=VARCHAR}, #{tallytotalpiece,jdbcType=VARCHAR}, #{tallytotalweight,jdbcType=VARCHAR}, 
      #{grossweightmeasureuc,jdbcType=VARCHAR}, #{loadstarttime,jdbcType=TIMESTAMP}, 
      #{loadendtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, #{customscode,jdbcType=VARCHAR}, 
      #{productname,jdbcType=VARCHAR}, #{dischargedate,jdbcType=TIMESTAMP}, #{receiptinformation,jdbcType=VARCHAR}, 
      #{createdate,jdbcType=TIMESTAMP}, #{dealFlag,jdbcType=VARCHAR}, #{billTallyFlag,jdbcType=VARCHAR}, 
      #{dealTime,jdbcType=TIMESTAMP}, #{transportsplitdescription,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.TALLYMASTER" >
    insert into TALLYMASTER
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        AUTOID,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="tcdName != null" >
        TCD_NAME,
      </if>
      <if test="tcdTypecode != null" >
        TCD_TYPECODE,
      </if>
      <if test="talltype != null" >
        TALLTYPE,
      </if>
      <if test="flightno != null" >
        FLIGHTNO,
      </if>
      <if test="flightdate != null" >
        FLIGHTDATE,
      </if>
      <if test="segment != null" >
        SEGMENT,
      </if>
      <if test="originatingstation != null" >
        ORIGINATINGSTATION,
      </if>
      <if test="oName != null" >
        O_NAME,
      </if>
      <if test="destinationstation != null" >
        DESTINATIONSTATION,
      </if>
      <if test="fdName != null" >
        FD_NAME,
      </if>
      <if test="totalweight != null" >
        TOTALWEIGHT,
      </if>
      <if test="totalgrossweightmeasureuc != null" >
        TOTALGROSSWEIGHTMEASUREUC,
      </if>
      <if test="totalpiece != null" >
        TOTALPIECE,
      </if>
      <if test="tallytotalpiece != null" >
        TALLYTOTALPIECE,
      </if>
      <if test="tallytotalweight != null" >
        TALLYTOTALWEIGHT,
      </if>
      <if test="grossweightmeasureuc != null" >
        GROSSWEIGHTMEASUREUC,
      </if>
      <if test="loadstarttime != null" >
        LOADSTARTTIME,
      </if>
      <if test="loadendtime != null" >
        LOADENDTIME,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="customscode != null" >
        CUSTOMSCODE,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="dischargedate != null" >
        DISCHARGEDATE,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="dealFlag != null" >
        DEAL_FLAG,
      </if>
      <if test="billTallyFlag != null" >
        BILL_TALLY_FLAG,
      </if>
      <if test="dealTime != null" >
        DEAL_TIME,
      </if>
      <if test="transportsplitdescription != null" >
        TRANSPORTSPLITDESCRIPTION,
      </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="tcdName != null" >
        #{tcdName,jdbcType=VARCHAR},
      </if>
      <if test="tcdTypecode != null" >
        #{tcdTypecode,jdbcType=VARCHAR},
      </if>
      <if test="talltype != null" >
        #{talltype,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="segment != null" >
        #{segment,jdbcType=VARCHAR},
      </if>
      <if test="originatingstation != null" >
        #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="oName != null" >
        #{oName,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null" >
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="fdName != null" >
        #{fdName,jdbcType=VARCHAR},
      </if>
      <if test="totalweight != null" >
        #{totalweight,jdbcType=VARCHAR},
      </if>
      <if test="totalgrossweightmeasureuc != null" >
        #{totalgrossweightmeasureuc,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null" >
        #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="tallytotalpiece != null" >
        #{tallytotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="tallytotalweight != null" >
        #{tallytotalweight,jdbcType=VARCHAR},
      </if>
      <if test="grossweightmeasureuc != null" >
        #{grossweightmeasureuc,jdbcType=VARCHAR},
      </if>
      <if test="loadstarttime != null" >
        #{loadstarttime,jdbcType=TIMESTAMP},
      </if>
      <if test="loadendtime != null" >
        #{loadendtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null" >
        #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="productname != null" >
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="dischargedate != null" >
        #{dischargedate,jdbcType=TIMESTAMP},
      </if>
      <if test="receiptinformation != null" >
        #{receiptinformation,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="dealFlag != null" >
        #{dealFlag,jdbcType=VARCHAR},
      </if>
      <if test="billTallyFlag != null" >
        #{billTallyFlag,jdbcType=VARCHAR},
      </if>
      <if test="dealTime != null" >
        #{dealTime,jdbcType=TIMESTAMP},
      </if>
      <if test="transportsplitdescription != null" >
        #{transportsplitdescription,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>



  <update id="updateRECEIPTION" parameterType="com.tianbo.analysis.model.TALLYMASTER" >
    UPDATE TALLYMASTER
    SET RECEIPTINFORMATION= #{receiptinformation,jdbcType=VARCHAR}
    WHERE WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR}
    AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
  </update>

  <select id="selectAutoIdByawbAawbH" parameterType="com.tianbo.analysis.model.TALLYMASTER" resultType="com.tianbo.analysis.model.TALLYMASTER">
    SELECT AUTOID
    FROM TALLYMASTER
    WHERE
    WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR} AND WAYBILLNOSECONDARY = #{waybillnosecondary,jdbcType=VARCHAR}
  </select>

</mapper>