|
@@ -20,24 +20,25 @@
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
<result column="STATUS" jdbcType="DECIMAL" property="status" />
|
|
|
+ <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY,
|
|
|
- SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
|
|
|
- RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS
|
|
|
+ RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY,
|
|
|
+ SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
|
|
|
+ RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_TYPE
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY,
|
|
|
- t.SHIPPER_ID, t.SEND_STATION_ID, t.TO_THE_STATION_ID, t.RESULT_PLEASE_NUMBER, t.RESULT_PLEASE_DATE,
|
|
|
- t.RESULT_APPROVE_NUMBER, t.RESULT_APPROVE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
- t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS
|
|
|
+ t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY,
|
|
|
+ t.SHIPPER_ID, t.SEND_STATION_ID, t.TO_THE_STATION_ID, t.RESULT_PLEASE_NUMBER, t.RESULT_PLEASE_DATE,
|
|
|
+ t.RESULT_APPROVE_NUMBER, t.RESULT_APPROVE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
+ t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_TYPE
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
+ SELECT <include refid="columns"/> FROM TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT t
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TMSTRAIN_PLEASE_APPROVE_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
@@ -95,6 +96,9 @@
|
|
|
<if test="status != null">
|
|
|
and STATUS = #{status}
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ and RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -153,9 +157,12 @@
|
|
|
<if test="status != null">
|
|
|
and STATUS = #{status}
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ and RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
delete from TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
@@ -213,6 +220,9 @@
|
|
|
<if test="status != null">
|
|
|
or STATUS = #{status}
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ or RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
|
insert into TMSTRAIN_PLEASE_APPROVE_RESULT (RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
|
|
@@ -221,14 +231,14 @@
|
|
|
RESULT_PLEASE_DATE, RESULT_APPROVE_NUMBER,
|
|
|
RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- STATUS)
|
|
|
+ STATUS, RESULT_TYPE)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{railPlanId,jdbcType=DECIMAL}, #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
#{resultPlanDate,jdbcType=TIMESTAMP}, #{resultCategory,jdbcType=VARCHAR}, #{shipperId,jdbcType=DECIMAL},
|
|
|
#{sendStationId,jdbcType=DECIMAL}, #{toTheStationId,jdbcType=DECIMAL}, #{resultPleaseNumber,jdbcType=DECIMAL},
|
|
|
#{resultPleaseDate,jdbcType=TIMESTAMP}, #{resultApproveNumber,jdbcType=DECIMAL},
|
|
|
#{resultApproveDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
#{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{status,jdbcType=DECIMAL})
|
|
|
+ #{status,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
|
insert into TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
@@ -287,6 +297,9 @@
|
|
|
<if test="status != null">
|
|
|
STATUS,
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ RESULT_TYPE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -343,6 +356,9 @@
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ #{resultType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
@@ -363,7 +379,8 @@
|
|
|
UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- STATUS = #{status,jdbcType=DECIMAL}
|
|
|
+ STATUS = #{status,jdbcType=DECIMAL},
|
|
|
+ RESULT_TYPE = #{resultType,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
@@ -420,20 +437,23 @@
|
|
|
<if test="status != null">
|
|
|
STATUS = #{status,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select" />
|
|
|
+ <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" />
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="where"/>
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select" />
|
|
|
- <include refid="whereLike" />
|
|
|
+ <include refid="select"/>
|
|
|
+ <include refid="whereLike"/>
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
insert into TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
@@ -445,7 +465,8 @@
|
|
|
RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE,
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK, STATUS)
|
|
|
+ INSERT_UPDATE_REMARK, STATUS, RESULT_TYPE
|
|
|
+ )
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -456,93 +477,98 @@
|
|
|
#{item.resultApproveNumber,jdbcType=DECIMAL}, #{item.resultApproveDate,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL} from dual
|
|
|
+ #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL}, #{item.resultType,jdbcType=DECIMAL}
|
|
|
+ from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
update TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
set
|
|
|
RESULT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
|
|
|
+ <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>
|
|
|
,RAIL_PLAN_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.railPlanId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_PLAN_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleasePlanNo,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,RESULT_PLAN_DATE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPlanDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,RESULT_CATEGORY=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCategory,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,SHIPPER_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,SEND_STATION_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,TO_THE_STATION_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.toTheStationId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_NUMBER=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseNumber,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_DATE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,RESULT_APPROVE_NUMBER=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveNumber,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_APPROVE_DATE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_TIME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_USERNAME=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
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=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_UPDATE_REMARK=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,STATUS=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,RESULT_TYPE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultType,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
+ <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_PLEASE_APPROVE_RESULT
|
|
|
where RESULT_ID in
|
|
|
- <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
@@ -569,7 +595,7 @@
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t4
|
|
|
on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
|
|
|
|
|
|
- where t1.STATUS = #{status}
|
|
|
+ where t1.STATUS = #{status} and t1.RESULT_TYPE = #{resultType}
|
|
|
)
|
|
|
<where>
|
|
|
<if test="resultId != null">
|
|
@@ -683,7 +709,7 @@
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t4
|
|
|
on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
|
|
|
|
|
|
- where t1.STATUS = 2
|
|
|
+ where t1.STATUS = 2 and t1.RESULT_TYPE = #{resultType}
|
|
|
)
|
|
|
<where>
|
|
|
<if test="resultId != null">
|