123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900 |
- <?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.AmsRailOffsetDayplanMapper">
- <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsRailOffsetDayplan">
- <id column="DAYPLAN_ID" jdbcType="DECIMAL" property="dayplanId"/>
- <result column="DAYPLAN_NO" jdbcType="VARCHAR" property="dayplanNo"/>
- <result column="DAYPLAN_DATE" jdbcType="TIMESTAMP" property="dayplanDate"/>
- <result column="SHIPPER_ID" jdbcType="DECIMAL" property="shipperId"/>
- <result column="DAYPLAN_DELIVERY_DATE" jdbcType="TIMESTAMP" property="dayplanDeliveryDate"/>
- <result column="DAYPLAN_OWN_CARS_AMOUT" jdbcType="DECIMAL" property="dayplanOwnCarsAmout"/>
- <result column="DAYPLAN_TO_THE_STATION_ID" jdbcType="DECIMAL" property="dayplanToTheStationId"/>
- <result column="DAYPLAN_WAGON_NUMBER" jdbcType="DECIMAL" property="dayplanWagonNumber"/>
- <result column="RECEIVING_UNIT_ID" jdbcType="DECIMAL" property="receivingUnitId"/>
- <result column="DAYPLAN_CONSIGNEE_NAME" jdbcType="VARCHAR" property="dayplanConsigneeName"/>
- <result column="DAYPLAN_CONSIGNEE_TEL" jdbcType="VARCHAR" property="dayplanConsigneeTel"/>
- <result column="DAYPLAN_RECEIVE_STATUS" jdbcType="DECIMAL" property="dayplanReceiveStatus"/>
- <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="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
- <result column="DAYPLAN_SEND_STATION_ID" jdbcType="DECIMAL" property="dayplanSendStationId"/>
- <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
- </resultMap>
- <sql id="columns">
- DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_DATE, SHIPPER_ID, DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
- DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER, RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
- DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, CARRIER_ID, DAYPLAN_SEND_STATION_ID, DELETED
- </sql>
- <sql id="columns_alias">
- t.DAYPLAN_ID, t.DAYPLAN_NO, t.DAYPLAN_DATE, t.SHIPPER_ID, t.DAYPLAN_DELIVERY_DATE,
- t.DAYPLAN_OWN_CARS_AMOUT, t.DAYPLAN_TO_THE_STATION_ID, t.DAYPLAN_WAGON_NUMBER, t.RECEIVING_UNIT_ID,
- t.DAYPLAN_CONSIGNEE_NAME, t.DAYPLAN_CONSIGNEE_TEL, t.DAYPLAN_RECEIVE_STATUS, t.INSERT_USERNAME,
- t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.CARRIER_ID,
- t.DAYPLAN_SEND_STATION_ID, t.DELETED
- </sql>
- <sql id="select">
- SELECT
- <include refid="columns"/>
- FROM AMS_RAIL_OFFSET_DAYPLAN
- </sql>
- <sql id="select_alias">
- SELECT
- <include refid="columns_alias"/>
- FROM AMS_RAIL_OFFSET_DAYPLAN t
- </sql>
- <sql id="where">
- <where>
- <if test="dayplanId != null">
- and DAYPLAN_ID = #{dayplanId}
- </if>
- <if test="dayplanNo != null and dayplanNo != ''">
- and DAYPLAN_NO = #{dayplanNo}
- </if>
- <if test="dayplanDate != null">
- and TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = #{dayplanDate}
- </if>
- <if test="shipperId != null">
- and SHIPPER_ID = #{shipperId}
- </if>
- <if test="dayplanDeliveryDate != null">
- and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
- </if>
- <if test="dayplanOwnCarsAmout != null">
- and DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
- </if>
- <if test="dayplanToTheStationId != null">
- and DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
- </if>
- <if test="dayplanWagonNumber != null">
- and DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
- </if>
- <if test="receivingUnitId != null">
- and RECEIVING_UNIT_ID = #{receivingUnitId}
- </if>
- <if test="dayplanConsigneeName != null and dayplanConsigneeName != ''">
- and DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName}
- </if>
- <if test="dayplanConsigneeTel != null and dayplanConsigneeTel != ''">
- and DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel}
- </if>
- <if test="dayplanReceiveStatus != null">
- and DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
- </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="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="dayplanSendStationId != null">
- and DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <sql id="whereLike">
- <where>
- <if test="dayplanId != null">
- and DAYPLAN_ID = #{dayplanId}
- </if>
- <if test="dayplanNo != null and dayplanNo != ''">
- and DAYPLAN_NO LIKE '%${dayplanNo}%'
- </if>
- <if test="dayplanDate != null">
- and TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = #{dayplanDate}
- </if>
- <if test="shipperId != null">
- and SHIPPER_ID = #{shipperId}
- </if>
- <if test="dayplanDeliveryDate != null">
- and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
- </if>
- <if test="dayplanOwnCarsAmout != null">
- and DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
- </if>
- <if test="dayplanToTheStationId != null">
- and DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
- </if>
- <if test="dayplanWagonNumber != null">
- and DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
- </if>
- <if test="receivingUnitId != null">
- and RECEIVING_UNIT_ID = #{receivingUnitId}
- </if>
- <if test="dayplanConsigneeName != null and dayplanConsigneeName != ''">
- and DAYPLAN_CONSIGNEE_NAME LIKE '%${dayplanConsigneeName}%'
- </if>
- <if test="dayplanConsigneeTel != null and dayplanConsigneeTel != ''">
- and DAYPLAN_CONSIGNEE_TEL LIKE '%${dayplanConsigneeTel}%'
- </if>
- <if test="dayplanReceiveStatus != null">
- and DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
- </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="carrierId != null">
- and CARRIER_ID = #{carrierId}
- </if>
- <if test="dayplanSendStationId != null">
- and DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
- </if>
- <if test="deleted != null">
- and DELETED = #{deleted}
- </if>
- </where>
- </sql>
- <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
- delete
- from AMS_RAIL_OFFSET_DAYPLAN
- where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
- </delete>
- <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
- delete from AMS_RAIL_OFFSET_DAYPLAN
- where 1!=1
- <if test="dayplanNo != null and dayplanNo != ''">
- or DAYPLAN_NO = #{dayplanNo}
- </if>
- <if test="dayplanDate != null">
- or TO_CHAR(DAYPLAN_DATE,'yyyy-MM-dd') = '#{dayplanDate}'
- </if>
- <if test="shipperId != null">
- or SHIPPER_ID = #{shipperId}
- </if>
- <if test="dayplanDeliveryDate != null">
- or TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = '#{dayplanDeliveryDate}'
- </if>
- <if test="dayplanOwnCarsAmout != null">
- or DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout}
- </if>
- <if test="dayplanToTheStationId != null">
- or DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId}
- </if>
- <if test="dayplanWagonNumber != null">
- or DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber}
- </if>
- <if test="receivingUnitId != null">
- or RECEIVING_UNIT_ID = #{receivingUnitId}
- </if>
- <if test="dayplanConsigneeName != null and dayplanConsigneeName != ''">
- or DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName}
- </if>
- <if test="dayplanConsigneeTel != null and dayplanConsigneeTel != ''">
- or DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel}
- </if>
- <if test="dayplanReceiveStatus != null">
- or DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
- </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="carrierId != null">
- or CARRIER_ID = #{carrierId}
- </if>
- <if test="dayplanSendStationId != null">
- or DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId}
- </if>
- <if test="deleted != null">
- or DELETED = #{deleted}
- </if>
- </delete>
- <insert id="insert" parameterType="com.steerinfo.dil.model.AmsRailOffsetDayplan">
- insert into AMS_RAIL_OFFSET_DAYPLAN (DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_DATE,
- SHIPPER_ID, DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
- DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER,
- RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
- DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS,
- INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
- UPDATE_TIME, INSERT_UPDATE_REMARK, CARRIER_ID,
- DAYPLAN_SEND_STATION_ID, DELETED)
- values (#{dayplanId,jdbcType=DECIMAL}, #{dayplanNo,jdbcType=VARCHAR}, #{dayplanDate,jdbcType=TIMESTAMP},
- #{shipperId,jdbcType=DECIMAL}, #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
- #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
- #{dayplanToTheStationId,jdbcType=DECIMAL}, #{dayplanWagonNumber,jdbcType=DECIMAL},
- #{receivingUnitId,jdbcType=DECIMAL}, #{dayplanConsigneeName,jdbcType=VARCHAR},
- #{dayplanConsigneeTel,jdbcType=VARCHAR}, #{dayplanReceiveStatus,jdbcType=DECIMAL},
- #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
- #{updateUsername,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{carrierId,jdbcType=DECIMAL},
- #{dayplanSendStationId,jdbcType=DECIMAL}, #{deleted,jdbcType=DECIMAL})
- </insert>
- <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsRailOffsetDayplan">
- insert into AMS_RAIL_OFFSET_DAYPLAN
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dayplanId != null">
- DAYPLAN_ID,
- </if>
- <if test="dayplanNo != null">
- DAYPLAN_NO,
- </if>
- <if test="dayplanDate != null">
- DAYPLAN_DATE,
- </if>
- <if test="shipperId != null">
- SHIPPER_ID,
- </if>
- <if test="dayplanDeliveryDate != null">
- DAYPLAN_DELIVERY_DATE,
- </if>
- <if test="dayplanOwnCarsAmout != null">
- DAYPLAN_OWN_CARS_AMOUT,
- </if>
- <if test="dayplanToTheStationId != null">
- DAYPLAN_TO_THE_STATION_ID,
- </if>
- <if test="dayplanWagonNumber != null">
- DAYPLAN_WAGON_NUMBER,
- </if>
- <if test="receivingUnitId != null">
- RECEIVING_UNIT_ID,
- </if>
- <if test="dayplanConsigneeName != null">
- DAYPLAN_CONSIGNEE_NAME,
- </if>
- <if test="dayplanConsigneeTel != null">
- DAYPLAN_CONSIGNEE_TEL,
- </if>
- <if test="dayplanReceiveStatus != null">
- DAYPLAN_RECEIVE_STATUS,
- </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="carrierId != null">
- CARRIER_ID,
- </if>
- <if test="dayplanSendStationId != null">
- DAYPLAN_SEND_STATION_ID,
- </if>
- <if test="deleted != null">
- DELETED,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dayplanId != null">
- #{dayplanId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanNo != null">
- #{dayplanNo,jdbcType=VARCHAR},
- </if>
- <if test="dayplanDate != null">
- #{dayplanDate,jdbcType=TIMESTAMP},
- </if>
- <if test="shipperId != null">
- #{shipperId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanDeliveryDate != null">
- #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
- </if>
- <if test="dayplanOwnCarsAmout != null">
- #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
- </if>
- <if test="dayplanToTheStationId != null">
- #{dayplanToTheStationId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanWagonNumber != null">
- #{dayplanWagonNumber,jdbcType=DECIMAL},
- </if>
- <if test="receivingUnitId != null">
- #{receivingUnitId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanConsigneeName != null">
- #{dayplanConsigneeName,jdbcType=VARCHAR},
- </if>
- <if test="dayplanConsigneeTel != null">
- #{dayplanConsigneeTel,jdbcType=VARCHAR},
- </if>
- <if test="dayplanReceiveStatus != null">
- #{dayplanReceiveStatus,jdbcType=DECIMAL},
- </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="carrierId != null">
- #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanSendStationId != null">
- #{dayplanSendStationId,jdbcType=DECIMAL},
- </if>
- <if test="deleted != null">
- #{deleted,jdbcType=DECIMAL},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsRailOffsetDayplan">
- update AMS_RAIL_OFFSET_DAYPLAN
- set DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
- DAYPLAN_DATE = #{dayplanDate,jdbcType=TIMESTAMP},
- SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
- DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
- DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
- DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId,jdbcType=DECIMAL},
- DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber,jdbcType=DECIMAL},
- RECEIVING_UNIT_ID = #{receivingUnitId,jdbcType=DECIMAL},
- DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName,jdbcType=VARCHAR},
- DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel,jdbcType=VARCHAR},
- DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus,jdbcType=DECIMAL},
- 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},
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId,jdbcType=DECIMAL},
- DELETED = #{deleted,jdbcType=DECIMAL}
- where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsRailOffsetDayplan">
- update AMS_RAIL_OFFSET_DAYPLAN
- <set>
- <if test="dayplanNo != null">
- DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
- </if>
- <if test="dayplanDate != null">
- DAYPLAN_DATE = #{dayplanDate,jdbcType=TIMESTAMP},
- </if>
- <if test="shipperId != null">
- SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanDeliveryDate != null">
- DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
- </if>
- <if test="dayplanOwnCarsAmout != null">
- DAYPLAN_OWN_CARS_AMOUT = #{dayplanOwnCarsAmout,jdbcType=DECIMAL},
- </if>
- <if test="dayplanToTheStationId != null">
- DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanWagonNumber != null">
- DAYPLAN_WAGON_NUMBER = #{dayplanWagonNumber,jdbcType=DECIMAL},
- </if>
- <if test="receivingUnitId != null">
- RECEIVING_UNIT_ID = #{receivingUnitId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanConsigneeName != null">
- DAYPLAN_CONSIGNEE_NAME = #{dayplanConsigneeName,jdbcType=VARCHAR},
- </if>
- <if test="dayplanConsigneeTel != null">
- DAYPLAN_CONSIGNEE_TEL = #{dayplanConsigneeTel,jdbcType=VARCHAR},
- </if>
- <if test="dayplanReceiveStatus != null">
- DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus,jdbcType=DECIMAL},
- </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="carrierId != null">
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
- </if>
- <if test="dayplanSendStationId != null">
- DAYPLAN_SEND_STATION_ID = #{dayplanSendStationId,jdbcType=DECIMAL},
- </if>
- <if test="deleted != null">
- DELETED = #{deleted,jdbcType=DECIMAL},
- </if>
- </set>
- where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
- </update>
- <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
- <include refid="select"/>
- where DAYPLAN_ID = #{dayplanId,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 AMS_RAIL_OFFSET_DAYPLAN
- (DAYPLAN_ID,
- DAYPLAN_NO, DAYPLAN_DATE, SHIPPER_ID,
- DAYPLAN_DELIVERY_DATE, DAYPLAN_OWN_CARS_AMOUT,
- DAYPLAN_TO_THE_STATION_ID, DAYPLAN_WAGON_NUMBER,
- RECEIVING_UNIT_ID, DAYPLAN_CONSIGNEE_NAME,
- DAYPLAN_CONSIGNEE_TEL, DAYPLAN_RECEIVE_STATUS,
- INSERT_USERNAME, INSERT_TIME,
- UPDATE_USERNAME, UPDATE_TIME,
- INSERT_UPDATE_REMARK, CARRIER_ID,
- DAYPLAN_SEND_STATION_ID, DELETED
- )
- ( <foreach collection="list" item="item" separator="union all">
- select
- #{item.dayplanId,jdbcType=DECIMAL},
- #{item.dayplanNo,jdbcType=VARCHAR}, #{item.dayplanDate,jdbcType=TIMESTAMP}, #{item.shipperId,jdbcType=DECIMAL},
- #{item.dayplanDeliveryDate,jdbcType=TIMESTAMP}, #{item.dayplanOwnCarsAmout,jdbcType=DECIMAL},
- #{item.dayplanToTheStationId,jdbcType=DECIMAL}, #{item.dayplanWagonNumber,jdbcType=DECIMAL},
- #{item.receivingUnitId,jdbcType=DECIMAL}, #{item.dayplanConsigneeName,jdbcType=VARCHAR},
- #{item.dayplanConsigneeTel,jdbcType=VARCHAR}, #{item.dayplanReceiveStatus,jdbcType=DECIMAL},
- #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
- #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
- #{item.dayplanSendStationId,jdbcType=DECIMAL}, #{item.deleted,jdbcType=DECIMAL}
- from dual
- </foreach> )
- </insert>
- <update id="batchUpdate" parameterType="java.util.List">
- update AMS_RAIL_OFFSET_DAYPLAN
- set
- DAYPLAN_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanId,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_NO=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanNo,jdbcType=VARCHAR}
- </foreach>
- ,DAYPLAN_DATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDate,jdbcType=TIMESTAMP}
- </foreach>
- ,SHIPPER_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_DELIVERY_DATE=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDeliveryDate,jdbcType=TIMESTAMP}
- </foreach>
- ,DAYPLAN_OWN_CARS_AMOUT=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanOwnCarsAmout,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_TO_THE_STATION_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanToTheStationId,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_WAGON_NUMBER=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanWagonNumber,jdbcType=DECIMAL}
- </foreach>
- ,RECEIVING_UNIT_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.receivingUnitId,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_CONSIGNEE_NAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanConsigneeName,jdbcType=VARCHAR}
- </foreach>
- ,DAYPLAN_CONSIGNEE_TEL=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanConsigneeTel,jdbcType=VARCHAR}
- </foreach>
- ,DAYPLAN_RECEIVE_STATUS=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanReceiveStatus,jdbcType=DECIMAL}
- </foreach>
- ,INSERT_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
- </foreach>
- ,INSERT_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
- </foreach>
- ,UPDATE_USERNAME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
- </foreach>
- ,UPDATE_TIME=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
- </foreach>
- ,INSERT_UPDATE_REMARK=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
- </foreach>
- ,CARRIER_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
- </foreach>
- ,DAYPLAN_SEND_STATION_ID=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanSendStationId,jdbcType=DECIMAL}
- </foreach>
- ,DELETED=
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
- </foreach>
- where DAYPLAN_ID in
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
- #{item.dayplanId,jdbcType=DECIMAL}
- </foreach>
- </update>
- <delete id="batchDelete" parameterType="java.util.List">
- delete from AMS_RAIL_OFFSET_DAYPLAN
- where DAYPLAN_ID in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </delete>
- <!-- 友情提示!!!-->
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <!-- 展示钢材发往异地库日计划 -->
- <select id="getRailOffsetDayplan" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (SELECT AROD.DAYPLAN_ID AS "dayPlanId",
- AROD.DAYPLAN_NO AS "dayplanNo",
- to_char(AROD.DAYPLAN_DATE, 'yyyy-mm-dd') AS "dayplanDate",
- RS.SHIPPER_NAME AS "shipperName",
- to_char(AROD.DAYPLAN_DELIVERY_DATE, 'yyyy-mm-dd') AS "dayplanDeliveryDate",
- RAS.TRANSFER_UNIT AS "transferUnit",
- AROD.DAYPLAN_OWN_CARS_AMOUT AS "dayplanOwnCarsAmout",
- AROD.DAYPLAN_WAGON_NUMBER AS "dayplanWagonNumber",
- RAS.ARRIVAL_NAME AS "arrivalName",
- RAS.DAYPLAN_DEDICATED_LINE AS "dayplanDedicatedLine",
- RW.WAREHOUSE_NAME AS "wareHouseName",
- AROD.DAYPLAN_CONSIGNEE_NAME AS "dayplanConsigneeName",
- AROD.DAYPLAN_CONSIGNEE_TEL AS "dayplanConsigneeTel",
- AROD.INSERT_TIME AS "insertTime"
- FROM AMS_RAIL_OFFSET_DAYPLAN AROD
- LEFT JOIN RMS_SHIPPER RS
- ON AROD.SHIPPER_ID = RS.SHIPPER_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS
- ON AROD.DAYPLAN_TO_THE_STATION_ID = RAS.ARRIVAL_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
- WHERE AROD.DELETED = 0
- <if test="dayplanReceiveStatus != null">
- AND AROD.DAYPLAN_RECEIVE_STATUS = #{dayplanReceiveStatus}
- </if>
- <if test="carrierId != null">
- AND AROD.CARRIER_ID = #{carrierId}
- </if>
- )
- <where>
- <if test="dayplanNo != null">
- and
- <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDate != null">
- and
- <foreach collection="dayplanDate" item="item" open="(" separator="or" close=")">
- "dayplanDate" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDeliveryDate != null">
- and
- <foreach collection="dayplanDeliveryDate" item="item" open="(" separator="or" close=")">
- "dayplanDeliveryDate" like '%${item}%'
- </foreach>
- </if>
- <if test="transferUnit != null">
- and
- <foreach collection="transferUnit" item="item" open="(" separator="or" close=")">
- "transferUnit" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanOwnCarsAmout != null">
- and
- <foreach collection="dayplanOwnCarsAmout" item="item" open="(" separator="or" close=")">
- "dayplanOwnCarsAmout" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanWagonNumber != null">
- and
- <foreach collection="dayplanWagonNumber" item="item" open="(" separator="or" close=")">
- "dayplanWagonNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="arrivalName != null">
- and
- <foreach collection="arrivalName" item="item" open="(" separator="or" close=")">
- "arrivalName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDedicatedLine != null">
- and
- <foreach collection="dayplanDedicatedLine" item="item" open="(" separator="or" close=")">
- "dayplanDedicatedLine" like '%${item}%'
- </foreach>
- </if>
- <if test="wareHouseName != null">
- and
- <foreach collection="wareHouseName" item="item" open="(" separator="or" close=")">
- "wareHouseName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanConsigneeName != null">
- and
- <foreach collection="dayplanConsigneeName" item="item" open="(" separator="or" close=")">
- "dayplanConsigneeName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanConsigneeTel != null">
- and
- <foreach collection="dayplanConsigneeTel" item="item" open="(" separator="or" close=")">
- "dayplanConsigneeTel" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- <sql id="orderBy">
- <if test="orderField != null and orderField != ''">
- order by "${orderField}"
- <if test="orderType != null and orderType != ''">
- ${orderType}
- </if>
- </if>
- <if test="orderField == null ">
- order by "insertTime" desc
- </if>
- </sql>
- <!-- 通过主键Id查询发运钢材到异地库计划数据用于修改 -->
- <select id="getRailOffseDayMes" parameterType="int" resultType="java.util.Map">
- select AROD.DAYPLAN_NO "dayplanNo",
- AROD.CARRIER_ID "carrierId",
- AROD.SHIPPER_ID "shipperId",
- AROD.DAYPLAN_DATE "dayplanDate",
- AROD.DAYPLAN_DELIVERY_DATE "dayplanDeliveryDate",
- AROD.DAYPLAN_OWN_CARS_AMOUT "dayplanOwnCarsAmout",
- AROD.DAYPLAN_TO_THE_STATION_ID "dayplanToTheStationId",
- AROD.DAYPLAN_WAGON_NUMBER "dayplanWagonNumber",
- AROD.RECEIVING_UNIT_ID "receivingUnitId",
- AROD.DAYPLAN_CONSIGNEE_NAME "dayplanConsigneeName",
- AROD.DAYPLAN_CONSIGNEE_TEL "dayplanConsigneeTel"
- from AMS_RAIL_OFFSET_DAYPLAN AROD
- where AROD.DAYPLAN_ID = #{dayplanId}
- </select>
- <!-- 通过发运计划主键查询关联所有物资信息 -->
- <select id="getMaterialMesByDayPlanId" parameterType="java.util.Map" resultType="java.util.Map">
- SELECT *
- FROM (SELECT
- rm.material_id as "materialId",
- rm.material_code as "materialCode",
- rm.material_specification as "materialSpecification",
- rm.material_model as "materialMode",
- RM.MATERIAL_NAME AS "materailName",
- AROM.OFFSET_MATERIAL_NUMBER AS "materialNumber",
- AROM.OFFSET_MATERIAL_WEIGHT AS "materialWeight"
- FROM AMS_RAIL_OFFSET_MATERIAL AROM
- LEFT JOIN RMS_MATERIAL RM
- ON AROM.MATERIAL_ID = RM.MATERIAL_ID
- WHERE arom.dayplan_id = #{dayplanId})
- <where>
- <if test="materailName != null">
- and
- <foreach collection="materailName" item="item" open="(" separator="or" close=")">
- "materailName" like '%${item}%'
- </foreach>
- </if>
- <if test="materialNumber != null">
- and
- <foreach collection="materialNumber" item="item" open="(" separator="or" close=")">
- "materialNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="materialWeight != null">
- and
- <foreach collection="materialWeight" item="item" open="(" separator="or" close=")">
- "materialWeight" like '%${item}%'
- </foreach>
- </if>
- </where>
- </select>
- <!-- 到站下拉 -->
- <select id="getdayPlanToTheStationId" resultType="java.util.Map">
- SELECT RAS.ARRIVAL_ID AS "id",
- RAS.ARRIVAL_ID AS "value",
- RAS.ARRIVAL_NAME AS "label"
- FROM RMSTRAIN_ARRIVAL_SEND RAS
- </select>
- <select id="getRailOffsetDayplanId" resultType="java.util.Map">
- SELECT *
- FROM (SELECT AROD.DAYPLAN_ID AS "dayPlanId",
- AROD.DAYPLAN_NO AS "dayplanNo",
- AROD.DAYPLAN_DATE AS "dayplanDate",
- RS.SHIPPER_NAME AS "shipperName",
- AROD.DAYPLAN_DELIVERY_DATE AS "dayplanDeliveryDate",
- RAS.TRANSFER_UNIT AS "transferUnit",
- AROD.DAYPLAN_OWN_CARS_AMOUT AS "dayplanOwnCarsAmout",
- AROD.DAYPLAN_WAGON_NUMBER AS "dayplanWagonNumber",
- RAS.ARRIVAL_NAME AS "arrivalName",
- RAS.DAYPLAN_DEDICATED_LINE AS "dayplanDedicatedLine",
- RW.WAREHOUSE_NAME AS "wareHouseName",
- AROD.DAYPLAN_CONSIGNEE_NAME AS "dayplanConsigneeName",
- AROD.DAYPLAN_CONSIGNEE_TEL AS "dayplanConsigneeTel",
- AROD.INSERT_TIME AS "insertTime"
- FROM AMS_RAIL_OFFSET_DAYPLAN AROD
- LEFT JOIN RMS_SHIPPER RS
- ON AROD.SHIPPER_ID = RS.SHIPPER_ID
- LEFT JOIN RMSTRAIN_ARRIVAL_SEND RAS
- ON AROD.DAYPLAN_TO_THE_STATION_ID = RAS.ARRIVAL_ID
- LEFT JOIN RMS_WAREHOUSE RW
- ON RW.WAREHOUSE_ID = AROD.RECEIVING_UNIT_ID
- WHERE AROD.DELETED = 0
- and
- arod.dayplan_id=#{dayPlanId}
- )
- <where>
- <if test="dayplanNo != null">
- and
- <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
- "dayplanNo" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDate != null">
- and
- <foreach collection="dayplanDate" item="item" open="(" separator="or" close=")">
- "dayplanDate" like '%${item}%'
- </foreach>
- </if>
- <if test="shipperName != null">
- and
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
- "shipperName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDeliveryDate != null">
- and
- <foreach collection="dayplanDeliveryDate" item="item" open="(" separator="or" close=")">
- "dayplanDeliveryDate" like '%${item}%'
- </foreach>
- </if>
- <if test="transferUnit != null">
- and
- <foreach collection="transferUnit" item="item" open="(" separator="or" close=")">
- "transferUnit" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanOwnCarsAmout != null">
- and
- <foreach collection="dayplanOwnCarsAmout" item="item" open="(" separator="or" close=")">
- "dayplanOwnCarsAmout" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanWagonNumber != null">
- and
- <foreach collection="dayplanWagonNumber" item="item" open="(" separator="or" close=")">
- "dayplanWagonNumber" like '%${item}%'
- </foreach>
- </if>
- <if test="arrivalName != null">
- and
- <foreach collection="arrivalName" item="item" open="(" separator="or" close=")">
- "arrivalName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanDedicatedLine != null">
- and
- <foreach collection="dayplanDedicatedLine" item="item" open="(" separator="or" close=")">
- "dayplanDedicatedLine" like '%${item}%'
- </foreach>
- </if>
- <if test="wareHouseName != null">
- and
- <foreach collection="wareHouseName" item="item" open="(" separator="or" close=")">
- "wareHouseName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanConsigneeName != null">
- and
- <foreach collection="dayplanConsigneeName" item="item" open="(" separator="or" close=")">
- "dayplanConsigneeName" like '%${item}%'
- </foreach>
- </if>
- <if test="dayplanConsigneeTel != null">
- and
- <foreach collection="dayplanConsigneeTel" item="item" open="(" separator="or" close=")">
- "dayplanConsigneeTel" like '%${item}%'
- </foreach>
- </if>
- </where>
- <include refid="orderBy"></include>
- </select>
- </mapper>
|