123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714 |
- <?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.steerinfo.dil.mapper.TmstrainQualityResultMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainQualityResult">
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
- <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
- <result column="WZ_INPUT_ID" jdbcType="VARCHAR" property="wzInputId" />
- <result column="WZ_ID" jdbcType="VARCHAR" property="wzId" />
- <result column="MINE_ID " jdbcType="VARCHAR" property="mineId" />
- <result column="CONTRANCT_NO" jdbcType="VARCHAR" property="contranctNo" />
- <result column="SUPLIER_ID" jdbcType="VARCHAR" property="suplierId" />
- <result column="MINE_NAME" jdbcType="VARCHAR" property="mineName" />
- <result column="IS_IMPORT" jdbcType="VARCHAR" property="isImport" />
- <result column="POUND_NO" jdbcType="VARCHAR" property="poundNo" />
- <result column="CARGO_NO" jdbcType="VARCHAR" property="cargoNo" />
- <result column="SATION_NAME" jdbcType="VARCHAR" property="sationName" />
- <result column="PURCHASE_UNIT_NAME" jdbcType="VARCHAR" property="purchaseUnitName" />
- <result column="SHIP_NAME" jdbcType="VARCHAR" property="shipName" />
- <result column="SAMPLE_DATE" jdbcType="TIMESTAMP" property="sampleDate" />
- <result column="SAMPLE_PLACE_NAME" jdbcType="VARCHAR" property="samplePlaceName" />
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
- <result column="INSERT_REMARK" jdbcType="VARCHAR" property="insertRemark" />
- <result column="INPUT_DATE" jdbcType="VARCHAR" property="inputDate" />
- <result column="NET_WEIGHT" jdbcType="VARCHAR" property="netWeight" />
- <result column="ISQUALITY" jdbcType="VARCHAR" property="isquality" />
- <result column="UNLOAD_ID" jdbcType="DECIMAL" property="unloadId" />
- <result column="DEDUCT_NUMBER" jdbcType="DECIMAL" property="deductNumber" />
- <result column="ELEMENT_VALUE" jdbcType="VARCHAR" property="elementValue" />
- </resultMap>
- <sql id="columns">
- RESULT_ID, RESULT_TOTAL_ID, WZ_INPUT_ID, WZ_ID, "MINE_ID ", CONTRANCT_NO, SUPLIER_ID,
- MINE_NAME, IS_IMPORT, POUND_NO, CARGO_NO, SATION_NAME, PURCHASE_UNIT_NAME, SHIP_NAME,
- SAMPLE_DATE, SAMPLE_PLACE_NAME, INSERT_TIME, INSERT_REMARK, INPUT_DATE, NET_WEIGHT,
- ISQUALITY, UNLOAD_ID, DEDUCT_NUMBER, ELEMENT_VALUE
- </sql>
- <sql id="columns_alias">
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.WZ_INPUT_ID, t.WZ_ID, t."MINE_ID ", t.CONTRANCT_NO,
- t.SUPLIER_ID, t.MINE_NAME, t.IS_IMPORT, t.POUND_NO, t.CARGO_NO, t.SATION_NAME, t.PURCHASE_UNIT_NAME,
- t.SHIP_NAME, t.SAMPLE_DATE, t.SAMPLE_PLACE_NAME, t.INSERT_TIME, t.INSERT_REMARK,
- t.INPUT_DATE, t.NET_WEIGHT, t.ISQUALITY, t.UNLOAD_ID, t.DEDUCT_NUMBER, t.ELEMENT_VALUE
- </sql>
- <sql id="select">
- SELECT <include refid="columns" /> FROM TMSTRAIN_QUALITY_RESULT
- </sql>
- <sql id="select_alias">
- SELECT <include refid="columns_alias" /> FROM TMSTRAIN_QUALITY_RESULT t
- </sql>
- <sql id="where">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="wzInputId != null and wzInputId != ''">
- and WZ_INPUT_ID = #{wzInputId}
- </if>
- <if test="wzId != null and wzId != ''">
- and WZ_ID = #{wzId}
- </if>
- <if test="mineId != null and mineId != ''">
- and MINE_ID = #{mineId}
- </if>
- <if test="contranctNo != null and contranctNo != ''">
- and CONTRANCT_NO = #{contranctNo}
- </if>
- <if test="suplierId != null and suplierId != ''">
- and SUPLIER_ID = #{suplierId}
- </if>
- <if test="mineName != null and mineName != ''">
- and MINE_NAME = #{mineName}
- </if>
- <if test="isImport != null and isImport != ''">
- and IS_IMPORT = #{isImport}
- </if>
- <if test="poundNo != null and poundNo != ''">
- and POUND_NO = #{poundNo}
- </if>
- <if test="cargoNo != null and cargoNo != ''">
- and CARGO_NO = #{cargoNo}
- </if>
- <if test="sationName != null and sationName != ''">
- and SATION_NAME = #{sationName}
- </if>
- <if test="purchaseUnitName != null and purchaseUnitName != ''">
- and PURCHASE_UNIT_NAME = #{purchaseUnitName}
- </if>
- <if test="shipName != null and shipName != ''">
- and SHIP_NAME = #{shipName}
- </if>
- <if test="sampleDate != null">
- and TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = #{sampleDate}
- </if>
- <if test="samplePlaceName != null and samplePlaceName != ''">
- and SAMPLE_PLACE_NAME = #{samplePlaceName}
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="insertRemark != null and insertRemark != ''">
- and INSERT_REMARK = #{insertRemark}
- </if>
- <if test="inputDate != null and inputDate != ''">
- and INPUT_DATE = #{inputDate}
- </if>
- <if test="netWeight != null and netWeight != ''">
- and NET_WEIGHT = #{netWeight}
- </if>
- <if test="isquality != null and isquality != ''">
- and ISQUALITY = #{isquality}
- </if>
- <if test="unloadId != null">
- and UNLOAD_ID = #{unloadId}
- </if>
- <if test="deductNumber != null">
- and DEDUCT_NUMBER = #{deductNumber}
- </if>
- <if test="elementValue != null and elementValue != ''">
- and ELEMENT_VALUE = #{elementValue}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="resultId != null">
- and RESULT_ID = #{resultId}
- </if>
- <if test="resultTotalId != null">
- and RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="wzInputId != null and wzInputId != ''">
- and WZ_INPUT_ID LIKE '%${wzInputId}%'
- </if>
- <if test="wzId != null and wzId != ''">
- and WZ_ID LIKE '%${wzId}%'
- </if>
- <if test="mineId != null and mineId != ''">
- and MINE_ID LIKE '%${mineId}%'
- </if>
- <if test="contranctNo != null and contranctNo != ''">
- and CONTRANCT_NO LIKE '%${contranctNo}%'
- </if>
- <if test="suplierId != null and suplierId != ''">
- and SUPLIER_ID LIKE '%${suplierId}%'
- </if>
- <if test="mineName != null and mineName != ''">
- and MINE_NAME LIKE '%${mineName}%'
- </if>
- <if test="isImport != null and isImport != ''">
- and IS_IMPORT LIKE '%${isImport}%'
- </if>
- <if test="poundNo != null and poundNo != ''">
- and POUND_NO LIKE '%${poundNo}%'
- </if>
- <if test="cargoNo != null and cargoNo != ''">
- and CARGO_NO LIKE '%${cargoNo}%'
- </if>
- <if test="sationName != null and sationName != ''">
- and SATION_NAME LIKE '%${sationName}%'
- </if>
- <if test="purchaseUnitName != null and purchaseUnitName != ''">
- and PURCHASE_UNIT_NAME LIKE '%${purchaseUnitName}%'
- </if>
- <if test="shipName != null and shipName != ''">
- and SHIP_NAME LIKE '%${shipName}%'
- </if>
- <if test="sampleDate != null">
- and TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = #{sampleDate}
- </if>
- <if test="samplePlaceName != null and samplePlaceName != ''">
- and SAMPLE_PLACE_NAME LIKE '%${samplePlaceName}%'
- </if>
- <if test="insertTime != null">
- and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
- </if>
- <if test="insertRemark != null and insertRemark != ''">
- and INSERT_REMARK LIKE '%${insertRemark}%'
- </if>
- <if test="inputDate != null and inputDate != ''">
- and INPUT_DATE LIKE '%${inputDate}%'
- </if>
- <if test="netWeight != null and netWeight != ''">
- and NET_WEIGHT LIKE '%${netWeight}%'
- </if>
- <if test="isquality != null and isquality != ''">
- and ISQUALITY LIKE '%${isquality}%'
- </if>
- <if test="unloadId != null">
- and UNLOAD_ID = #{unloadId}
- </if>
- <if test="deductNumber != null">
- and DEDUCT_NUMBER = #{deductNumber}
- </if>
- <if test="elementValue != null and elementValue != ''">
- and ELEMENT_VALUE LIKE '%${elementValue}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
- delete from TMSTRAIN_QUALITY_RESULT
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from TMSTRAIN_QUALITY_RESULT
- where 1!=1
- <if test="resultTotalId != null">
- or RESULT_TOTAL_ID = #{resultTotalId}
- </if>
- <if test="wzInputId != null and wzInputId != ''">
- or WZ_INPUT_ID = #{wzInputId}
- </if>
- <if test="wzId != null and wzId != ''">
- or WZ_ID = #{wzId}
- </if>
- <if test="mineId != null and mineId != ''">
- or MINE_ID = #{mineId}
- </if>
- <if test="contranctNo != null and contranctNo != ''">
- or CONTRANCT_NO = #{contranctNo}
- </if>
- <if test="suplierId != null and suplierId != ''">
- or SUPLIER_ID = #{suplierId}
- </if>
- <if test="mineName != null and mineName != ''">
- or MINE_NAME = #{mineName}
- </if>
- <if test="isImport != null and isImport != ''">
- or IS_IMPORT = #{isImport}
- </if>
- <if test="poundNo != null and poundNo != ''">
- or POUND_NO = #{poundNo}
- </if>
- <if test="cargoNo != null and cargoNo != ''">
- or CARGO_NO = #{cargoNo}
- </if>
- <if test="sationName != null and sationName != ''">
- or SATION_NAME = #{sationName}
- </if>
- <if test="purchaseUnitName != null and purchaseUnitName != ''">
- or PURCHASE_UNIT_NAME = #{purchaseUnitName}
- </if>
- <if test="shipName != null and shipName != ''">
- or SHIP_NAME = #{shipName}
- </if>
- <if test="sampleDate != null">
- or TO_CHAR(SAMPLE_DATE,'yyyy-MM-dd') = '#{sampleDate}'
- </if>
- <if test="samplePlaceName != null and samplePlaceName != ''">
- or SAMPLE_PLACE_NAME = #{samplePlaceName}
- </if>
- <if test="insertTime != null">
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
- </if>
- <if test="insertRemark != null and insertRemark != ''">
- or INSERT_REMARK = #{insertRemark}
- </if>
- <if test="inputDate != null and inputDate != ''">
- or INPUT_DATE = #{inputDate}
- </if>
- <if test="netWeight != null and netWeight != ''">
- or NET_WEIGHT = #{netWeight}
- </if>
- <if test="isquality != null and isquality != ''">
- or ISQUALITY = #{isquality}
- </if>
- <if test="unloadId != null">
- or UNLOAD_ID = #{unloadId}
- </if>
- <if test="deductNumber != null">
- or DEDUCT_NUMBER = #{deductNumber}
- </if>
- <if test="elementValue != null and elementValue != ''">
- or ELEMENT_VALUE = #{elementValue}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
- insert into TMSTRAIN_QUALITY_RESULT (RESULT_ID, RESULT_TOTAL_ID, WZ_INPUT_ID,
- WZ_ID, "MINE_ID ", CONTRANCT_NO,
- SUPLIER_ID, MINE_NAME, IS_IMPORT,
- POUND_NO, CARGO_NO, SATION_NAME,
- PURCHASE_UNIT_NAME, SHIP_NAME, SAMPLE_DATE,
- SAMPLE_PLACE_NAME, INSERT_TIME, INSERT_REMARK,
- INPUT_DATE, NET_WEIGHT, ISQUALITY,
- UNLOAD_ID, DEDUCT_NUMBER, ELEMENT_VALUE
- )
- values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{wzInputId,jdbcType=VARCHAR},
- #{wzId,jdbcType=VARCHAR}, #{mineId,jdbcType=VARCHAR}, #{contranctNo,jdbcType=VARCHAR},
- #{suplierId,jdbcType=VARCHAR}, #{mineName,jdbcType=VARCHAR}, #{isImport,jdbcType=VARCHAR},
- #{poundNo,jdbcType=VARCHAR}, #{cargoNo,jdbcType=VARCHAR}, #{sationName,jdbcType=VARCHAR},
- #{purchaseUnitName,jdbcType=VARCHAR}, #{shipName,jdbcType=VARCHAR}, #{sampleDate,jdbcType=TIMESTAMP},
- #{samplePlaceName,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{insertRemark,jdbcType=VARCHAR},
- #{inputDate,jdbcType=VARCHAR}, #{netWeight,jdbcType=VARCHAR}, #{isquality,jdbcType=VARCHAR},
- #{unloadId,jdbcType=DECIMAL}, #{deductNumber,jdbcType=DECIMAL}, #{elementValue,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
- insert into TMSTRAIN_QUALITY_RESULT
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- RESULT_ID,
- </if>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID,
- </if>
- <if test="wzInputId != null">
- WZ_INPUT_ID,
- </if>
- <if test="wzId != null">
- WZ_ID,
- </if>
- <if test="mineId != null">
- "MINE_ID ",
- </if>
- <if test="contranctNo != null">
- CONTRANCT_NO,
- </if>
- <if test="suplierId != null">
- SUPLIER_ID,
- </if>
- <if test="mineName != null">
- MINE_NAME,
- </if>
- <if test="isImport != null">
- IS_IMPORT,
- </if>
- <if test="poundNo != null">
- POUND_NO,
- </if>
- <if test="cargoNo != null">
- CARGO_NO,
- </if>
- <if test="sationName != null">
- SATION_NAME,
- </if>
- <if test="purchaseUnitName != null">
- PURCHASE_UNIT_NAME,
- </if>
- <if test="shipName != null">
- SHIP_NAME,
- </if>
- <if test="sampleDate != null">
- SAMPLE_DATE,
- </if>
- <if test="samplePlaceName != null">
- SAMPLE_PLACE_NAME,
- </if>
- <if test="insertTime != null">
- INSERT_TIME,
- </if>
- <if test="insertRemark != null">
- INSERT_REMARK,
- </if>
- <if test="inputDate != null">
- INPUT_DATE,
- </if>
- <if test="netWeight != null">
- NET_WEIGHT,
- </if>
- <if test="isquality != null">
- ISQUALITY,
- </if>
- <if test="unloadId != null">
- UNLOAD_ID,
- </if>
- <if test="deductNumber != null">
- DEDUCT_NUMBER,
- </if>
- <if test="elementValue != null">
- ELEMENT_VALUE,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="resultId != null">
- #{resultId,jdbcType=DECIMAL},
- </if>
- <if test="resultTotalId != null">
- #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="wzInputId != null">
- #{wzInputId,jdbcType=VARCHAR},
- </if>
- <if test="wzId != null">
- #{wzId,jdbcType=VARCHAR},
- </if>
- <if test="mineId != null">
- #{mineId,jdbcType=VARCHAR},
- </if>
- <if test="contranctNo != null">
- #{contranctNo,jdbcType=VARCHAR},
- </if>
- <if test="suplierId != null">
- #{suplierId,jdbcType=VARCHAR},
- </if>
- <if test="mineName != null">
- #{mineName,jdbcType=VARCHAR},
- </if>
- <if test="isImport != null">
- #{isImport,jdbcType=VARCHAR},
- </if>
- <if test="poundNo != null">
- #{poundNo,jdbcType=VARCHAR},
- </if>
- <if test="cargoNo != null">
- #{cargoNo,jdbcType=VARCHAR},
- </if>
- <if test="sationName != null">
- #{sationName,jdbcType=VARCHAR},
- </if>
- <if test="purchaseUnitName != null">
- #{purchaseUnitName,jdbcType=VARCHAR},
- </if>
- <if test="shipName != null">
- #{shipName,jdbcType=VARCHAR},
- </if>
- <if test="sampleDate != null">
- #{sampleDate,jdbcType=TIMESTAMP},
- </if>
- <if test="samplePlaceName != null">
- #{samplePlaceName,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertRemark != null">
- #{insertRemark,jdbcType=VARCHAR},
- </if>
- <if test="inputDate != null">
- #{inputDate,jdbcType=VARCHAR},
- </if>
- <if test="netWeight != null">
- #{netWeight,jdbcType=VARCHAR},
- </if>
- <if test="isquality != null">
- #{isquality,jdbcType=VARCHAR},
- </if>
- <if test="unloadId != null">
- #{unloadId,jdbcType=DECIMAL},
- </if>
- <if test="deductNumber != null">
- #{deductNumber,jdbcType=DECIMAL},
- </if>
- <if test="elementValue != null">
- #{elementValue,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
- update TMSTRAIN_QUALITY_RESULT
- set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- WZ_INPUT_ID = #{wzInputId,jdbcType=VARCHAR},
- WZ_ID = #{wzId,jdbcType=VARCHAR},
- "MINE_ID " = #{mineId,jdbcType=VARCHAR},
- CONTRANCT_NO = #{contranctNo,jdbcType=VARCHAR},
- SUPLIER_ID = #{suplierId,jdbcType=VARCHAR},
- MINE_NAME = #{mineName,jdbcType=VARCHAR},
- IS_IMPORT = #{isImport,jdbcType=VARCHAR},
- POUND_NO = #{poundNo,jdbcType=VARCHAR},
- CARGO_NO = #{cargoNo,jdbcType=VARCHAR},
- SATION_NAME = #{sationName,jdbcType=VARCHAR},
- PURCHASE_UNIT_NAME = #{purchaseUnitName,jdbcType=VARCHAR},
- SHIP_NAME = #{shipName,jdbcType=VARCHAR},
- SAMPLE_DATE = #{sampleDate,jdbcType=TIMESTAMP},
- SAMPLE_PLACE_NAME = #{samplePlaceName,jdbcType=VARCHAR},
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- INSERT_REMARK = #{insertRemark,jdbcType=VARCHAR},
- INPUT_DATE = #{inputDate,jdbcType=VARCHAR},
- NET_WEIGHT = #{netWeight,jdbcType=VARCHAR},
- ISQUALITY = #{isquality,jdbcType=VARCHAR},
- UNLOAD_ID = #{unloadId,jdbcType=DECIMAL},
- DEDUCT_NUMBER = #{deductNumber,jdbcType=DECIMAL},
- ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR}
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainQualityResult">
- update TMSTRAIN_QUALITY_RESULT
- <set>
- <if test="resultTotalId != null">
- RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
- </if>
- <if test="wzInputId != null">
- WZ_INPUT_ID = #{wzInputId,jdbcType=VARCHAR},
- </if>
- <if test="wzId != null">
- WZ_ID = #{wzId,jdbcType=VARCHAR},
- </if>
- <if test="mineId != null">
- "MINE_ID " = #{mineId,jdbcType=VARCHAR},
- </if>
- <if test="contranctNo != null">
- CONTRANCT_NO = #{contranctNo,jdbcType=VARCHAR},
- </if>
- <if test="suplierId != null">
- SUPLIER_ID = #{suplierId,jdbcType=VARCHAR},
- </if>
- <if test="mineName != null">
- MINE_NAME = #{mineName,jdbcType=VARCHAR},
- </if>
- <if test="isImport != null">
- IS_IMPORT = #{isImport,jdbcType=VARCHAR},
- </if>
- <if test="poundNo != null">
- POUND_NO = #{poundNo,jdbcType=VARCHAR},
- </if>
- <if test="cargoNo != null">
- CARGO_NO = #{cargoNo,jdbcType=VARCHAR},
- </if>
- <if test="sationName != null">
- SATION_NAME = #{sationName,jdbcType=VARCHAR},
- </if>
- <if test="purchaseUnitName != null">
- PURCHASE_UNIT_NAME = #{purchaseUnitName,jdbcType=VARCHAR},
- </if>
- <if test="shipName != null">
- SHIP_NAME = #{shipName,jdbcType=VARCHAR},
- </if>
- <if test="sampleDate != null">
- SAMPLE_DATE = #{sampleDate,jdbcType=TIMESTAMP},
- </if>
- <if test="samplePlaceName != null">
- SAMPLE_PLACE_NAME = #{samplePlaceName,jdbcType=VARCHAR},
- </if>
- <if test="insertTime != null">
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
- </if>
- <if test="insertRemark != null">
- INSERT_REMARK = #{insertRemark,jdbcType=VARCHAR},
- </if>
- <if test="inputDate != null">
- INPUT_DATE = #{inputDate,jdbcType=VARCHAR},
- </if>
- <if test="netWeight != null">
- NET_WEIGHT = #{netWeight,jdbcType=VARCHAR},
- </if>
- <if test="isquality != null">
- ISQUALITY = #{isquality,jdbcType=VARCHAR},
- </if>
- <if test="unloadId != null">
- UNLOAD_ID = #{unloadId,jdbcType=DECIMAL},
- </if>
- <if test="deductNumber != null">
- DEDUCT_NUMBER = #{deductNumber,jdbcType=DECIMAL},
- </if>
- <if test="elementValue != null">
- ELEMENT_VALUE = #{elementValue,jdbcType=VARCHAR},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
- <include refid="select" />
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="where" />
- </select>
- <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select" />
- <include refid="whereLike" />
- </select>
- <insert id="batchInsert" parameterType="java.util.List">
- insert into TMSTRAIN_QUALITY_RESULT
- (RESULT_ID,
- RESULT_TOTAL_ID, WZ_INPUT_ID, WZ_ID,
- "MINE_ID ", CONTRANCT_NO, SUPLIER_ID,
- MINE_NAME, IS_IMPORT, POUND_NO,
- CARGO_NO, SATION_NAME, PURCHASE_UNIT_NAME,
- SHIP_NAME, SAMPLE_DATE, SAMPLE_PLACE_NAME,
- INSERT_TIME, INSERT_REMARK, INPUT_DATE,
- NET_WEIGHT, ISQUALITY, UNLOAD_ID,
- DEDUCT_NUMBER, ELEMENT_VALUE)
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.resultId,jdbcType=DECIMAL},
- #{item.resultTotalId,jdbcType=DECIMAL}, #{item.wzInputId,jdbcType=VARCHAR}, #{item.wzId,jdbcType=VARCHAR},
- #{item.mineId,jdbcType=VARCHAR}, #{item.contranctNo,jdbcType=VARCHAR}, #{item.suplierId,jdbcType=VARCHAR},
- #{item.mineName,jdbcType=VARCHAR}, #{item.isImport,jdbcType=VARCHAR}, #{item.poundNo,jdbcType=VARCHAR},
- #{item.cargoNo,jdbcType=VARCHAR}, #{item.sationName,jdbcType=VARCHAR}, #{item.purchaseUnitName,jdbcType=VARCHAR},
- #{item.shipName,jdbcType=VARCHAR}, #{item.sampleDate,jdbcType=TIMESTAMP}, #{item.samplePlaceName,jdbcType=VARCHAR},
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertRemark,jdbcType=VARCHAR}, #{item.inputDate,jdbcType=VARCHAR},
- #{item.netWeight,jdbcType=VARCHAR}, #{item.isquality,jdbcType=VARCHAR}, #{item.unloadId,jdbcType=DECIMAL},
- #{item.deductNumber,jdbcType=DECIMAL}, #{item.elementValue,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRAIN_QUALITY_RESULT
- set
- RESULT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- ,RESULT_TOTAL_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
- </foreach>
- ,WZ_INPUT_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.wzInputId,jdbcType=VARCHAR}
- </foreach>
- ,WZ_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.wzId,jdbcType=VARCHAR}
- </foreach>
- ,"MINE_ID "=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.mineId,jdbcType=VARCHAR}
- </foreach>
- ,CONTRANCT_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.contranctNo,jdbcType=VARCHAR}
- </foreach>
- ,SUPLIER_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.suplierId,jdbcType=VARCHAR}
- </foreach>
- ,MINE_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.mineName,jdbcType=VARCHAR}
- </foreach>
- ,IS_IMPORT=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.isImport,jdbcType=VARCHAR}
- </foreach>
- ,POUND_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.poundNo,jdbcType=VARCHAR}
- </foreach>
- ,CARGO_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.cargoNo,jdbcType=VARCHAR}
- </foreach>
- ,SATION_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sationName,jdbcType=VARCHAR}
- </foreach>
- ,PURCHASE_UNIT_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseUnitName,jdbcType=VARCHAR}
- </foreach>
- ,SHIP_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.shipName,jdbcType=VARCHAR}
- </foreach>
- ,SAMPLE_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sampleDate,jdbcType=TIMESTAMP}
- </foreach>
- ,SAMPLE_PLACE_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.samplePlaceName,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_REMARK=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.insertRemark,jdbcType=VARCHAR}
- </foreach>
- ,INPUT_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.inputDate,jdbcType=VARCHAR}
- </foreach>
- ,NET_WEIGHT=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=VARCHAR}
- </foreach>
- ,ISQUALITY=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.isquality,jdbcType=VARCHAR}
- </foreach>
- ,UNLOAD_ID=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadId,jdbcType=DECIMAL}
- </foreach>
- ,DEDUCT_NUMBER=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deductNumber,jdbcType=DECIMAL}
- </foreach>
- ,ELEMENT_VALUE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.elementValue,jdbcType=VARCHAR}
- </foreach>
- where RESULT_ID in
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
- #{item.resultId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from TMSTRAIN_QUALITY_RESULT
- where RESULT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!--查询计量过后未质检的数据-->
- <select id="selectWzInputId" resultType="java.util.Map">
- select TTR.TOTAL_RESULT_ID "resultTotalId",
- TLR.RESULT_WAGON_NO "cargonNo",
- to_char(TWR.RESULT_GROSS_WEIGHT_TIME,'YYYYMMDDHH24MISS') "grossWeightTime"
- from TMSTRAIN_LOADING_RESULT TLR
- LEFT JOIN TMSTRAIN_TOTAL_RESULT TTR
- ON TTR.LOADING_ID = TLR.RESULT_ID
- left join TMSTRAIN_WEIGHT_RESULT TWR
- ON TWR.RESULT_TOTAL_ID = TTR.TOTAL_RESULT_ID
- left join TMSTRAIN_QUALITY_RESULT TQR
- ON TQR.RESULT_TOTAL_ID = TTR.TOTAL_RESULT_ID
- WHERE TQR.ISQUALITY IS NULL AND TWR.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
- </select>
- </mapper>
|