|
@@ -14,16 +14,18 @@
|
|
<result column="MINERAL" jdbcType="VARCHAR" property="mineral" />
|
|
<result column="MINERAL" jdbcType="VARCHAR" property="mineral" />
|
|
<result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
|
|
<result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
|
|
<result column="OUTBOUNT_ID" jdbcType="DECIMAL" property="outbountId" />
|
|
<result column="OUTBOUNT_ID" jdbcType="DECIMAL" property="outbountId" />
|
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<sql id="columns">
|
|
RESULT_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, MATERIAL_NAME, SEND_STATION,
|
|
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
|
|
|
|
|
|
+ OUTBOUNT_ID, UPDATE_USERNAME, UPDATE_TIME
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<sql id="columns_alias">
|
|
t.RESULT_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE, t.MATERIAL_NAME, t.SEND_STATION,
|
|
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
|
|
|
|
|
|
+ t.OUTBOUNT_ID, t.UPDATE_USERNAME, t.UPDATE_TIME
|
|
</sql>
|
|
</sql>
|
|
<sql id="select">
|
|
<sql id="select">
|
|
SELECT <include refid="columns" /> FROM TMSTRAIN_LOADING_TEMP
|
|
SELECT <include refid="columns" /> FROM TMSTRAIN_LOADING_TEMP
|
|
@@ -69,6 +71,12 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
and OUTBOUNT_ID = #{outbountId}
|
|
and OUTBOUNT_ID = #{outbountId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
@@ -109,6 +117,12 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
and OUTBOUNT_ID = #{outbountId}
|
|
and OUTBOUNT_ID = #{outbountId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
@@ -151,18 +165,24 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
or OUTBOUNT_ID = #{outbountId}
|
|
or OUTBOUNT_ID = #{outbountId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
|
+ or UPDATE_USERNAME = #{updateUsername}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
|
+ </if>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
insert into TMSTRAIN_LOADING_TEMP (RESULT_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
insert into TMSTRAIN_LOADING_TEMP (RESULT_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
- MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID
|
|
|
|
- )
|
|
|
|
|
|
+ MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID,
|
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME)
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
#{materialName,jdbcType=VARCHAR}, #{sendStation,jdbcType=VARCHAR}, #{arrivalStation,jdbcType=VARCHAR},
|
|
#{materialName,jdbcType=VARCHAR}, #{sendStation,jdbcType=VARCHAR}, #{arrivalStation,jdbcType=VARCHAR},
|
|
#{supplierName,jdbcType=VARCHAR}, #{sendDate,jdbcType=VARCHAR}, #{makeDate,jdbcType=VARCHAR},
|
|
#{supplierName,jdbcType=VARCHAR}, #{sendDate,jdbcType=VARCHAR}, #{makeDate,jdbcType=VARCHAR},
|
|
- #{mineral,jdbcType=VARCHAR}, #{purchaseOrderNo,jdbcType=VARCHAR}, #{outbountId,jdbcType=DECIMAL}
|
|
|
|
- )
|
|
|
|
|
|
+ #{mineral,jdbcType=VARCHAR}, #{purchaseOrderNo,jdbcType=VARCHAR}, #{outbountId,jdbcType=DECIMAL},
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
insert into TMSTRAIN_LOADING_TEMP
|
|
insert into TMSTRAIN_LOADING_TEMP
|
|
@@ -203,6 +223,12 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
OUTBOUNT_ID,
|
|
OUTBOUNT_ID,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
+ UPDATE_USERNAME,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ UPDATE_TIME,
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="resultId != null">
|
|
<if test="resultId != null">
|
|
@@ -241,6 +267,12 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
#{outbountId,jdbcType=DECIMAL},
|
|
#{outbountId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
@@ -255,7 +287,9 @@
|
|
MAKE_DATE = #{makeDate,jdbcType=VARCHAR},
|
|
MAKE_DATE = #{makeDate,jdbcType=VARCHAR},
|
|
MINERAL = #{mineral,jdbcType=VARCHAR},
|
|
MINERAL = #{mineral,jdbcType=VARCHAR},
|
|
PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
|
|
PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
|
|
- OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL}
|
|
|
|
|
|
+ OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL},
|
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingTemp">
|
|
@@ -294,6 +328,12 @@
|
|
<if test="outbountId != null">
|
|
<if test="outbountId != null">
|
|
OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL},
|
|
OUTBOUNT_ID = #{outbountId,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="updateUsername != null">
|
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
@@ -315,16 +355,16 @@
|
|
RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
MATERIAL_NAME, SEND_STATION, ARRIVAL_STATION,
|
|
SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
SUPPLIER_NAME, SEND_DATE, MAKE_DATE,
|
|
- MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID
|
|
|
|
- )
|
|
|
|
|
|
+ MINERAL, PURCHASE_ORDER_NO, OUTBOUNT_ID,
|
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME)
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
select
|
|
select
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
#{item.resultWagonNo,jdbcType=VARCHAR}, #{item.resultBillableTonnage,jdbcType=DECIMAL},
|
|
#{item.resultWagonNo,jdbcType=VARCHAR}, #{item.resultBillableTonnage,jdbcType=DECIMAL},
|
|
#{item.materialName,jdbcType=VARCHAR}, #{item.sendStation,jdbcType=VARCHAR}, #{item.arrivalStation,jdbcType=VARCHAR},
|
|
#{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.supplierName,jdbcType=VARCHAR}, #{item.sendDate,jdbcType=VARCHAR}, #{item.makeDate,jdbcType=VARCHAR},
|
|
- #{item.mineral,jdbcType=VARCHAR}, #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.outbountId,jdbcType=DECIMAL}
|
|
|
|
- from dual
|
|
|
|
|
|
+ #{item.mineral,jdbcType=VARCHAR}, #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.outbountId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP} from dual
|
|
</foreach> )
|
|
</foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -378,11 +418,20 @@
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.outbountId,jdbcType=DECIMAL}
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.outbountId,jdbcType=DECIMAL}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ ,UPDATE_USERNAME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,UPDATE_TIME=
|
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
+ </foreach>
|
|
where RESULT_ID in
|
|
where RESULT_ID in
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
</foreach>
|
|
</foreach>
|
|
</update>
|
|
</update>
|
|
|
|
+
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
delete from TMSTRAIN_LOADING_TEMP
|
|
delete from TMSTRAIN_LOADING_TEMP
|
|
where RESULT_ID in
|
|
where RESULT_ID in
|
|
@@ -392,9 +441,40 @@
|
|
</delete>
|
|
</delete>
|
|
<!-- 友情提示!!!-->
|
|
<!-- 友情提示!!!-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 获取主键id-->
|
|
<!-- 获取主键id-->
|
|
<select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
<select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
select seq_tmstrain_loading_temp.nextval from dual
|
|
select seq_tmstrain_loading_temp.nextval from dual
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <update id="updateTonnage" parameterType="java.util.Map">
|
|
|
|
+ update WMSH_OUTBOUND_RESULT WOR
|
|
|
|
+ set WOR.RESULT_TONNAGE =#{wagonWeightNew}
|
|
|
|
+ WHERE WOR.RESULT_ID = #{outResultId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <!-- 获取装车作业-->
|
|
|
|
+ <select id="getWareHouseOutresult" resultType="java.util.Map" parameterType="java.math.BigDecimal">
|
|
|
|
+ select TLT.RESULT_ID "resultId",
|
|
|
|
+ TLT.RESULT_WAGON_NO "wagonNo",
|
|
|
|
+ TLT.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
|
+ TLT.RESULT_BILLABLE_TONNAGE "tonnage",
|
|
|
|
+ WOR.HARBOR_ID "portId",
|
|
|
|
+ WOR.BATCH_ID "batchId",
|
|
|
|
+ WOR.RESULT_ID "OutResultId",
|
|
|
|
+ WOR.RESULT_TONNAGE "resultTonnage"
|
|
|
|
+ FROM TMSTRAIN_LOADING_TEMP TLT
|
|
|
|
+ left join WMSH_OUTBOUND_RESULT WOR
|
|
|
|
+ ON WOR.RESULT_ID = TLT.OUTBOUNT_ID
|
|
|
|
+ WHERE TLT.RESULT_ID=#{resultId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <select id="getBatchIdbyPurchaseNo" resultType="java.math.BigDecimal" parameterType="java.lang.String">
|
|
|
|
+ select apo.BATCH_ID "batchId"
|
|
|
|
+ from AMS_PURCHASE_ORDER APO
|
|
|
|
+ WHERE APO.PURCHASE_ORDER_NO =#{purchaseNo}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|