TALLYSECONDARYMapper.xml 6.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.TALLYSECONDARYMapper" >
  <resultMap id="BaseResultMap" type="com.tianbo.analysis.model.TALLYSECONDARY" >
    <result column="AUTOID" property="autoid" jdbcType="VARCHAR" />
    <result column="WAYBILLNOMASTER" property="waybillnomaster" jdbcType="VARCHAR" />
    <result column="WAYBILLNOSECONDARY" property="waybillnosecondary" jdbcType="VARCHAR" />
    <result column="WEIGHT" property="weight" jdbcType="VARCHAR" />
    <result column="PIECE" property="piece" jdbcType="VARCHAR" />
    <result column="TALLYPIECE" property="tallypiece" jdbcType="VARCHAR" />
    <result column="TALLYWEIGHT" property="tallyweight" 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="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
    <result column="LOADSTARTTIME" property="loadstarttime" jdbcType="TIMESTAMP" />
    <result column="LOADENDTIME" property="loadendtime" jdbcType="TIMESTAMP" />
    <result column="TALLYMASTERID" property="tallymasterid" jdbcType="VARCHAR" />
    <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="STATUS" property="status" jdbcType="VARCHAR" />
    <result column="RECEIPTINFORMATION" property="receiptinformation" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.tianbo.analysis.model.TALLYSECONDARY" >
    insert into TALLYSECONDARY (AUTOID, WAYBILLNOMASTER, WAYBILLNOSECONDARY, 
      WEIGHT, PIECE, TALLYPIECE, 
      TALLYWEIGHT, CUSTOMSCODE, PRODUCTNAME, 
      DISCHARGEDATE, CREATEDATE, LOADSTARTTIME, 
      LOADENDTIME, TALLYMASTERID, DEAL_FLAG, 
      BILL_TALLY_FLAG, DEAL_TIME, STATUS, 
      RECEIPTINFORMATION)
    values (#{autoid,jdbcType=VARCHAR}, #{waybillnomaster,jdbcType=VARCHAR}, #{waybillnosecondary,jdbcType=VARCHAR}, 
      #{weight,jdbcType=VARCHAR}, #{piece,jdbcType=VARCHAR}, #{tallypiece,jdbcType=VARCHAR}, 
      #{tallyweight,jdbcType=VARCHAR}, #{customscode,jdbcType=VARCHAR}, #{productname,jdbcType=VARCHAR}, 
      #{dischargedate,jdbcType=TIMESTAMP}, #{createdate,jdbcType=TIMESTAMP}, #{loadstarttime,jdbcType=TIMESTAMP}, 
      #{loadendtime,jdbcType=TIMESTAMP}, #{tallymasterid,jdbcType=VARCHAR}, #{dealFlag,jdbcType=VARCHAR}, 
      #{billTallyFlag,jdbcType=VARCHAR}, #{dealTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{receiptinformation,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.tianbo.analysis.model.TALLYSECONDARY" >
    insert into TALLYSECONDARY
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="autoid != null" >
        AUTOID,
      </if>
      <if test="waybillnomaster != null" >
        WAYBILLNOMASTER,
      </if>
      <if test="waybillnosecondary != null" >
        WAYBILLNOSECONDARY,
      </if>
      <if test="weight != null" >
        WEIGHT,
      </if>
      <if test="piece != null" >
        PIECE,
      </if>
      <if test="tallypiece != null" >
        TALLYPIECE,
      </if>
      <if test="tallyweight != null" >
        TALLYWEIGHT,
      </if>
      <if test="customscode != null" >
        CUSTOMSCODE,
      </if>
      <if test="productname != null" >
        PRODUCTNAME,
      </if>
      <if test="dischargedate != null" >
        DISCHARGEDATE,
      </if>
      <if test="createdate != null" >
        CREATEDATE,
      </if>
      <if test="loadstarttime != null" >
        LOADSTARTTIME,
      </if>
      <if test="loadendtime != null" >
        LOADENDTIME,
      </if>
      <if test="tallymasterid != null" >
        TALLYMASTERID,
      </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="status != null" >
        STATUS,
      </if>
      <if test="receiptinformation != null" >
        RECEIPTINFORMATION,
      </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="waybillnosecondary != null" >
        #{waybillnosecondary,jdbcType=VARCHAR},
      </if>
      <if test="weight != null" >
        #{weight,jdbcType=VARCHAR},
      </if>
      <if test="piece != null" >
        #{piece,jdbcType=VARCHAR},
      </if>
      <if test="tallypiece != null" >
        #{tallypiece,jdbcType=VARCHAR},
      </if>
      <if test="tallyweight != null" >
        #{tallyweight,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="createdate != null" >
        #{createdate,jdbcType=TIMESTAMP},
      </if>
      <if test="loadstarttime != null" >
        #{loadstarttime,jdbcType=TIMESTAMP},
      </if>
      <if test="loadendtime != null" >
        #{loadendtime,jdbcType=TIMESTAMP},
      </if>
      <if test="tallymasterid != null" >
        #{tallymasterid,jdbcType=VARCHAR},
      </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="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="receiptinformation != null" >
        #{receiptinformation,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>

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

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

</mapper>