|
@@ -2,47 +2,43 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.steerinfo.dil.mapper.TmstrainPleaseApproveResultMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
|
- <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
|
|
|
- <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId"/>
|
|
|
- <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo"/>
|
|
|
- <result column="RESULT_PLAN_DATE" jdbcType="TIMESTAMP" property="resultPlanDate"/>
|
|
|
- <result column="RESULT_CATEGORY" jdbcType="VARCHAR" property="resultCategory"/>
|
|
|
- <result column="SHIPPER_ID" jdbcType="DECIMAL" property="shipperId"/>
|
|
|
- <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId"/>
|
|
|
- <result column="TO_THE_STATION_ID" jdbcType="DECIMAL" property="toTheStationId"/>
|
|
|
- <result column="RESULT_PLEASE_NUMBER" jdbcType="DECIMAL" property="resultPleaseNumber"/>
|
|
|
- <result column="RESULT_PLEASE_DATE" jdbcType="TIMESTAMP" property="resultPleaseDate"/>
|
|
|
- <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber"/>
|
|
|
- <result column="RESULT_APPROVE_DATE" jdbcType="TIMESTAMP" property="resultApproveDate"/>
|
|
|
- <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
|
|
|
- <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
|
|
|
- <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
|
|
|
- <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"/>
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId" />
|
|
|
+ <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo" />
|
|
|
+ <result column="RESULT_PLAN_DATE" jdbcType="TIMESTAMP" property="resultPlanDate" />
|
|
|
+ <result column="RESULT_CATEGORY" jdbcType="VARCHAR" property="resultCategory" />
|
|
|
+ <result column="SUPPLIER_ID" jdbcType="DECIMAL" property="supplierId" />
|
|
|
+ <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
|
|
|
+ <result column="TO_THE_STATION_ID" jdbcType="DECIMAL" property="toTheStationId" />
|
|
|
+ <result column="RESULT_PLEASE_NUMBER" jdbcType="DECIMAL" property="resultPleaseNumber" />
|
|
|
+ <result column="RESULT_PLEASE_DATE" jdbcType="TIMESTAMP" property="resultPleaseDate" />
|
|
|
+ <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber" />
|
|
|
+ <result column="RESULT_APPROVE_DATE" jdbcType="TIMESTAMP" property="resultApproveDate" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
+ <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_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY,
|
|
|
+ SUPPLIER_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_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY,
|
|
|
+ t.SUPPLIER_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>
|
|
@@ -61,8 +57,8 @@
|
|
|
<if test="resultCategory != null and resultCategory != ''">
|
|
|
and RESULT_CATEGORY = #{resultCategory}
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- and SHIPPER_ID = #{shipperId}
|
|
|
+ <if test="supplierId != null">
|
|
|
+ and SUPPLIER_ID = #{supplierId}
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
and SEND_STATION_ID = #{sendStationId}
|
|
@@ -122,8 +118,8 @@
|
|
|
<if test="resultCategory != null and resultCategory != ''">
|
|
|
and RESULT_CATEGORY LIKE '%${resultCategory}%'
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- and SHIPPER_ID = #{shipperId}
|
|
|
+ <if test="supplierId != null">
|
|
|
+ and SUPPLIER_ID = #{supplierId}
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
and SEND_STATION_ID = #{sendStationId}
|
|
@@ -167,8 +163,7 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
- delete
|
|
|
- from TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
+ delete from TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
@@ -186,8 +181,8 @@
|
|
|
<if test="resultCategory != null and resultCategory != ''">
|
|
|
or RESULT_CATEGORY = #{resultCategory}
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- or SHIPPER_ID = #{shipperId}
|
|
|
+ <if test="supplierId != null">
|
|
|
+ or SUPPLIER_ID = #{supplierId}
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
or SEND_STATION_ID = #{sendStationId}
|
|
@@ -231,21 +226,18 @@
|
|
|
</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,
|
|
|
- RESULT_PLAN_DATE, RESULT_CATEGORY, SHIPPER_ID,
|
|
|
+ RESULT_PLAN_DATE, RESULT_CATEGORY, SUPPLIER_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)
|
|
|
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},
|
|
|
+ #{resultPlanDate,jdbcType=TIMESTAMP}, #{resultCategory,jdbcType=VARCHAR}, #{supplierId,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},
|
|
|
+ #{resultApproveDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
@@ -266,8 +258,8 @@
|
|
|
<if test="resultCategory != null">
|
|
|
RESULT_CATEGORY,
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- SHIPPER_ID,
|
|
|
+ <if test="supplierId != null">
|
|
|
+ SUPPLIER_ID,
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
SEND_STATION_ID,
|
|
@@ -325,8 +317,8 @@
|
|
|
<if test="resultCategory != null">
|
|
|
#{resultCategory,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- #{shipperId,jdbcType=DECIMAL},
|
|
|
+ <if test="supplierId != null">
|
|
|
+ #{supplierId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
#{sendStationId,jdbcType=DECIMAL},
|
|
@@ -371,24 +363,24 @@
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
|
|
|
update TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
- set RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
|
|
|
+ set RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
|
|
|
RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
- RESULT_PLAN_DATE = #{resultPlanDate,jdbcType=TIMESTAMP},
|
|
|
- RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
|
|
|
- SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
|
|
|
- SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
|
- TO_THE_STATION_ID = #{toTheStationId,jdbcType=DECIMAL},
|
|
|
- RESULT_PLEASE_NUMBER = #{resultPleaseNumber,jdbcType=DECIMAL},
|
|
|
- RESULT_PLEASE_DATE = #{resultPleaseDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_PLAN_DATE = #{resultPlanDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
|
|
|
+ SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL},
|
|
|
+ SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
|
+ TO_THE_STATION_ID = #{toTheStationId,jdbcType=DECIMAL},
|
|
|
+ RESULT_PLEASE_NUMBER = #{resultPleaseNumber,jdbcType=DECIMAL},
|
|
|
+ RESULT_PLEASE_DATE = #{resultPleaseDate,jdbcType=TIMESTAMP},
|
|
|
RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
|
|
|
- RESULT_APPROVE_DATE = #{resultApproveDate,jdbcType=TIMESTAMP},
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- STATUS = #{status,jdbcType=DECIMAL},
|
|
|
- RESULT_TYPE = #{resultType,jdbcType=DECIMAL}
|
|
|
+ RESULT_APPROVE_DATE = #{resultApproveDate,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ 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">
|
|
@@ -406,8 +398,8 @@
|
|
|
<if test="resultCategory != null">
|
|
|
RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="shipperId != null">
|
|
|
- SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
|
|
|
+ <if test="supplierId != null">
|
|
|
+ SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="sendStationId != null">
|
|
|
SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
@@ -452,23 +444,23 @@
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <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
|
|
|
(RESULT_ID,
|
|
|
RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
|
|
|
RESULT_PLAN_DATE, RESULT_CATEGORY,
|
|
|
- SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID,
|
|
|
+ SUPPLIER_ID, SEND_STATION_ID, TO_THE_STATION_ID,
|
|
|
RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
|
|
|
RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE,
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
@@ -480,14 +472,12 @@
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
|
#{item.railPlanId,jdbcType=DECIMAL}, #{item.resultPleasePlanNo,jdbcType=VARCHAR},
|
|
|
#{item.resultPlanDate,jdbcType=TIMESTAMP}, #{item.resultCategory,jdbcType=VARCHAR},
|
|
|
- #{item.shipperId,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL},
|
|
|
- #{item.toTheStationId,jdbcType=DECIMAL},
|
|
|
+ #{item.supplierId,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.toTheStationId,jdbcType=DECIMAL},
|
|
|
#{item.resultPleaseNumber,jdbcType=DECIMAL}, #{item.resultPleaseDate,jdbcType=TIMESTAMP},
|
|
|
#{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},
|
|
|
- #{item.resultType,jdbcType=DECIMAL}
|
|
|
+ #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL}, #{item.resultType,jdbcType=DECIMAL}
|
|
|
from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
@@ -495,90 +485,90 @@
|
|
|
update TMSTRAIN_PLEASE_APPROVE_RESULT
|
|
|
set
|
|
|
RESULT_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <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>
|
|
|
,RAIL_PLAN_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.railPlanId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_PLAN_NO=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleasePlanNo,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,RESULT_PLAN_DATE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPlanDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,RESULT_CATEGORY=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCategory,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
- ,SHIPPER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
|
|
|
+ ,SUPPLIER_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.supplierId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,SEND_STATION_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,TO_THE_STATION_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.toTheStationId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_NUMBER=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseNumber,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_PLEASE_DATE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,RESULT_APPROVE_NUMBER=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveNumber,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,RESULT_APPROVE_DATE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <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 collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <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>
|
|
|
,INSERT_UPDATE_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,STATUS=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
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">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.resultType,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
where RESULT_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ <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_PLEASE_APPROVE_RESULT
|
|
|
where RESULT_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
@@ -597,21 +587,27 @@
|
|
|
t1.RESULT_PLEASE_NUMBER "resultPleaseNumber",
|
|
|
TO_CHAR(t1.RESULT_PLEASE_DATE , 'yyyy-mm-dd')"resultPleaseDate",
|
|
|
TO_CHAR(t1.RESULT_PLAN_DATE, 'yyyy-mm-dd') "resultPlanDate",
|
|
|
- t2.SHIPPER_NAME "shipperName",
|
|
|
+ t2.SUPPLIER_NAME "shipperName",
|
|
|
t3.ARRIVAL_NAME "forwardName",
|
|
|
t4.ARRIVAL_NAME "arrivalName",
|
|
|
t1.RESULT_CATEGORY "resultCategory",
|
|
|
t1.INSERT_USERNAME "insertUserName"
|
|
|
|
|
|
from TMSTRAIN_PLEASE_APPROVE_RESULT t1
|
|
|
- left join RMS_SHIPPER t2
|
|
|
- on t1.SHIPPER_ID = t2.SHIPPER_ID
|
|
|
+ left join RMS_SUPPLIER t2
|
|
|
+ on t1.SUPPLIER_ID = t2.SUPPLIER_ID
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t3
|
|
|
on t1.SEND_STATION_ID = t3.ARRIVAL_ID
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t4
|
|
|
on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
|
|
|
|
|
|
- where t1.STATUS = #{status} and t1.RESULT_TYPE = #{resultType}
|
|
|
+ where t1.RESULT_TYPE = #{resultType}
|
|
|
+ <if test="status == 0">
|
|
|
+ and t1.STATUS = 0
|
|
|
+ </if>
|
|
|
+ <if test="resultType == 1">
|
|
|
+ and t1.RESULT_TYPE in (1, 2)
|
|
|
+ </if>
|
|
|
)
|
|
|
<where>
|
|
|
<if test="resultId != null">
|
|
@@ -713,13 +709,13 @@
|
|
|
t1.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
|
|
|
TO_CHAR(t1.RESULT_APPROVE_DATE, 'yyyy-mm-dd') "resultApproveDate",
|
|
|
t1.RESULT_APPROVE_NUMBER "resultApproveNumber",
|
|
|
- t2.SHIPPER_NAME "shipperName",
|
|
|
+ t2.SUPPLIER_NAME "shipperName",
|
|
|
t1.RESULT_CATEGORY "resultCategory",
|
|
|
t3.ARRIVAL_NAME "forwardName",
|
|
|
t4.ARRIVAL_NAME "arrivalName"
|
|
|
from TMSTRAIN_PLEASE_APPROVE_RESULT t1
|
|
|
- left join RMS_SHIPPER t2
|
|
|
- on t1.SHIPPER_ID = t2.SHIPPER_ID
|
|
|
+ left join RMS_SUPPLIER t2
|
|
|
+ on t1.SUPPLIER_ID = t2.SUPPLIER_ID
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t3
|
|
|
on t1.SEND_STATION_ID = t3.ARRIVAL_ID
|
|
|
left join RMSTRAIN_ARRIVAL_SEND t4
|
|
@@ -793,7 +789,8 @@
|
|
|
<!-- //通过Id查询请车作业 getWagonPleaseById(Integer pleasePlanId);-->
|
|
|
<select id="getWagonPleaseById" parameterType="int" resultType="java.util.Map">
|
|
|
select APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
|
|
|
- APAR.SHIPPER_ID "shipperId",
|
|
|
+ APAR.SUPPLIER_ID "supplierId",
|
|
|
+ RS.SUPPLIER_NAME "supplierName",
|
|
|
APAR.SEND_STATION_ID "sendStationId",
|
|
|
APAR.TO_THE_STATION_ID "toTheStationId",
|
|
|
APAR.RESULT_CATEGORY "resultCategory",
|
|
@@ -805,6 +802,7 @@
|
|
|
APAR.RESULT_APPROVE_DATE "resultApproveDate",
|
|
|
APAR.RESULT_APPROVE_NUMBER "resultApproveNumber"
|
|
|
from TMSTRAIN_PLEASE_APPROVE_RESULT APAR
|
|
|
+ left join RMS_SUPPLIER RS on RS.SUPPLIER_ID = APAR.SUPPLIER_ID
|
|
|
where RESULT_ID = #{resultId}
|
|
|
</select>
|
|
|
|
|
@@ -815,7 +813,7 @@
|
|
|
APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
|
|
|
APAR.RESULT_APPROVE_DATE "resultApproveDate",
|
|
|
APAR.RESULT_APPROVE_NUMBER "resultApproveNumber",
|
|
|
- APAR.SHIPPER_ID "shipperId",
|
|
|
+ APAR.SUPPLIER_ID "supplierId",
|
|
|
APAR.RESULT_CATEGORY "resultCategory",
|
|
|
APAR.SEND_STATION_ID "sendStationId",
|
|
|
APAR.TO_THE_STATION_ID "toTheStationId"
|