|
@@ -0,0 +1,342 @@
|
|
|
+<?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.TmstrainLoadingTempMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="RESULT_WAGON_NO" jdbcType="VARCHAR" property="resultWagonNo" />
|
|
|
+ <result column="RESULT_BILLABLE_TONNAGE" jdbcType="DECIMAL" property="resultBillableTonnage" />
|
|
|
+ <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
|
|
|
+ <result column="SEND_STATION" jdbcType="VARCHAR" property="sendStation" />
|
|
|
+ <result column="ARRIVAL_STATION" jdbcType="VARCHAR" property="arrivalStation" />
|
|
|
+ <result column="SUPPLIER_NAME" jdbcType="VARCHAR" property="supplierName" />
|
|
|
+ <result column="SEND_DATE" jdbcType="VARCHAR" property="sendDate" />
|
|
|
+ <result column="MAKE_DATE" jdbcType="VARCHAR" property="makeDate" />
|
|
|
+ <result column="MINERAL" jdbcType="VARCHAR" property="mineral" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ RESULT_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, MATERIAL_NAME, SEND_STATION,
|
|
|
+ ARRIVAL_STATION, SUPPLIER_NAME, SEND_DATE, MAKE_DATE, MINERAL
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.RESULT_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE, t.MATERIAL_NAME, t.SEND_STATION,
|
|
|
+ t.ARRIVAL_STATION, t.SUPPLIER_NAME, t.SEND_DATE, t.MAKE_DATE, t.MINERAL
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM TMSTRAIN_LOADING_TEMP
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TMSTRAIN_LOADING_TEMP t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ and RESULT_WAGON_NO = #{resultWagonNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
+ and MATERIAL_NAME = #{materialName}
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null and sendStation != ''">
|
|
|
+ and SEND_STATION = #{sendStation}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null and arrivalStation != ''">
|
|
|
+ and ARRIVAL_STATION = #{arrivalStation}
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null and supplierName != ''">
|
|
|
+ and SUPPLIER_NAME = #{supplierName}
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ and SEND_DATE = #{sendDate}
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null and makeDate != ''">
|
|
|
+ and MAKE_DATE = #{makeDate}
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null and mineral != ''">
|
|
|
+ and MINERAL = #{mineral}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ and RESULT_WAGON_NO LIKE '%${resultWagonNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
+ and MATERIAL_NAME LIKE '%${materialName}%'
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null and sendStation != ''">
|
|
|
+ and SEND_STATION LIKE '%${sendStation}%'
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null and arrivalStation != ''">
|
|
|
+ and ARRIVAL_STATION LIKE '%${arrivalStation}%'
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null and supplierName != ''">
|
|
|
+ and SUPPLIER_NAME LIKE '%${supplierName}%'
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ and SEND_DATE LIKE '%${sendDate}%'
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null and makeDate != ''">
|
|
|
+ and MAKE_DATE LIKE '%${makeDate}%'
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null and mineral != ''">
|
|
|
+ and MINERAL LIKE '%${mineral}%'
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from TMSTRAIN_LOADING_TEMP
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from TMSTRAIN_LOADING_TEMP
|
|
|
+ where 1!=1
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ or RESULT_WAGON_NO = #{resultWagonNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ or RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null and materialName != ''">
|
|
|
+ or MATERIAL_NAME = #{materialName}
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null and sendStation != ''">
|
|
|
+ or SEND_STATION = #{sendStation}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null and arrivalStation != ''">
|
|
|
+ or ARRIVAL_STATION = #{arrivalStation}
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null and supplierName != ''">
|
|
|
+ or SUPPLIER_NAME = #{supplierName}
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ or SEND_DATE = #{sendDate}
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null and makeDate != ''">
|
|
|
+ or MAKE_DATE = #{makeDate}
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null and mineral != ''">
|
|
|
+ or MINERAL = #{mineral}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
+ insert into TMSTRAIN_LOADING_TEMP (RESULT_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
|
+ MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
|
+ SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
|
+ MINERAL)
|
|
|
+ values (#{resultId,jdbcType=DECIMAL}, #{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ #{materialName,jdbcType=VARCHAR}, #{sendStation,jdbcType=VARCHAR}, #{arrivalStation,jdbcType=VARCHAR},
|
|
|
+ #{supplierName,jdbcType=VARCHAR}, #{sendDate,jdbcType=VARCHAR}, #{makeDate,jdbcType=VARCHAR},
|
|
|
+ #{mineral,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
+ insert into TMSTRAIN_LOADING_TEMP
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ RESULT_WAGON_NO,
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ RESULT_BILLABLE_TONNAGE,
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ MATERIAL_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null">
|
|
|
+ SEND_STATION,
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null">
|
|
|
+ ARRIVAL_STATION,
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null">
|
|
|
+ SUPPLIER_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null">
|
|
|
+ SEND_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null">
|
|
|
+ MAKE_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null">
|
|
|
+ MINERAL,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ #{materialName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null">
|
|
|
+ #{sendStation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null">
|
|
|
+ #{arrivalStation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null">
|
|
|
+ #{supplierName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null">
|
|
|
+ #{sendDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null">
|
|
|
+ #{makeDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null">
|
|
|
+ #{mineral,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
+ update TMSTRAIN_LOADING_TEMP
|
|
|
+ set RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
+ SEND_STATION = #{sendStation,jdbcType=VARCHAR},
|
|
|
+ ARRIVAL_STATION = #{arrivalStation,jdbcType=VARCHAR},
|
|
|
+ SUPPLIER_NAME = #{supplierName,jdbcType=VARCHAR},
|
|
|
+ SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
+ MAKE_DATE = #{makeDate,jdbcType=VARCHAR},
|
|
|
+ MINERAL = #{mineral,jdbcType=VARCHAR}
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
+ update TMSTRAIN_LOADING_TEMP
|
|
|
+ <set>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendStation != null">
|
|
|
+ SEND_STATION = #{sendStation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStation != null">
|
|
|
+ ARRIVAL_STATION = #{arrivalStation,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="supplierName != null">
|
|
|
+ SUPPLIER_NAME = #{supplierName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null">
|
|
|
+ SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="makeDate != null">
|
|
|
+ MAKE_DATE = #{makeDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="mineral != null">
|
|
|
+ MINERAL = #{mineral,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" 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_LOADING_TEMP
|
|
|
+ (RESULT_ID,
|
|
|
+ RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
|
+ MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
|
+ SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
|
+ MINERAL)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.resultWagonNo,jdbcType=VARCHAR}, #{item.resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ #{item.materialName,jdbcType=VARCHAR}, #{item.sendStation,jdbcType=VARCHAR}, #{item.arrivalStation,jdbcType=VARCHAR},
|
|
|
+ #{item.supplierName,jdbcType=VARCHAR}, #{item.sendDate,jdbcType=VARCHAR}, #{item.makeDate,jdbcType=VARCHAR},
|
|
|
+ #{item.mineral,jdbcType=VARCHAR} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TMSTRAIN_LOADING_TEMP
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_WAGON_NO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_BILLABLE_TONNAGE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.materialName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_STATION=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStation,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ARRIVAL_STATION=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStation,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SUPPLIER_NAME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.supplierName,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_DATE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.sendDate,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,MAKE_DATE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.makeDate,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,MINERAL=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.mineral,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from TMSTRAIN_LOADING_TEMP
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+</mapper>
|