|
@@ -13,14 +13,17 @@
|
|
|
<result column="MAKE_DATE" jdbcType="VARCHAR" property="makeDate" />
|
|
|
<result column="MINERAL" jdbcType="VARCHAR" property="mineral" />
|
|
|
<result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
|
|
|
+ <result column="OUTBOUNT_ID" jdbcType="DECIMAL" property="outbountId" />
|
|
|
</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
|
|
|
+ ARRIVAL_STATION, SUPPLIER_NAME, SEND_DATE, MAKE_DATE, MINERAL, PURCHASE_ORDER_NO,
|
|
|
+ OUTBOUNT_ID
|
|
|
</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
|
|
|
+ t.ARRIVAL_STATION, t.SUPPLIER_NAME, t.SEND_DATE, t.MAKE_DATE, t.MINERAL, t.PURCHASE_ORDER_NO,
|
|
|
+ t.OUTBOUNT_ID
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM TMSTRAIN_LOADING_TEMP
|
|
@@ -63,6 +66,9 @@
|
|
|
<if test="purchaseOrderNo != null and purchaseOrderNo != ''">
|
|
|
and PURCHASE_ORDER_NO = #{purchaseOrderNo}
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ and OUTBOUNT_ID = #{outbountId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -100,6 +106,9 @@
|
|
|
<if test="purchaseOrderNo != null and purchaseOrderNo != ''">
|
|
|
and PURCHASE_ORDER_NO LIKE '%${purchaseOrderNo}%'
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ and OUTBOUNT_ID = #{outbountId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
@@ -139,16 +148,21 @@
|
|
|
<if test="purchaseOrderNo != null and purchaseOrderNo != ''">
|
|
|
or PURCHASE_ORDER_NO = #{purchaseOrderNo}
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ or OUTBOUNT_ID = #{outbountId}
|
|
|
+ </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)
|
|
|
+ MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID
|
|
|
+ )
|
|
|
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})
|
|
|
+ #{mineral,jdbcType=VARCHAR}, #{purchaseOrderNo,jdbcType=VARCHAR}, #{outbountId,jdbcType=DECIMAL}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
|
insert into TMSTRAIN_LOADING_TEMP
|
|
@@ -186,6 +200,9 @@
|
|
|
<if test="purchaseOrderNo != null">
|
|
|
PURCHASE_ORDER_NO,
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ OUTBOUNT_ID,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -221,6 +238,9 @@
|
|
|
<if test="purchaseOrderNo != null">
|
|
|
#{purchaseOrderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ #{outbountId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
@@ -234,7 +254,8 @@
|
|
|
SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
MAKE_DATE = #{makeDate,jdbcType=VARCHAR},
|
|
|
MINERAL = #{mineral,jdbcType=VARCHAR},
|
|
|
- PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR}
|
|
|
+ PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
|
|
|
+ OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
@@ -270,6 +291,9 @@
|
|
|
<if test="purchaseOrderNo != null">
|
|
|
PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="outbountId != null">
|
|
|
+ OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -291,14 +315,16 @@
|
|
|
RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
|
MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
|
SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
|
- MINERAL, PURCHASE_ORDER_NO)
|
|
|
+ MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID
|
|
|
+ )
|
|
|
( <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
|
|
|
+ #{item.mineral,jdbcType=VARCHAR}, #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.outbountId,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -348,6 +374,10 @@
|
|
|
<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>
|
|
|
+ ,OUTBOUNT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.outbountId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -362,8 +392,9 @@
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
+ <!-- 获取主键id-->
|
|
|
<select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
|
select seq_tmstrain_loading_temp.nextval from dual
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|