FFMInfoDao.xml 12.5 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.FFMInfoDao">
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.FFMInfo">
    <id column="AUTOID" jdbcType="VARCHAR" property="autoid" />
    <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
    <result column="FLIGHTNO" jdbcType="VARCHAR" property="flightno" />
    <result column="FLIGHTDATE" jdbcType="TIMESTAMP" property="flightdate" />
    <result column="WAYBILLNOMASTER" jdbcType="VARCHAR" property="waybillnomaster" />
    <result column="ORIGINATINGSTATION" jdbcType="VARCHAR" property="originatingstation" />
    <result column="DESTINATIONSTATION" jdbcType="VARCHAR" property="destinationstation" />
    <result column="MANIFESTTOTALPIECE" jdbcType="VARCHAR" property="manifesttotalpiece" />
    <result column="MANIFESTTOTALWEIGHT" jdbcType="VARCHAR" property="manifesttotalweight" />
    <result column="PRODUCTNAME" jdbcType="VARCHAR" property="productname" />
    <result column="SPECIALGOODSCODE" jdbcType="VARCHAR" property="specialgoodscode" />
    <result column="CUSTOMSCODE" jdbcType="VARCHAR" property="customscode" />
    <result column="CUSTOMSSTATUS" jdbcType="VARCHAR" property="customsstatus" />
    <result column="ISBATCH" jdbcType="VARCHAR" property="isbatch" />
    <result column="PALLET" jdbcType="VARCHAR" property="pallet" />
    <result column="REPORTORDER" jdbcType="VARCHAR" property="reportorder" />
    <result column="ISLAST" jdbcType="VARCHAR" property="islast" />
    <result column="ORIGINATINGSTATION_BILL" jdbcType="VARCHAR" property="originatingstationBill" />
    <result column="DESTINATIONSTATION_BILL" jdbcType="VARCHAR" property="destinationstationBill" />
    <result column="TOTALPIECE" jdbcType="VARCHAR" property="totalpiece" />
    <result column="DEALSTATUS" jdbcType="VARCHAR" property="dealstatus" />
  </resultMap>
  <sql id="Base_Column_List">
    AUTOID, CREATEDATE, FLIGHTNO, FLIGHTDATE, WAYBILLNOMASTER, ORIGINATINGSTATION, DESTINATIONSTATION,
    MANIFESTTOTALPIECE, MANIFESTTOTALWEIGHT, PRODUCTNAME, SPECIALGOODSCODE, CUSTOMSCODE,
    CUSTOMSSTATUS, ISBATCH, PALLET, REPORTORDER, ISLAST, ORIGINATINGSTATION_BILL, DESTINATIONSTATION_BILL,
    TOTALPIECE, DEALSTATUS
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from FFM_INFO
    where AUTOID = #{autoid,jdbcType=VARCHAR}
  </select>
  <select id="unresolvedFlightnoList" parameterType="java.lang.String" resultMap="BaseResultMap">
    select distinct flightno,flightdate from FFM_INFO where dealstatus = '0'
  </select>
  <select id="unresolvedFFMList" parameterType="com.tianbo.analysis.model.FFMInfo" resultMap="BaseResultMap">
    SELECT
    <include refid="Base_Column_List" />
    FROM FFM_INFO WHERE
    FLIGHTNO = #{flightno,jdbcType=VARCHAR} AND FLIGHTDATE = #{flightdate,jdbcType=TIMESTAMP}
    AND dealstatus = '0' order by REPORTORDER asc
  </select>
  <delete id="delFlightno" parameterType="com.tianbo.analysis.model.FFMInfo">
    DELETE FROM FFM_INFO where dealstatus = '0'
    <if test="autoid != null">
    and AUTOID = #{autoid,jdbcType=VARCHAR}
    </if>
    <if test="flightno != null">
    and FLIGHTNO = #{flightno,jdbcType=VARCHAR}
    </if>
    <if test="flightdate != null">
    and  FLIGHTDATE = #{flightdate,jdbcType=TIMESTAMP}
    </if>
  </delete>
  <delete id="delByAutoidList" parameterType="java.util.List">
    DELETE FROM FFM_INFO where AUTOID in
    <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
      #{item}
    </foreach>
  </delete>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from FFM_INFO
    where AUTOID = #{autoid,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" keyColumn="AUTOID" keyProperty="autoid" parameterType="com.tianbo.analysis.model.FFMInfo" useGeneratedKeys="true">
    insert into FFM_INFO (CREATEDATE, FLIGHTNO, FLIGHTDATE,
      WAYBILLNOMASTER, ORIGINATINGSTATION, DESTINATIONSTATION,
      MANIFESTTOTALPIECE, MANIFESTTOTALWEIGHT,
      PRODUCTNAME, SPECIALGOODSCODE, CUSTOMSCODE,
      CUSTOMSSTATUS, ISBATCH, PALLET,
      REPORTORDER, ISLAST, ORIGINATINGSTATION_BILL,
      DESTINATIONSTATION_BILL, TOTALPIECE, DEALSTATUS
      )
    values (#{createdate,jdbcType=TIMESTAMP}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=TIMESTAMP},
      #{waybillnomaster,jdbcType=VARCHAR}, #{originatingstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR},
      #{manifesttotalpiece,jdbcType=VARCHAR}, #{manifesttotalweight,jdbcType=VARCHAR},
      #{productname,jdbcType=VARCHAR}, #{specialgoodscode,jdbcType=VARCHAR}, #{customscode,jdbcType=VARCHAR},
      #{customsstatus,jdbcType=VARCHAR}, #{isbatch,jdbcType=VARCHAR}, #{pallet,jdbcType=VARCHAR},
      #{reportorder,jdbcType=VARCHAR}, #{islast,jdbcType=VARCHAR}, #{originatingstationBill,jdbcType=VARCHAR},
      #{destinationstationBill,jdbcType=VARCHAR}, #{totalpiece,jdbcType=VARCHAR}, #{dealstatus,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" keyColumn="AUTOID" keyProperty="autoid" parameterType="com.tianbo.analysis.model.FFMInfo" useGeneratedKeys="true">
    insert into FFM_INFO
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="autoid != null">
        AUTOID,
      </if>
      <if test="createdate != null">
        CREATEDATE,
      </if>
      <if test="flightno != null">
        FLIGHTNO,
      </if>
      <if test="flightdate != null">
        FLIGHTDATE,
      </if>
      <if test="waybillnomaster != null">
        WAYBILLNOMASTER,
      </if>
      <if test="originatingstation != null">
        ORIGINATINGSTATION,
      </if>
      <if test="destinationstation != null">
        DESTINATIONSTATION,
      </if>
      <if test="manifesttotalpiece != null">
        MANIFESTTOTALPIECE,
      </if>
      <if test="manifesttotalweight != null">
        MANIFESTTOTALWEIGHT,
      </if>
      <if test="productname != null">
        PRODUCTNAME,
      </if>
      <if test="specialgoodscode != null">
        SPECIALGOODSCODE,
      </if>
      <if test="customscode != null">
        CUSTOMSCODE,
      </if>
      <if test="customsstatus != null">
        CUSTOMSSTATUS,
      </if>
      <if test="isbatch != null">
        ISBATCH,
      </if>
      <if test="pallet != null">
        PALLET,
      </if>
      <if test="reportorder != null">
        REPORTORDER,
      </if>
      <if test="islast != null">
        ISLAST,
      </if>
      <if test="originatingstationBill != null">
        ORIGINATINGSTATION_BILL,
      </if>
      <if test="destinationstationBill != null">
        DESTINATIONSTATION_BILL,
      </if>
      <if test="totalpiece != null">
        TOTALPIECE,
      </if>
      <if test="dealstatus != null">
        DEALSTATUS,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="autoid != null">
        #{autoid,jdbcType=VARCHAR},
      </if>
      <if test="createdate != null">
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="flightno != null">
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null">
        #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="waybillnomaster != null">
        #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="originatingstation != null">
        #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null">
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalpiece != null">
        #{manifesttotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalweight != null">
        #{manifesttotalweight,jdbcType=VARCHAR},
      </if>
      <if test="productname != null">
        #{productname,jdbcType=VARCHAR},
      </if>
      <if test="specialgoodscode != null">
        #{specialgoodscode,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null">
        #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="customsstatus != null">
        #{customsstatus,jdbcType=VARCHAR},
      </if>
      <if test="isbatch != null">
        #{isbatch,jdbcType=VARCHAR},
      </if>
      <if test="pallet != null">
        #{pallet,jdbcType=VARCHAR},
      </if>
      <if test="reportorder != null">
        #{reportorder,jdbcType=VARCHAR},
      </if>
      <if test="islast != null">
        #{islast,jdbcType=VARCHAR},
      </if>
      <if test="originatingstationBill != null">
        #{originatingstationBill,jdbcType=VARCHAR},
      </if>
      <if test="destinationstationBill != null">
        #{destinationstationBill,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null">
        #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="dealstatus != null">
        #{dealstatus,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.analysis.model.FFMInfo">
    update FFM_INFO
    <set>
      <if test="createdate != null">
        CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="flightno != null">
        FLIGHTNO = #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null">
        FLIGHTDATE = #{flightdate,jdbcType=TIMESTAMP},
      </if>
      <if test="waybillnomaster != null">
        WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR},
      </if>
      <if test="originatingstation != null">
        ORIGINATINGSTATION = #{originatingstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null">
        DESTINATIONSTATION = #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalpiece != null">
        MANIFESTTOTALPIECE = #{manifesttotalpiece,jdbcType=VARCHAR},
      </if>
      <if test="manifesttotalweight != null">
        MANIFESTTOTALWEIGHT = #{manifesttotalweight,jdbcType=VARCHAR},
      </if>
      <if test="productname != null">
        PRODUCTNAME = #{productname,jdbcType=VARCHAR},
      </if>
      <if test="specialgoodscode != null">
        SPECIALGOODSCODE = #{specialgoodscode,jdbcType=VARCHAR},
      </if>
      <if test="customscode != null">
        CUSTOMSCODE = #{customscode,jdbcType=VARCHAR},
      </if>
      <if test="customsstatus != null">
        CUSTOMSSTATUS = #{customsstatus,jdbcType=VARCHAR},
      </if>
      <if test="isbatch != null">
        ISBATCH = #{isbatch,jdbcType=VARCHAR},
      </if>
      <if test="pallet != null">
        PALLET = #{pallet,jdbcType=VARCHAR},
      </if>
      <if test="reportorder != null">
        REPORTORDER = #{reportorder,jdbcType=VARCHAR},
      </if>
      <if test="islast != null">
        ISLAST = #{islast,jdbcType=VARCHAR},
      </if>
      <if test="originatingstationBill != null">
        ORIGINATINGSTATION_BILL = #{originatingstationBill,jdbcType=VARCHAR},
      </if>
      <if test="destinationstationBill != null">
        DESTINATIONSTATION_BILL = #{destinationstationBill,jdbcType=VARCHAR},
      </if>
      <if test="totalpiece != null">
        TOTALPIECE = #{totalpiece,jdbcType=VARCHAR},
      </if>
      <if test="dealstatus != null">
        DEALSTATUS = #{dealstatus,jdbcType=VARCHAR},
      </if>
    </set>
    where AUTOID = #{autoid,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.tianbo.analysis.model.FFMInfo">
    update FFM_INFO
    set CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
      FLIGHTNO = #{flightno,jdbcType=VARCHAR},
      FLIGHTDATE = #{flightdate,jdbcType=TIMESTAMP},
      WAYBILLNOMASTER = #{waybillnomaster,jdbcType=VARCHAR},
      ORIGINATINGSTATION = #{originatingstation,jdbcType=VARCHAR},
      DESTINATIONSTATION = #{destinationstation,jdbcType=VARCHAR},
      MANIFESTTOTALPIECE = #{manifesttotalpiece,jdbcType=VARCHAR},
      MANIFESTTOTALWEIGHT = #{manifesttotalweight,jdbcType=VARCHAR},
      PRODUCTNAME = #{productname,jdbcType=VARCHAR},
      SPECIALGOODSCODE = #{specialgoodscode,jdbcType=VARCHAR},
      CUSTOMSCODE = #{customscode,jdbcType=VARCHAR},
      CUSTOMSSTATUS = #{customsstatus,jdbcType=VARCHAR},
      ISBATCH = #{isbatch,jdbcType=VARCHAR},
      PALLET = #{pallet,jdbcType=VARCHAR},
      REPORTORDER = #{reportorder,jdbcType=VARCHAR},
      ISLAST = #{islast,jdbcType=VARCHAR},
      ORIGINATINGSTATION_BILL = #{originatingstationBill,jdbcType=VARCHAR},
      DESTINATIONSTATION_BILL = #{destinationstationBill,jdbcType=VARCHAR},
      TOTALPIECE = #{totalpiece,jdbcType=VARCHAR},
      DEALSTATUS = #{dealstatus,jdbcType=VARCHAR}
    where AUTOID = #{autoid,jdbcType=VARCHAR}
  </update>
</mapper>