123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <?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" />
- <result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
- </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, PURCHASE_ORDER_NO
- </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, t.PURCHASE_ORDER_NO
- </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>
- <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
- and PURCHASE_ORDER_NO = #{purchaseOrderNo}
- </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>
- <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
- and PURCHASE_ORDER_NO LIKE '%${purchaseOrderNo}%'
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
- 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>
- <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
- or PURCHASE_ORDER_NO = #{purchaseOrderNo}
- </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, PURCHASE_ORDER_NO)
- 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}, #{purchaseOrderNo,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>
- <if test="purchaseOrderNo != null">
- PURCHASE_ORDER_NO,
- </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>
- <if test="purchaseOrderNo != null">
- #{purchaseOrderNo,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},
- PURCHASE_ORDER_NO = #{purchaseOrderNo,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>
- <if test="purchaseOrderNo != null">
- PURCHASE_ORDER_NO = #{purchaseOrderNo,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_LOADING_TEMP
- (RESULT_ID,
- RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
- MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
- SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
- MINERAL, PURCHASE_ORDER_NO)
- ( <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}, #{item.purchaseOrderNo,jdbcType=VARCHAR} from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update TMSTRAIN_LOADING_TEMP
- 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_WAGON_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
- </foreach>
- ,RESULT_BILLABLE_TONNAGE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
- </foreach>
- ,MATERIAL_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.materialName,jdbcType=VARCHAR}
- </foreach>
- ,SEND_STATION=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStation,jdbcType=VARCHAR}
- </foreach>
- ,ARRIVAL_STATION=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStation,jdbcType=VARCHAR}
- </foreach>
- ,SUPPLIER_NAME=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.supplierName,jdbcType=VARCHAR}
- </foreach>
- ,SEND_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendDate,jdbcType=VARCHAR}
- </foreach>
- ,MAKE_DATE=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.makeDate,jdbcType=VARCHAR}
- </foreach>
- ,MINERAL=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.mineral,jdbcType=VARCHAR}
- </foreach>
- ,PURCHASE_ORDER_NO=
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderNo,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_LOADING_TEMP
- where RESULT_ID in
- <foreach close=")" collection="list" item="id" open="(" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="selectMaxId" resultType="java.math.BigDecimal">
- select seq_tmstrain_loading_temp.nextval from dual
- </select>
- </mapper>
|