|
@@ -0,0 +1,824 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.steerinfo.dil.mapper.TmstrainLoadingResultMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
+ <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
|
|
|
+ <result column="PURCHASE_ORDER_RAIL_PLAN_ID" jdbcType="DECIMAL" property="purchaseOrderRailPlanId" />
|
|
|
+ <result column="RESULT_WAGON_NO" jdbcType="VARCHAR" property="resultWagonNo" />
|
|
|
+ <result column="RESULT_BILLABLE_TONNAGE" jdbcType="DECIMAL" property="resultBillableTonnage" />
|
|
|
+ <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear" />
|
|
|
+ <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
|
|
|
+ <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
|
+ <result column="RESULT_MATERIAL_NUMBER" jdbcType="DECIMAL" property="resultMaterialNumber" />
|
|
|
+ <result column="RESULT_MATERIAL_THEORYWEIGHT" jdbcType="DECIMAL" property="resultMaterialTheoryweight" />
|
|
|
+ <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
|
|
|
+ <result column="RESULT_CLASS" jdbcType="VARCHAR" property="resultClass" />
|
|
|
+ <result column="RESULT_LOADING_DATE" jdbcType="TIMESTAMP" property="resultLoadingDate" />
|
|
|
+ <result column="RESULT_REMARKS" jdbcType="VARCHAR" property="resultRemarks" />
|
|
|
+ <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="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
+ <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
|
|
|
+ <result column="ARRIVAL_STATION_ID" jdbcType="DECIMAL" property="arrivalStationId" />
|
|
|
+ </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
|
|
|
+ </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
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM TMSTRAIN_LOADING_RESULT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM TMSTRAIN_LOADING_RESULT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ and RESULT_WAGON_NO = #{resultWagonNo}
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ and RESULT_ISCLEAR = #{resultIsclear}
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ and CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null and resultClass != ''">
|
|
|
+ and RESULT_CLASS = #{resultClass}
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null and resultRemarks != ''">
|
|
|
+ and RESULT_REMARKS = #{resultRemarks}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ and DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ and SEND_STATION_ID = #{sendStationId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ and ARRIVAL_STATION_ID = #{arrivalStationId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="resultId != null">
|
|
|
+ and RESULT_ID = #{resultId}
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null and resultWagonNo != ''">
|
|
|
+ and RESULT_WAGON_NO LIKE '%${resultWagonNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null and resultIsclear != ''">
|
|
|
+ and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ and CAPACITY_ID = #{capacityId}
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ and MATERIAL_ID = #{materialId}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ and BATCH_ID = #{batchId}
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null and resultClass != ''">
|
|
|
+ and RESULT_CLASS LIKE '%${resultClass}%'
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null and resultRemarks != ''">
|
|
|
+ and RESULT_REMARKS LIKE '%${resultRemarks}%'
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and INSERT_USERNAME LIKE '%${insertUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and UPDATE_USERNAME LIKE '%${updateUsername}%'
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ and DELETED = #{deleted}
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ and SEND_STATION_ID = #{sendStationId}
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ and ARRIVAL_STATION_ID = #{arrivalStationId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ 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>
|
|
|
+ </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)
|
|
|
+ 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})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
+ insert into TMSTRAIN_LOADING_RESULT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ RESULT_ID,
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ PURCHASE_ORDER_RAIL_PLAN_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ RESULT_WAGON_NO,
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ RESULT_BILLABLE_TONNAGE,
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ RESULT_ISCLEAR,
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ CAPACITY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ MATERIAL_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ RESULT_MATERIAL_NUMBER,
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ RESULT_MATERIAL_THEORYWEIGHT,
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID,
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null">
|
|
|
+ RESULT_CLASS,
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ RESULT_LOADING_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null">
|
|
|
+ RESULT_REMARKS,
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK,
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED,
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ SEND_STATION_ID,
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ ARRIVAL_STATION_ID,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="resultId != null">
|
|
|
+ #{resultId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ #{capacityId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ #{materialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ #{resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ #{resultMaterialTheoryweight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null">
|
|
|
+ #{resultClass,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ #{resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null">
|
|
|
+ #{resultRemarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ #{deleted,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ #{sendStationId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ #{arrivalStationId,jdbcType=DECIMAL},
|
|
|
+ </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}
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
|
|
|
+ update TMSTRAIN_LOADING_RESULT
|
|
|
+ <set>
|
|
|
+ <if test="purchaseOrderRailPlanId != null">
|
|
|
+ PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="capacityId != null">
|
|
|
+ CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="materialId != null">
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialNumber != null">
|
|
|
+ RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultMaterialTheoryweight != null">
|
|
|
+ RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="batchId != null">
|
|
|
+ BATCH_ID = #{batchId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null">
|
|
|
+ RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null">
|
|
|
+ RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleted != null">
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="sendStationId != null">
|
|
|
+ SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationId != null">
|
|
|
+ ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" 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"/>
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ <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
|
|
|
+ )
|
|
|
+ ( <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}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update TMSTRAIN_LOADING_RESULT
|
|
|
+ set
|
|
|
+ RESULT_ID=
|
|
|
+ <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>
|
|
|
+ ,PURCHASE_ORDER_RAIL_PLAN_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_WAGON_NO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_BILLABLE_TONNAGE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_ISCLEAR=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CAPACITY_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,MATERIAL_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_MATERIAL_NUMBER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialNumber,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_MATERIAL_THEORYWEIGHT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,BATCH_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_CLASS=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClass,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_LOADING_DATE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadingDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,RESULT_REMARKS=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRemarks,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,INSERT_USERNAME=
|
|
|
+ <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 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 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 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 collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,DELETED=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,SEND_STATION_ID=
|
|
|
+ <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>
|
|
|
+ ,ARRIVAL_STATION_ID=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStationId,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ where RESULT_ID in
|
|
|
+ <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_LOADING_RESULT
|
|
|
+ where RESULT_ID in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+ <select id="getTmsWagonLoadInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
|
|
|
+ select * from(
|
|
|
+ select t_load.RESULT_ID "resultId",
|
|
|
+ a_order.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
+ t_load.RESULT_WAGON_NO "resultWagonNo",
|
|
|
+ t_load.RESULT_LOADING_DATE "resultLoadingDate",
|
|
|
+ t_load.RESULT_CLASS "resultClass",
|
|
|
+ d_batch.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
+ r_material.MATERIAL_NAME "materialName",
|
|
|
+ r_s_arrival.ARRIVAL_NAME "sendStationName",
|
|
|
+ r_a_arrival.ARRIVAL_NAME "arrivalStationName",
|
|
|
+ t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
|
|
|
+ t_load.RESULT_ISCLEAR "resultIsclear",
|
|
|
+ t_load.RESULT_REMARKS "resultRemarks",
|
|
|
+ t_load.INSERT_TIME "insertTime"
|
|
|
+ from TMSTRAIN_LOADING_RESULT t_load
|
|
|
+ left join AMS_PURCHASE_ORDER a_order
|
|
|
+ on t_load.PURCHASE_ORDER_RAIL_PLAN_ID=a_order.PURCHASE_ORDER_ID
|
|
|
+ left join DIL_BATCH d_batch
|
|
|
+ on t_load.BATCH_ID=d_batch.BATCH_ID
|
|
|
+ left join RMS_MATERIAL r_material
|
|
|
+ on t_load.MATERIAL_ID=r_material.MATERIAL_ID
|
|
|
+ left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
|
|
|
+ on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
|
|
|
+ left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
|
|
|
+ on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
|
|
|
+ where t_load.DELETED=0 order by t_load.RESULT_LOADING_DATE desc
|
|
|
+ )
|
|
|
+ <where>
|
|
|
+ <if test="purchaseOrderNo != null">
|
|
|
+ and
|
|
|
+ <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
+ "purchaseOrderNo" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultWagonNo != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultWagonNo" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultLoadingDate != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultLoadingDate" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultClass != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultClass" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultClass" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultForeignShipName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultForeignShipName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
+ materialName like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="sendStationName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
|
|
|
+ "sendStationName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="arrivalStationName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
|
|
|
+ arrivalStationName like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultBillableTonnage != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultBillableTonnage" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultBillableTonnage" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultIsclear != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultIsclear" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultIsclear" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="resultRemarks != null">
|
|
|
+ and
|
|
|
+ <foreach collection="resultRemarks" item="item" open="(" separator="or" close=")">
|
|
|
+ "resultRemarks" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
+ <if test="orderField == null ">
|
|
|
+ order by "insertTime" desc
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <sql id="orderBy">
|
|
|
+ <if test="orderField != null and orderField != ''">
|
|
|
+ order by "${orderField}"
|
|
|
+ <if test="orderType != null and orderType != ''">
|
|
|
+ ${orderType}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMaxId" resultType="java.math.BigDecimal">
|
|
|
+ select max(RESULT_ID) from TMSTRAIN_LOADING_RESULT
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getResultForeignShipName" parameterType="java.math.BigDecimal" resultType="String">
|
|
|
+ select RESULT_FOREIGN_SHIP_NAME
|
|
|
+ FROM DIL_BATCH d_batch
|
|
|
+ where d_batch.BATCH_ID = #{batchId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getMaterialID" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
|
|
|
+ select MATERIAL_ID
|
|
|
+ FROM DIL_BATCH d_batch
|
|
|
+ where d_batch.BATCH_ID = #{batchId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getPurchaseOrderId" parameterType="java.util.Map" resultType="java.math.BigDecimal">
|
|
|
+ select
|
|
|
+ APO.PURCHASE_ORDER_ID
|
|
|
+ from AMS_PURCHASE_ORDER APO
|
|
|
+ left join DIL_BATCH DB
|
|
|
+ on DB.BATCH_ID = APO.BATCH_ID
|
|
|
+ where DB.BATCH_ID = #{batchId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getSendStationName" resultType="java.util.LinkedHashMap">
|
|
|
+ select
|
|
|
+ ARRIVAL_ID "id",
|
|
|
+ ARRIVAL_ID "value",
|
|
|
+ ARRIVAL_NAME "label"
|
|
|
+ from RMSTRAIN_ARRIVAL_SEND
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getArrivalStationName" resultType="java.util.LinkedHashMap">
|
|
|
+ select
|
|
|
+ ras.ARRIVAL_ID "id",
|
|
|
+ ras.ARRIVAL_ID "value",
|
|
|
+ ras.ARRIVAL_NAME "label"
|
|
|
+ from RMSTRAIN_ARRIVAL_SEND ras
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getBatchId" resultType="java.util.LinkedHashMap">
|
|
|
+ select
|
|
|
+ BATCH_ID "id",
|
|
|
+ BATCH_ID "value",
|
|
|
+ CONCAT(CONCAT(RM.MATERIAL_NAME, '"'), CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"')) "label"
|
|
|
+ from DIL_BATCH DB
|
|
|
+ left join RMS_MATERIAL RM
|
|
|
+ on RM.MATERIAL_ID = DB.MATERIAL_ID
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getWagonNo" resultType="java.util.LinkedHashMap">
|
|
|
+ select
|
|
|
+ t_load.RESULT_WAGON_NO "id",
|
|
|
+ t_load.RESULT_WAGON_NO "value",
|
|
|
+ t_load.RESULT_WAGON_NO "label"
|
|
|
+ from TMSTRAIN_LOADING_RESULT t_load
|
|
|
+ left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
|
|
|
+ on t_load.RESULT_WAGON_NO = t_unload.RESULT_WAGON_NO
|
|
|
+ where t_load.RESULT_WAGON_NO not in (select RESULT_WAGON_NO from TMSTRAIN_WAGON_UNLOAD_RESULT) and t_load.DELETED = 0
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
|
|
|
+ select
|
|
|
+ t_load.RESULT_WAGON_NO "resultWagonNo",
|
|
|
+ t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
|
|
|
+ t_load.RESULT_ISCLEAR "resultIsclear",
|
|
|
+ t_load.RESULT_CLASS "resultClass",
|
|
|
+ t_load.SEND_STATION_ID "sendStationId",
|
|
|
+ t_load.ARRIVAL_STATION_ID "arrivalStationId",
|
|
|
+ t_load.RESULT_LOADING_DATE "resultLoadingDate",
|
|
|
+ t_load.BATCH_ID "batchId",
|
|
|
+ t_load.RESULT_REMARKS "resultRemarks"
|
|
|
+ from TMSTRAIN_LOADING_RESULT t_load
|
|
|
+ where t_load.RESULT_ID = #{resultId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getPortIdBySendStationId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
|
|
|
+ select RAS.OWNED_PORT_ID from RMSTRAIN_ARRIVAL_SEND RAS where RAS.ARRIVAL_ID = #{sendStationId}
|
|
|
+ </select>
|
|
|
+</mapper>
|