123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979 |
- <?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" />
- <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
- </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
- </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
- </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>
- <if test="resultType != null">
- and RESULT_TYPE = #{resultType}
- </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>
- <if test="resultType != null">
- and RESULT_TYPE = #{resultType}
- </if>
- </where>
- </sql>
- <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>
- </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)
- 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})
- </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>
- <if test="resultType != null">
- RESULT_TYPE,
- </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>
- <if test="resultType != null">
- #{resultType,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},
- RESULT_TYPE = #{resultType,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>
- <if test="resultType != null">
- RESULT_TYPE = #{resultType,jdbcType=DECIMAL},
- </if>
- </set>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
- <include refid="select"/>
- where RESULT_ID = #{resultId,jdbcType=DECIMAL}
- </select>
- <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- <include refid="select"/>
- <include refid="where"/>
- </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,
- RESULT_TYPE)
- ( <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} 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>
- ,RESULT_TYPE=
- <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
- when #{item.resultId,jdbcType=DECIMAL} then #{item.resultType,jdbcType=DECIMAL}
- </foreach>
- where RESULT_ID in
- <foreach 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",
- RS.SUPPLIER_NAME "supplierName",
- 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 RMS_SUPPLIER RS
- on RS.SUPPLIER_ID = a_order.SUPPLIER_UNIT_ID
- left join DIL_BATCH d_batch
- on t_load.BATCH_ID=d_batch.BATCH_ID
- left join RMS_MATERIAL r_material
- on d_batch.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 in (0, 2) and t_load.RESULT_TYPE = #{resultType}
- order by t_load.RESULT_LOADING_DATE desc
- )
- <where>
- <if test="purchaseOrderNo != null">
- <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="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" parameterType="java.util.Map">
- select *
- from (
- select TLR.RESULT_WAGON_NO "resultWagonNo",
- TLR.RESULT_ID "resultId",
- TLR.RESULT_LOADING_DATE "resultLoadingDate",
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- RM.MATERIAL_NAME "materialName"
- from TMSTRAIN_LOADING_RESULT TLR
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = TLR.PURCHASE_ORDER_RAIL_PLAN_ID
- left join DIL_BATCH DB
- on DB.BATCH_ID = APO.BATCH_ID
- left join RMS_MATERIAL RM
- on DB.MATERIAL_ID = RM.MATERIAL_ID
- where TLR.DELETED not in (2, 1)
- and TLR.RESULT_TYPE = #{resultType}
- )
- <where>
- <if test="resultWagonNo != null">
- <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="purchaseOrderNo != null">
- and
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
- "purchaseOrderNo" like '%${item}%'
- </foreach>
- </if>
- <if test="materialName != null">
- and
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
- "materialName" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- <if test="orderField == null ">
- order by "resultLoadingDate" desc
- </if>
- </select>
- <select id="selectByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
- select
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
- 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",
- t_load.RESULT_WAGON_NO "resultWagonNo"
- from TMSTRAIN_LOADING_RESULT t_load
- left join AMS_PURCHASE_ORDER APO
- on APO.PURCHASE_ORDER_ID = t_load.PURCHASE_ORDER_RAIL_PLAN_ID
- 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>
- <!-- 通过发运计划号查找物资信息 -->
- <select id="getMaterialInfoByRailPlanId" resultType="java.util.Map" parameterType="java.lang.Integer">
- SELECT RM.MATERIAL_NAME "materialName",
- AROM.OFFSET_MATERIAL_NUMBER "materialNumber",
- AROM.OFFSET_MATERIAL_WEIGHT "materialWeight",
- AROM.MATERIAL_ID "materialId"
- FROM AMS_RAIL_OFFSET_DAYPLAN AROD
- LEFT JOIN AMS_RAIL_OFFSET_MATERIAL AROM
- ON AROM.DAYPLAN_ID=AROD.DAYPLAN_ID
- LEFT JOIN RMS_MATERIAL RM
- ON RM.MATERIAL_ID=AROM.MATERIAL_ID
- WHERE AROD.DAYPLAN_ID=#{dayPlanId}
- </select>
- <!-- 内转物流查询装车作业 -->
- <select id="selectLoadedForConverted" parameterType="java.util.Map" resultType="java.util.Map">
- select
- TLR.RESULT_ID "resultId",
- TLR.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
- AROD.DAYPLAN_NO "dayplanNo",
- TLR.RESULT_CLASS "resultClass",
- TLR.INSERT_UPDATE_REMARK "insertUpdateRemark",
- TO_CHAR(TLR.RESULT_LOADING_DATE, 'yyyy-mm-dd') "resultLoadingDate",
- TLR.RESULT_WAGON_NO "resultWagonNo",
- RAS.ARRIVAL_NAME "dayplanSendStationName",
- RAS2.ARRIVAL_NAME "dayplanToTheStationName",
- AROD.DAYPLAN_CONSIGNEE_NAME "dayplanConsigneeName",
- AROD.DAYPLAN_CONSIGNEE_TEL "dayplanConsigneeTel",
- RAS2.DAYPLAN_DEDICATED_LINE "dayplanDedicatedLine",
- RS.SHIPPER_NAME "shipperName",
- RC.CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
- from TMSTRAIN_LOADING_RESULT TLR
- LEFT JOIN AMS_RAIL_OFFSET_DAYPLAN AROD
- ON AROD.DAYPLAN_ID = TLR.PURCHASE_ORDER_RAIL_PLAN_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS
- ON RAS.ARRIVAL_ID = AROD.DAYPLAN_SEND_STATION_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS2
- ON AROD.DAYPLAN_TO_THE_STATION_ID = RAS2.ARRIVAL_ID
- LEFT JOIN RMS_CONSIGNEE RC
- ON RC.CONSIGNEE_ID = AROD.RECEIVING_UNIT_ID
- LEFT JOIN RMS_SHIPPER RS
- ON RS.SHIPPER_ID = AROD.SHIPPER_ID
- WHERE TLR.DELETED = 0 AND TLR.RESULT_TYPE = 4
- </select>
- <select id="selectLoadByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
- select
- t_load.RESULT_WAGON_NO "resultWagonNo",
- t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
- 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.RESULT_REMARKS "resultRemarks",
- t_load.RESULT_MATERIAL_NUMBER "materialNumber",
- t_load.RESULT_MATERIAL_THEORYWEIGHT "materialTheoryWeight"
- from TMSTRAIN_LOADING_RESULT t_load
- where t_load.RESULT_ID = #{resultId}
- </select>
- <!-- 通过扫描结果匹配 出库扫描实绩中出库实绩Id -->
- <select id="getOutBoundResultIdByScan" parameterType="string" resultType="java.lang.Integer">
- SELECT WOSR.OUTBOUND_RESULT_ID
- FROM WMSP_OUTBOUND_SCAN_RESULT WOSR
- WHERE WOSR.RESULT_MATERIAL = #{scanText} AND WOSR.RESULT_CHECK = 0
- </select>
- <!-- 通过出库主键ID查询订单总实绩ID -->
- <select id="getResultTotalIdByOutBoundResultId" parameterType="int" resultType="java.util.Map">
- SELECT WOR.MATERIAL_ID "materialId",
- (
- select TTR.RESULT_TOTAL_ID
- from TMSTRUCK_TOTAL_RESULT TTR
- where TTR.ORDER_ID = WOR.BILL_LADING_ID
- ) "resultTotalId"
- FROM WMSP_OUTBOUND_RESULT WOR
- WHERE WOR.RESULT_ID = #{outboundResultId}
- </select>
- <!-- 通过发运计划ID和车皮号查询装车实绩ID -->
- <select id="getLoadingIdByWnoAndRailPlanId" parameterType="java.util.Map" resultType="java.lang.Integer">
- SELECT
- TLR.RESULT_ID
- FROM TMSTRAIN_LOADING_RESULT TLR
- WHERE TLR.RESULT_WAGON_NO = #{resultWagonNo} AND TLR.PURCHASE_ORDER_RAIL_PLAN_ID = #{railPlanId}
- </select>
- </mapper>
|