|
@@ -31,6 +31,7 @@
|
|
|
<result column="SEND_DATE" jdbcType="VARCHAR" property="sendDate" />
|
|
|
<result column="TEMP_RESULT_ID" jdbcType="DECIMAL" property="tempResultId" />
|
|
|
<result column="ARRIVAL_DATE" jdbcType="VARCHAR" property="arrivalDate" />
|
|
|
+ <result column="GROUP_NO" jdbcType="DECIMAL" property="groupNo" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
@@ -38,7 +39,7 @@
|
|
|
BATCH_ID, RESULT_CLASS, RESULT_LOADING_DATE, RESULT_REMARKS, INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID, ARRIVAL_STATION_ID,
|
|
|
RESULT_TYPE, TRAIN_CALCULATE_ID, UNLOADING_POINT_ID, SEND_UNIT_ID, SEND_REQUEST,
|
|
|
- SEND_DATE, TEMP_RESULT_ID, ARRIVAL_DATE
|
|
|
+ SEND_DATE, TEMP_RESULT_ID, ARRIVAL_DATE, GROUP_NO
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.RESULT_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE,
|
|
@@ -46,7 +47,7 @@
|
|
|
t.BATCH_ID, t.RESULT_CLASS, t.RESULT_LOADING_DATE, t.RESULT_REMARKS, t.INSERT_USERNAME,
|
|
|
t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
|
|
|
t.SEND_STATION_ID, t.ARRIVAL_STATION_ID, t.RESULT_TYPE, t.TRAIN_CALCULATE_ID, t.UNLOADING_POINT_ID,
|
|
|
- t.SEND_UNIT_ID, t.SEND_REQUEST, t.SEND_DATE, t.TEMP_RESULT_ID, t.ARRIVAL_DATE
|
|
|
+ t.SEND_UNIT_ID, t.SEND_REQUEST, t.SEND_DATE, t.TEMP_RESULT_ID, t.ARRIVAL_DATE, t.GROUP_NO
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM TMSTRAIN_LOADING_RESULT
|
|
@@ -143,6 +144,9 @@
|
|
|
<if test="arrivalDate != null and arrivalDate != ''">
|
|
|
and ARRIVAL_DATE = #{arrivalDate}
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ and GROUP_NO = #{groupNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -234,9 +238,12 @@
|
|
|
<if test="arrivalDate != null and arrivalDate != ''">
|
|
|
and ARRIVAL_DATE LIKE '%${arrivalDate}%'
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ and GROUP_NO = #{groupNo}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
delete from TMSTRAIN_LOADING_RESULT
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
@@ -327,6 +334,9 @@
|
|
|
<if test="arrivalDate != null and arrivalDate != ''">
|
|
|
or ARRIVAL_DATE = #{arrivalDate}
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ or GROUP_NO = #{groupNo}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
insert into TMSTRAIN_LOADING_RESULT (RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
|
|
@@ -338,8 +348,8 @@
|
|
|
INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID,
|
|
|
ARRIVAL_STATION_ID, RESULT_TYPE, TRAIN_CALCULATE_ID,
|
|
|
UNLOADING_POINT_ID, SEND_UNIT_ID, SEND_REQUEST,
|
|
|
- SEND_DATE, TEMP_RESULT_ID, ARRIVAL_DATE
|
|
|
- )
|
|
|
+ SEND_DATE, TEMP_RESULT_ID, ARRIVAL_DATE,
|
|
|
+ GROUP_NO)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
|
|
|
#{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
|
|
|
#{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{resultMaterialNumber,jdbcType=DECIMAL},
|
|
@@ -349,8 +359,8 @@
|
|
|
#{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{sendStationId,jdbcType=DECIMAL},
|
|
|
#{arrivalStationId,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL}, #{trainCalculateId,jdbcType=DECIMAL},
|
|
|
#{unloadingPointId,jdbcType=DECIMAL}, #{sendUnitId,jdbcType=DECIMAL}, #{sendRequest,jdbcType=DECIMAL},
|
|
|
- #{sendDate,jdbcType=VARCHAR}, #{tempResultId,jdbcType=DECIMAL}, #{arrivalDate,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
+ #{sendDate,jdbcType=VARCHAR}, #{tempResultId,jdbcType=DECIMAL}, #{arrivalDate,jdbcType=VARCHAR},
|
|
|
+ #{groupNo,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
insert into TMSTRAIN_LOADING_RESULT
|
|
@@ -442,6 +452,9 @@
|
|
|
<if test="arrivalDate != null">
|
|
|
ARRIVAL_DATE,
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ GROUP_NO,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -531,6 +544,9 @@
|
|
|
<if test="arrivalDate != null">
|
|
|
#{arrivalDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ #{groupNo,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
@@ -562,7 +578,8 @@
|
|
|
SEND_REQUEST = #{sendRequest,jdbcType=DECIMAL},
|
|
|
SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
TEMP_RESULT_ID = #{tempResultId,jdbcType=DECIMAL},
|
|
|
- ARRIVAL_DATE = #{arrivalDate,jdbcType=VARCHAR}
|
|
|
+ ARRIVAL_DATE = #{arrivalDate,jdbcType=VARCHAR},
|
|
|
+ GROUP_NO = #{groupNo,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
@@ -652,10 +669,13 @@
|
|
|
<if test="arrivalDate != null">
|
|
|
ARRIVAL_DATE = #{arrivalDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="groupNo != null">
|
|
|
+ GROUP_NO = #{groupNo,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -682,7 +702,7 @@
|
|
|
RESULT_TYPE, TRAIN_CALCULATE_ID,
|
|
|
UNLOADING_POINT_ID, SEND_UNIT_ID,
|
|
|
SEND_REQUEST, SEND_DATE, TEMP_RESULT_ID,
|
|
|
- ARRIVAL_DATE)
|
|
|
+ ARRIVAL_DATE, GROUP_NO)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -698,7 +718,7 @@
|
|
|
#{item.resultType,jdbcType=DECIMAL}, #{item.trainCalculateId,jdbcType=DECIMAL},
|
|
|
#{item.unloadingPointId,jdbcType=DECIMAL}, #{item.sendUnitId,jdbcType=DECIMAL},
|
|
|
#{item.sendRequest,jdbcType=DECIMAL}, #{item.sendDate,jdbcType=VARCHAR}, #{item.tempResultId,jdbcType=DECIMAL},
|
|
|
- #{item.arrivalDate,jdbcType=VARCHAR} from dual
|
|
|
+ #{item.arrivalDate,jdbcType=VARCHAR}, #{item.groupNo,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -820,6 +840,10 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalDate,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,GROUP_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.groupNo,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -1616,7 +1640,9 @@
|
|
|
and db.RESULT_FOREIGN_SHIP_NAME is not null
|
|
|
and rsu.SUPPLIER_NAME is not null
|
|
|
<if test="materialName != null and materialName!=''.toString()" >
|
|
|
- and rm.MATERIAL_NAME like concat(concat('%',#{materialName}),'%')
|
|
|
+ and (rm.MATERIAL_NAME like concat(concat('%',#{materialName}),'%')
|
|
|
+ or apo.PURCHASE_ORDER_NO like concat(concat('%',#{materialName}),'%')
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="resultForeignShipName != null and resultForeignShipName!=''.toString()">
|
|
|
and db.RESULT_FOREIGN_SHIP_NAME like concat(concat('%',#{resultForeignShipName}),'%')
|