|
@@ -29,22 +29,24 @@
|
|
|
<result column="SEND_UNIT_ID" jdbcType="DECIMAL" property="sendUnitId" />
|
|
|
<result column="SEND_REQUEST" jdbcType="DECIMAL" property="sendRequest" />
|
|
|
<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" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
|
- RESULT_ISCLEAR, CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER, RESULT_MATERIAL_THEORYWEIGHT,
|
|
|
- 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
|
|
|
+ RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE,
|
|
|
+ RESULT_ISCLEAR, CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER, RESULT_MATERIAL_THEORYWEIGHT,
|
|
|
+ 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
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE,
|
|
|
- t.RESULT_ISCLEAR, t.CAPACITY_ID, t.MATERIAL_ID, t.RESULT_MATERIAL_NUMBER, t.RESULT_MATERIAL_THEORYWEIGHT,
|
|
|
- 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.RESULT_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE,
|
|
|
+ t.RESULT_ISCLEAR, t.CAPACITY_ID, t.MATERIAL_ID, t.RESULT_MATERIAL_NUMBER, t.RESULT_MATERIAL_THEORYWEIGHT,
|
|
|
+ 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
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM TMSTRAIN_LOADING_RESULT
|
|
@@ -53,7 +55,7 @@
|
|
|
SELECT <include refid="columns_alias" /> FROM TMSTRAIN_LOADING_RESULT t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="resultId != null">
|
|
|
and RESULT_ID = #{resultId}
|
|
|
</if>
|
|
@@ -132,13 +134,19 @@
|
|
|
<if test="sendRequest != null">
|
|
|
and SEND_REQUEST = #{sendRequest}
|
|
|
</if>
|
|
|
- <if test="sendDate != null">
|
|
|
- and TO_CHAR(SEND_DATE,'yyyy-MM-dd') = #{sendDate}
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ and SEND_DATE = #{sendDate}
|
|
|
+ </if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ and TEMP_RESULT_ID = #{tempResultId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null and arrivalDate != ''">
|
|
|
+ and ARRIVAL_DATE = #{arrivalDate}
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="resultId != null">
|
|
|
and RESULT_ID = #{resultId}
|
|
|
</if>
|
|
@@ -217,118 +225,132 @@
|
|
|
<if test="sendRequest != null">
|
|
|
and SEND_REQUEST = #{sendRequest}
|
|
|
</if>
|
|
|
- <if test="sendDate != null">
|
|
|
- and TO_CHAR(SEND_DATE,'yyyy-MM-dd') = #{sendDate}
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ and SEND_DATE LIKE '%${sendDate}%'
|
|
|
+ </if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ and TEMP_RESULT_ID = #{tempResultId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null and arrivalDate != ''">
|
|
|
+ and ARRIVAL_DATE LIKE '%${arrivalDate}%'
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
delete from TMSTRAIN_LOADING_RESULT
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
delete from TMSTRAIN_LOADING_RESULT
|
|
|
- where 1!=1
|
|
|
- <if test="purchaseOrderRailPlanId != null">
|
|
|
- or PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
|
|
|
- </if>
|
|
|
- <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
- or RESULT_WAGON_NO = #{resultWagonNo}
|
|
|
- </if>
|
|
|
- <if test="resultBillableTonnage != null">
|
|
|
- or RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
- </if>
|
|
|
- <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
- or RESULT_ISCLEAR = #{resultIsclear}
|
|
|
- </if>
|
|
|
- <if test="capacityId != null">
|
|
|
- or CAPACITY_ID = #{capacityId}
|
|
|
- </if>
|
|
|
- <if test="materialId != null">
|
|
|
- or MATERIAL_ID = #{materialId}
|
|
|
- </if>
|
|
|
- <if test="resultMaterialNumber != null">
|
|
|
- or RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
|
|
|
- </if>
|
|
|
- <if test="resultMaterialTheoryweight != null">
|
|
|
- or RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
|
|
|
- </if>
|
|
|
- <if test="batchId != null">
|
|
|
- or BATCH_ID = #{batchId}
|
|
|
- </if>
|
|
|
- <if test="resultClass != null and resultClass != ''">
|
|
|
- or RESULT_CLASS = #{resultClass}
|
|
|
- </if>
|
|
|
- <if test="resultLoadingDate != null">
|
|
|
- or TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = '#{resultLoadingDate}'
|
|
|
- </if>
|
|
|
- <if test="resultRemarks != null and resultRemarks != ''">
|
|
|
- or RESULT_REMARKS = #{resultRemarks}
|
|
|
- </if>
|
|
|
- <if test="insertUsername != null and insertUsername != ''">
|
|
|
- or INSERT_USERNAME = #{insertUsername}
|
|
|
- </if>
|
|
|
- <if test="insertTime != null">
|
|
|
- or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
- </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>
|
|
|
- <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
- or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
- </if>
|
|
|
- <if test="deleted != null">
|
|
|
- or DELETED = #{deleted}
|
|
|
- </if>
|
|
|
- <if test="sendStationId != null">
|
|
|
- or SEND_STATION_ID = #{sendStationId}
|
|
|
- </if>
|
|
|
- <if test="arrivalStationId != null">
|
|
|
- or ARRIVAL_STATION_ID = #{arrivalStationId}
|
|
|
- </if>
|
|
|
- <if test="resultType != null">
|
|
|
- or RESULT_TYPE = #{resultType}
|
|
|
- </if>
|
|
|
- <if test="trainCalculateId != null">
|
|
|
- or TRAIN_CALCULATE_ID = #{trainCalculateId}
|
|
|
- </if>
|
|
|
- <if test="unloadingPointId != null">
|
|
|
- or UNLOADING_POINT_ID = #{unloadingPointId}
|
|
|
- </if>
|
|
|
- <if test="sendUnitId != null">
|
|
|
- or SEND_UNIT_ID = #{sendUnitId}
|
|
|
- </if>
|
|
|
- <if test="sendRequest != null">
|
|
|
- or SEND_REQUEST = #{sendRequest}
|
|
|
- </if>
|
|
|
- <if test="sendDate != null">
|
|
|
- or TO_CHAR(SEND_DATE,'yyyy-MM-dd') = '#{sendDate}'
|
|
|
- </if>
|
|
|
+ where 1!=1
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ or PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ or RESULT_WAGON_NO = #{resultWagonNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ or RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ or RESULT_ISCLEAR = #{resultIsclear}
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ or CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ or RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ or RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ or BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null and resultClass != ''">
|
|
|
+ or RESULT_CLASS = #{resultClass}
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ or TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = '#{resultLoadingDate}'
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null and resultRemarks != ''">
|
|
|
+ or RESULT_REMARKS = #{resultRemarks}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ or INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
|
|
|
+ </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>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ or DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ or SEND_STATION_ID = #{sendStationId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ or ARRIVAL_STATION_ID = #{arrivalStationId}
|
|
|
+ </if>
|
|
|
+ <if test="resultType != null">
|
|
|
+ or RESULT_TYPE = #{resultType}
|
|
|
+ </if>
|
|
|
+ <if test="trainCalculateId != null">
|
|
|
+ or TRAIN_CALCULATE_ID = #{trainCalculateId}
|
|
|
+ </if>
|
|
|
+ <if test="unloadingPointId != null">
|
|
|
+ or UNLOADING_POINT_ID = #{unloadingPointId}
|
|
|
+ </if>
|
|
|
+ <if test="sendUnitId != null">
|
|
|
+ or SEND_UNIT_ID = #{sendUnitId}
|
|
|
+ </if>
|
|
|
+ <if test="sendRequest != null">
|
|
|
+ or SEND_REQUEST = #{sendRequest}
|
|
|
+ </if>
|
|
|
+ <if test="sendDate != null and sendDate != ''">
|
|
|
+ or SEND_DATE = #{sendDate}
|
|
|
+ </if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ or TEMP_RESULT_ID = #{tempResultId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null and arrivalDate != ''">
|
|
|
+ or ARRIVAL_DATE = #{arrivalDate}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
- insert into TMSTRAIN_LOADING_RESULT (RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
|
|
|
- RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
|
|
|
- CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
|
|
|
- RESULT_MATERIAL_THEORYWEIGHT, 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)
|
|
|
- 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},
|
|
|
- #{resultMaterialTheoryweight,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultClass,jdbcType=VARCHAR},
|
|
|
- #{resultLoadingDate,jdbcType=TIMESTAMP}, #{resultRemarks,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
|
|
|
- #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{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})
|
|
|
+ insert into TMSTRAIN_LOADING_RESULT (RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
|
|
|
+ RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
|
|
|
+ CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
|
|
|
+ RESULT_MATERIAL_THEORYWEIGHT, 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
|
|
|
+ )
|
|
|
+ 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},
|
|
|
+ #{resultMaterialTheoryweight,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultClass,jdbcType=VARCHAR},
|
|
|
+ #{resultLoadingDate,jdbcType=TIMESTAMP}, #{resultRemarks,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{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}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
insert into TMSTRAIN_LOADING_RESULT
|
|
@@ -414,6 +436,12 @@
|
|
|
<if test="sendDate != null">
|
|
|
SEND_DATE,
|
|
|
</if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ TEMP_RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null">
|
|
|
+ ARRIVAL_DATE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -497,36 +525,44 @@
|
|
|
<if test="sendDate != null">
|
|
|
#{sendDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ #{tempResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null">
|
|
|
+ #{arrivalDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
update TMSTRAIN_LOADING_RESULT
|
|
|
set PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
|
|
|
- RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
- RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
- RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
|
|
|
- CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
|
|
|
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
- RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
- RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
|
|
|
- BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
- RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
|
|
|
- RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
- RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
|
|
|
- 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},
|
|
|
- DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
- SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
|
- ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL},
|
|
|
- RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
|
|
|
- TRAIN_CALCULATE_ID = #{trainCalculateId,jdbcType=DECIMAL},
|
|
|
- UNLOADING_POINT_ID = #{unloadingPointId,jdbcType=DECIMAL},
|
|
|
- SEND_UNIT_ID = #{sendUnitId,jdbcType=DECIMAL},
|
|
|
- SEND_REQUEST = #{sendRequest,jdbcType=DECIMAL},
|
|
|
- SEND_DATE = #{sendDate,jdbcType=VARCHAR}
|
|
|
+ RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
+ RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
+ RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
|
|
|
+ RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
+ RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
|
|
|
+ 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},
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
|
+ ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL},
|
|
|
+ RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
|
|
|
+ TRAIN_CALCULATE_ID = #{trainCalculateId,jdbcType=DECIMAL},
|
|
|
+ UNLOADING_POINT_ID = #{unloadingPointId,jdbcType=DECIMAL},
|
|
|
+ SEND_UNIT_ID = #{sendUnitId,jdbcType=DECIMAL},
|
|
|
+ SEND_REQUEST = #{sendRequest,jdbcType=DECIMAL},
|
|
|
+ SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
+ TEMP_RESULT_ID = #{tempResultId,jdbcType=DECIMAL},
|
|
|
+ ARRIVAL_DATE = #{arrivalDate,jdbcType=VARCHAR}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
@@ -610,10 +646,16 @@
|
|
|
<if test="sendDate != null">
|
|
|
SEND_DATE = #{sendDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="tempResultId != null">
|
|
|
+ TEMP_RESULT_ID = #{tempResultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalDate != null">
|
|
|
+ ARRIVAL_DATE = #{arrivalDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -626,163 +668,172 @@
|
|
|
<include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
- insert into TMSTRAIN_LOADING_RESULT
|
|
|
- (RESULT_ID,
|
|
|
- PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO,
|
|
|
- RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
|
|
|
- CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
|
|
|
- RESULT_MATERIAL_THEORYWEIGHT, 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)
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
- select
|
|
|
- #{item.resultId,jdbcType=DECIMAL},
|
|
|
- #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}, #{item.resultWagonNo,jdbcType=VARCHAR},
|
|
|
- #{item.resultBillableTonnage,jdbcType=DECIMAL}, #{item.resultIsclear,jdbcType=VARCHAR},
|
|
|
- #{item.capacityId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
- #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
|
|
|
- #{item.resultClass,jdbcType=VARCHAR}, #{item.resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
- #{item.resultRemarks,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{item.deleted,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.arrivalStationId,jdbcType=DECIMAL},
|
|
|
- #{item.resultType,jdbcType=DECIMAL}, #{item.trainCalculateId,jdbcType=DECIMAL},
|
|
|
- #{item.unloadingPointId,jdbcType=DECIMAL}, #{item.sendUnitId,jdbcType=DECIMAL},
|
|
|
- #{item.sendRequest,jdbcType=DECIMAL}, #{item.sendDate,jdbcType=VARCHAR} from dual
|
|
|
- </foreach> )
|
|
|
+ insert into TMSTRAIN_LOADING_RESULT
|
|
|
+ (RESULT_ID,
|
|
|
+ PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO,
|
|
|
+ RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
|
|
|
+ CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
|
|
|
+ RESULT_MATERIAL_THEORYWEIGHT, 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)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.resultId,jdbcType=DECIMAL},
|
|
|
+ #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}, #{item.resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ #{item.resultBillableTonnage,jdbcType=DECIMAL}, #{item.resultIsclear,jdbcType=VARCHAR},
|
|
|
+ #{item.capacityId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
+ #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
|
|
|
+ #{item.resultClass,jdbcType=VARCHAR}, #{item.resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
+ #{item.resultRemarks,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ #{item.deleted,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.arrivalStationId,jdbcType=DECIMAL},
|
|
|
+ #{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
|
|
|
+ </foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
- update TMSTRAIN_LOADING_RESULT
|
|
|
- set
|
|
|
- RESULT_ID=
|
|
|
- <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>
|
|
|
- ,PURCHASE_ORDER_RAIL_PLAN_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_WAGON_NO=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,RESULT_BILLABLE_TONNAGE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_ISCLEAR=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,CAPACITY_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,MATERIAL_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_MATERIAL_NUMBER=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialNumber,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_MATERIAL_THEORYWEIGHT=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,BATCH_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_CLASS=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClass,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,RESULT_LOADING_DATE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadingDate,jdbcType=TIMESTAMP}
|
|
|
- </foreach>
|
|
|
- ,RESULT_REMARKS=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRemarks,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- ,INSERT_USERNAME=
|
|
|
- <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 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 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>
|
|
|
- ,INSERT_UPDATE_REMARK=
|
|
|
- <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>
|
|
|
- ,DELETED=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,SEND_STATION_ID=
|
|
|
- <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>
|
|
|
- ,ARRIVAL_STATION_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStationId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,RESULT_TYPE=
|
|
|
- <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>
|
|
|
- ,TRAIN_CALCULATE_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.trainCalculateId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,UNLOADING_POINT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadingPointId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,SEND_UNIT_ID=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendUnitId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,SEND_REQUEST=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendRequest,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
- ,SEND_DATE=
|
|
|
- <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
- when #{item.resultId,jdbcType=DECIMAL} then #{item.sendDate,jdbcType=VARCHAR}
|
|
|
- </foreach>
|
|
|
- where RESULT_ID in
|
|
|
- <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
- #{item.resultId,jdbcType=DECIMAL}
|
|
|
- </foreach>
|
|
|
+ update TMSTRAIN_LOADING_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <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>
|
|
|
+ ,PURCHASE_ORDER_RAIL_PLAN_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_WAGON_NO=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_BILLABLE_TONNAGE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ISCLEAR=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CAPACITY_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_MATERIAL_NUMBER=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_MATERIAL_THEORYWEIGHT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,BATCH_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_CLASS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClass,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_LOADING_DATE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadingDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_REMARKS=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRemarks,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <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 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 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>
|
|
|
+ ,INSERT_UPDATE_REMARK=
|
|
|
+ <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>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_STATION_ID=
|
|
|
+ <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>
|
|
|
+ ,ARRIVAL_STATION_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStationId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_TYPE=
|
|
|
+ <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>
|
|
|
+ ,TRAIN_CALCULATE_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.trainCalculateId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,UNLOADING_POINT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadingPointId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_UNIT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.sendUnitId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_REQUEST=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.sendRequest,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_DATE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.sendDate,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,TEMP_RESULT_ID=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.tempResultId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,ARRIVAL_DATE=
|
|
|
+ <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>
|
|
|
+ where RESULT_ID in
|
|
|
+ <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_LOADING_RESULT
|
|
|
- where RESULT_ID in
|
|
|
+ where RESULT_ID in
|
|
|
<foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<!-- 友情提示!!!-->
|
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
-
|
|
|
<select id="getTmsWagonLoadInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
|
|
|
select * from(
|
|
|
select t_load.RESULT_ID "resultId",
|
|
@@ -909,33 +960,30 @@
|
|
|
select *
|
|
|
from (
|
|
|
SELECT
|
|
|
- TLR.RESULT_WAGON_NO "resultWagonNo",
|
|
|
- TLR.RESULT_ID "resultId",
|
|
|
- TLR.UNLOADING_POINT_ID "unloadingPointId",
|
|
|
- RW.WAREHOUSE_NAME "warehouseName",
|
|
|
- to_char( TLR.RESULT_LOADING_DATE, 'yyyy-mm-dd' ) "resultLoadingDate",
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ TLT.RESULT_WAGON_NO "resultWagonNo",
|
|
|
+ TLR2.RESULT_ID "resultId",
|
|
|
APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
RM.MATERIAL_NAME "materialName",
|
|
|
APO.PURCHASE_ORDER_ID "purchaseOrderId",
|
|
|
DBI.INFACTORY_SHIP_NAME "infactoryShipName",
|
|
|
DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
|
|
|
- TWR.RESULT_GROSS_WEIGHT "grossWeight",
|
|
|
- TWR.RESULT_TARE_WEIGHT "tareWeight"
|
|
|
+ WOR.INSERT_TIME "insertTime",
|
|
|
+ TTR.TOTAL_RESULT_ID "totalResultId"
|
|
|
FROM
|
|
|
- TMSTRAIN_LOADING_RESULT TLR
|
|
|
- LEFT JOIN AMS_PURCHASE_ORDER APO ON APO.PURCHASE_ORDER_ID = TLR.PURCHASE_ORDER_RAIL_PLAN_ID
|
|
|
+ TMSTRAIN_LOADING_TEMP TLT
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER APO ON APO.PURCHASE_ORDER_NO = TLT.PURCHASE_ORDER_NO
|
|
|
LEFT JOIN DIL_BATCH DB ON DB.BATCH_ID = APO.BATCH_ID
|
|
|
LEFT JOIN DIL_BATCH_INFACOTRY DBI ON DBI.BATCH_ID = DB.BATCH_ID
|
|
|
+ left join TMSTRAIN_LOADING_RESULT TLR2 ON TLR2.TEMP_RESULT_ID=TLT.RESULT_ID
|
|
|
LEFT JOIN RMS_MATERIAL RM ON DB.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
- LEFT JOIN RMS_WAREHOUSE RW ON RW.WAREHOUSE_ID = TLR.UNLOADING_POINT_ID
|
|
|
- LEFT JOIN TMSTRAIN_TOTAL_RESULT TTR ON TTR.LOADING_ID = TLR.RESULT_ID
|
|
|
- LEFT JOIN TMSTRAIN_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.TOTAL_RESULT_ID
|
|
|
- WHERE
|
|
|
- TLR.DELETED NOT IN ( 2, 1 )
|
|
|
- AND TLR.RESULT_TYPE = #{resultType}
|
|
|
- AND TLR.PURCHASE_ORDER_RAIL_PLAN_ID IS NOT NULL
|
|
|
- AND TWR.RESULT_NET_WEIGHT IS NOT NULL
|
|
|
+ left join WMSH_OUTBOUND_RESULT WOR ON TLT.OUTBOUNT_ID = WOR.RESULT_ID
|
|
|
+ left join TMSTRAIN_TOTAL_RESULT TTR ON TLR2.RESULT_ID = TTR.LOADING_ID
|
|
|
+ WHERE TLR2.SEND_REQUEST = 1 AND TLR2.DELETED not in (1,2)
|
|
|
+ )
|
|
|
<if test="wagon!=null and wagon!=''.toString()">
|
|
|
and TLR.RESULT_WAGON_NO like concat('%',concat(#{wagon},'%'))
|
|
|
</if>
|
|
@@ -948,7 +996,7 @@
|
|
|
)
|
|
|
<include refid="orderBy"></include>
|
|
|
<if test="orderField == null ">
|
|
|
- order by "resultLoadingDate" desc
|
|
|
+ order by "insertTime" desc
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -1306,25 +1354,25 @@
|
|
|
order by "resultId"
|
|
|
</select>
|
|
|
|
|
|
-<!-- 根据发站名查发站id-->
|
|
|
+ <!-- 根据发站名查发站id-->
|
|
|
<select id="getSendStationId" parameterType="java.lang.String" resultType="java.math.BigDecimal">
|
|
|
SELECT ARRIVAL_ID
|
|
|
FROM RMSTRAIN_ARRIVAL_SEND
|
|
|
WHERE ARRIVAL_NAME=#{sendStationName}
|
|
|
</select>
|
|
|
|
|
|
-<!-- 获取最大发站id-->
|
|
|
+ <!-- 获取最大发站id-->
|
|
|
<select id="getMaxSendStationId" resultType="java.math.BigDecimal">
|
|
|
SELECT MAX(ARRIVAL_ID) FROM RMSTRAIN_ARRIVAL_SEND
|
|
|
</select>
|
|
|
|
|
|
-<!-- 添加发站-->
|
|
|
+ <!-- 添加发站-->
|
|
|
<insert id="addSendStation" parameterType="java.util.Map">
|
|
|
INSERT INTO RMSTRAIN_ARRIVAL_SEND
|
|
|
- (ARRIVAL_ID,ARRIVAL_NAME,INSERT_TIME,UPDATE_TIME)
|
|
|
- VALUES(#{arrivalId}, #{arrivalName},#{insertTime},#{updateTime})
|
|
|
+ (ARRIVAL_ID,ARRIVAL_NAME,INSERT_TIME,UPDATE_TIME)
|
|
|
+ VALUES(#{arrivalId}, #{arrivalName},#{insertTime},#{updateTime})
|
|
|
</insert>
|
|
|
-<!-- 国产矿查询采购订单号-->
|
|
|
+ <!-- 国产矿查询采购订单号-->
|
|
|
<select id="getPurchaseOrderList" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
*
|
|
@@ -1365,24 +1413,24 @@
|
|
|
and db.RESULT_FOREIGN_SHIP_NAME is not null
|
|
|
and rsu.SUPPLIER_NAME is not null
|
|
|
<if test="materialName==null and resultForeignShipName==null and productName==null">
|
|
|
- and apo.PURCHASE_ORDER_NO is null
|
|
|
+ and apo.PURCHASE_ORDER_NO is null
|
|
|
</if>
|
|
|
<if test="materialName != null and materialName!=''.toString()" >
|
|
|
- and (
|
|
|
- apo.PURCHASE_ORDER_NO like concat(concat('%',#{materialName}),'%')
|
|
|
- or rm.MATERIAL_NAME like concat(concat('%',#{materialName}),'%')
|
|
|
- )
|
|
|
+ and (
|
|
|
+ apo.PURCHASE_ORDER_NO like concat(concat('%',#{materialName}),'%')
|
|
|
+ or rm.MATERIAL_NAME like concat(concat('%',#{materialName}),'%')
|
|
|
+ )
|
|
|
</if>
|
|
|
<if test="resultForeignShipName != null and resultForeignShipName!=''.toString()">
|
|
|
- and db.RESULT_FOREIGN_SHIP_NAME like concat(concat('%',#{resultForeignShipName}),'%')
|
|
|
+ and db.RESULT_FOREIGN_SHIP_NAME like concat(concat('%',#{resultForeignShipName}),'%')
|
|
|
</if>
|
|
|
<if test="productName!=null and productName!=''.toString()">
|
|
|
and INSTR(#{productName},rm.MATERIAL_NAME) > 0
|
|
|
<if test="supplierName ==null or supplierName==''.toString">
|
|
|
- and INSTR(#{productName}, rsu.SUPPLIER_NAME) > 0
|
|
|
+ and INSTR(#{productName}, rsu.SUPPLIER_NAME) > 0
|
|
|
</if>
|
|
|
<if test="supplierName !=null and supplierName!=''.toString">
|
|
|
- and INSTR(rsu.SUPPLIER_NAME,#{supplierName}) > 0
|
|
|
+ and INSTR(rsu.SUPPLIER_NAME,#{supplierName}) > 0
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="unloadPoint!=null and unloadPoint!=''.toString()">
|
|
@@ -1396,7 +1444,7 @@
|
|
|
)
|
|
|
</select>
|
|
|
|
|
|
-<!-- 进口矿查询采购订单号-->
|
|
|
+ <!-- 进口矿查询采购订单号-->
|
|
|
<select id="getPurchaseOrderListForImported" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
SELECT
|
|
|
apo.INSERT_TIME as "insertTime",
|
|
@@ -1445,12 +1493,12 @@
|
|
|
ORDER BY apo.PURCHASE_ORDER_DATE DESC
|
|
|
</select>
|
|
|
|
|
|
-<!-- 国产矿查询分割符-->
|
|
|
+ <!-- 国产矿查询分割符-->
|
|
|
<select id="findSplitsForDomestic" resultType="java.lang.String">
|
|
|
select SPLIT_WORDS from TMSTRAIN_SPLIT where SPLIT_TYPE='国产矿'
|
|
|
</select>
|
|
|
|
|
|
-<!-- 进口矿查询分割符-->
|
|
|
+ <!-- 进口矿查询分割符-->
|
|
|
<select id="findSplitsForImported" resultType="java.lang.String">
|
|
|
select SPLIT_WORDS from TMSTRAIN_SPLIT where SPLIT_TYPE='进口矿'
|
|
|
</select>
|
|
@@ -1465,6 +1513,58 @@
|
|
|
<select id="getGridIdByPortAndBatch" resultType="java.math.BigDecimal" parameterType="java.util.Map">
|
|
|
select WGM.GM_ID "gmId"
|
|
|
from WMSH_GRID_MATERIAL WGM
|
|
|
- WHERE WGM.PORT_ID=#{portId} AND WGM.BATCH_ID = #{batchId}
|
|
|
+ WHERE WGM.PORT_ID=#{portId} AND WGM.BATCH_ID = #{batchId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询没有装车实绩状态为resultType为1-进口矿-->
|
|
|
+ <select id="getResultType" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select DB.RESULT_FOREIGN_SHIP_NAME "foreignShipName",
|
|
|
+ RM.MATERIAL_NAME "materialName",
|
|
|
+ TLT.RESULT_WAGON_NO "wagonNo",
|
|
|
+ TLT.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
+ TLT.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
|
|
|
+ TLT.RESULT_ID "tempResultId",
|
|
|
+ WOR.INSERT_TIME "updateTime",
|
|
|
+ DB.BATCH_ID "batchId",
|
|
|
+ APO.PURCHASE_ORDER_ID "purchaseId",
|
|
|
+ RM.MATERIAL_ID "materialId",
|
|
|
+ APO.SUPPLIER_UNIT_ID "supplierUnitId"
|
|
|
+ from
|
|
|
+ TMSTRAIN_LOADING_TEMP TLT
|
|
|
+ left join WMSH_OUTBOUND_RESULT WOR
|
|
|
+ ON WOR.RESULT_ID=TLT.OUTBOUNT_ID
|
|
|
+ LEFT JOIN DIL_BATCH DB
|
|
|
+ ON DB.BATCH_ID=WOR.BATCH_ID
|
|
|
+ LEFT JOIN RMS_MATERIAL RM
|
|
|
+ ON DB.MATERIAL_ID=RM.MATERIAL_ID
|
|
|
+ left join AMS_PURCHASE_ORDER APO
|
|
|
+ ON APO.PURCHASE_ORDER_NO = TLT.PURCHASE_ORDER_NO
|
|
|
+ where not exists (
|
|
|
+ select *
|
|
|
+ from TMSTRAIN_LOADING_RESULT TLR
|
|
|
+ where TLR.TEMP_RESULT_ID=TLT.RESULT_ID
|
|
|
+ and TLR.RESULT_TYPE = 1
|
|
|
+ )
|
|
|
+ <if test="con!=null">
|
|
|
+ and (instr(TLT.RESULT_WAGON_NO,#{con})>0 or instr(TLT.PURCHASE_ORDER_NO,#{con})>0 or instr(RM.MATERIAL_NAME,#{con}) > 0 or instr(DB.RESULT_FOREIGN_SHIP_NAME,#{con}) > 0 )
|
|
|
+ </if>
|
|
|
+ ORDER BY TLT.RESULT_ID asc
|
|
|
+ </select>
|
|
|
+ <!-- 查找最近使用的采购订单号-->
|
|
|
+ <select id="selectPurchaseOrderNo" resultType="java.util.Map" parameterType="java.util.Map">
|
|
|
+ select
|
|
|
+ TLT.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
+ DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName"
|
|
|
+ from TMSTRAIN_LOADING_TEMP TLT
|
|
|
+ LEFT JOIN AMS_PURCHASE_ORDER APO
|
|
|
+ ON APO.PURCHASE_ORDER_NO = TLT.PURCHASE_ORDER_NO
|
|
|
+ LEFT JOIN DIL_BATCH DB
|
|
|
+ ON DB.BATCH_ID = APO.BATCH_ID
|
|
|
+ </select>
|
|
|
+<!-- 根据到站id获取到站名称-->
|
|
|
+ <select id="getArrivalName" resultType="java.lang.String" parameterType="java.math.BigDecimal">
|
|
|
+ select RAS.ARRIVAL_NAME "arrivelStationName"
|
|
|
+ from RMSTRAIN_ARRIVAL_SEND RAS
|
|
|
+ WHERE RAS.ARRIVAL_ID = #{arrivalStationId}
|
|
|
</select>
|
|
|
</mapper>
|