|
@@ -1,6 +1,265 @@
|
|
|
<?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="java.lang.Short">
|
|
|
+ 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=",">
|
|
@@ -22,15 +281,9 @@
|
|
|
<if test="dayplanOwnCarsAmout != null">
|
|
|
DAYPLAN_OWN_CARS_AMOUT,
|
|
|
</if>
|
|
|
- <if test="dayplanDedicatedLineId != null">
|
|
|
- DAYPLAN_DEDICATED_LINE_ID,
|
|
|
- </if>
|
|
|
<if test="dayplanToTheStationId != null">
|
|
|
DAYPLAN_TO_THE_STATION_ID,
|
|
|
</if>
|
|
|
- <if test="transferUnitId != null">
|
|
|
- TRANSFER_UNIT_ID,
|
|
|
- </if>
|
|
|
<if test="dayplanWagonNumber != null">
|
|
|
DAYPLAN_WAGON_NUMBER,
|
|
|
</if>
|
|
@@ -61,6 +314,15 @@
|
|
|
<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">
|
|
@@ -81,15 +343,9 @@
|
|
|
<if test="dayplanOwnCarsAmout != null">
|
|
|
#{dayplanOwnCarsAmout,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="dayplanDedicatedLineId != null">
|
|
|
- #{dayplanDedicatedLineId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
<if test="dayplanToTheStationId != null">
|
|
|
#{dayplanToTheStationId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="transferUnitId != null">
|
|
|
- #{transferUnitId,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
<if test="dayplanWagonNumber != null">
|
|
|
#{dayplanWagonNumber,jdbcType=DECIMAL},
|
|
|
</if>
|
|
@@ -120,84 +376,417 @@
|
|
|
<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_DEDICATED_LINE_ID = #{dayplanDedicatedLineId,jdbcType=DECIMAL},
|
|
|
- DAYPLAN_TO_THE_STATION_ID = #{dayplanToTheStationId,jdbcType=DECIMAL},
|
|
|
- TRANSFER_UNIT_ID = #{transferUnitId,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}
|
|
|
- where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
|
- </update>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
- delete from AMS_RAIL_OFFSET_DAYPLAN
|
|
|
- where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
|
- </delete>
|
|
|
- <!-- 友情提示!!!-->
|
|
|
- <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+ 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="java.lang.Short" 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
|
|
|
- t.DAYPLAN_ID "dayPlanId",
|
|
|
- t.dayplan_no as "dayplanNo",
|
|
|
- t.dayplan_date as "dayplanDate",
|
|
|
- rs.shipper_name as "shipperName",
|
|
|
- t.dayplan_delivery_date as "dayplanDeliveryDate",
|
|
|
- t.dayplan_own_cars_amout as "dayplanOwnCarsAmout",
|
|
|
- ras.arrival_name as "arrivalName",
|
|
|
- ras.dayplan_dedicated_line as "dayplanDedicatedLine",
|
|
|
- ras.transfer_unit as "transferUnit",
|
|
|
- t.dayplan_wagon_number as "dayplanWagonNumber",
|
|
|
- rc.consignee_company_name as "consigneeCompanyName",
|
|
|
- t.dayplan_consignee_name as "dayplanConsigneeName",
|
|
|
- t.dayplan_consignee_tel as "dayplanConsigneeTel"
|
|
|
-from ams_rail_offset_dayplan t
|
|
|
-left join rms_shipper rs on t.shipper_id=rs.shipper_id
|
|
|
-left join rmstrain_arrival_send ras on t.dayplan_to_the_station_id=ras.arrival_id
|
|
|
-left join rms_consignee rc on t.receiving_unit_id =rc.consignee_id
|
|
|
-where t.dayplan_receive_status=0
|
|
|
+ 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
|
|
|
+ <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>
|
|
|
|
|
|
-<!-- 通过主键Id查询发运钢材到异地库计划数据用于修改 -->
|
|
|
+ <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",
|
|
|
+ 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"
|
|
|
+ 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="int" resultType="java.util.Map">
|
|
|
- select OFFSET_MATERIAL_ID "offsetMaterialId",
|
|
|
- OFFSET_MATERIAL_NUMBER "offsetMaterialNumber",
|
|
|
- OFFSET_MATERIAL_WEIGHT "offsetMaterialWeight"
|
|
|
- from AMS_RAIL_OFFSET_MATERIAL AROM
|
|
|
- where DAYPLAN_ID = #{dayplanId}
|
|
|
+ <!-- 通过发运计划主键查询关联所有物资信息 -->
|
|
|
+ <select id="getMaterialMesByDayPlanId" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ SELECT *
|
|
|
+ FROM (SELECT 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 DAY_PLAN_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 "arrivalName"
|
|
|
+ FROM RMSTRAIN_ARRIVAL_SEND RAS
|
|
|
</select>
|
|
|
</mapper>
|