|
@@ -7,7 +7,7 @@
|
|
<result column="DAYPLAN_TRUCK_NUMBER" jdbcType="DECIMAL" property="dayplanTruckNumber" />
|
|
<result column="DAYPLAN_TRUCK_NUMBER" jdbcType="DECIMAL" property="dayplanTruckNumber" />
|
|
<result column="SHIPMENT_UNIT_ID" jdbcType="DECIMAL" property="shipmentUnitId" />
|
|
<result column="SHIPMENT_UNIT_ID" jdbcType="DECIMAL" property="shipmentUnitId" />
|
|
<result column="DAYPLAN_DELIVERY_PLACE" jdbcType="VARCHAR" property="dayplanDeliveryPlace" />
|
|
<result column="DAYPLAN_DELIVERY_PLACE" jdbcType="VARCHAR" property="dayplanDeliveryPlace" />
|
|
- <result column="DAYPLAN_RECEIVE_UNIT" jdbcType="VARCHAR" property="dayplanReceiveUnit" />
|
|
|
|
|
|
+ <result column="DAYPLAN_RECEIVE_UNIT" jdbcType="DECIMAL" property="dayplanReceiveUnit" />
|
|
<result column="DAYPLAN_DELIVERY_DATE" jdbcType="TIMESTAMP" property="dayplanDeliveryDate" />
|
|
<result column="DAYPLAN_DELIVERY_DATE" jdbcType="TIMESTAMP" property="dayplanDeliveryDate" />
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
<result column="DAYPLAN_MATERIAL_WEIGHT" jdbcType="DECIMAL" property="dayplanMaterialWeight" />
|
|
<result column="DAYPLAN_MATERIAL_WEIGHT" jdbcType="DECIMAL" property="dayplanMaterialWeight" />
|
|
@@ -17,18 +17,19 @@
|
|
<result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
<result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
|
+ <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="columns">
|
|
<sql id="columns">
|
|
DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER, SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE,
|
|
DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER, SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE,
|
|
DAYPLAN_RECEIVE_UNIT, DAYPLAN_DELIVERY_DATE, MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
DAYPLAN_RECEIVE_UNIT, DAYPLAN_DELIVERY_DATE, MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
- INSERT_UPDATE_REMARK
|
|
|
|
|
|
+ INSERT_UPDATE_REMARK, CARRIER_ID
|
|
</sql>
|
|
</sql>
|
|
<sql id="columns_alias">
|
|
<sql id="columns_alias">
|
|
t.DAYPLAN_ID, t.DAYPLAN_NO, t.DAYPLAN_TRUCK_NUMBER, t.SHIPMENT_UNIT_ID, t.DAYPLAN_DELIVERY_PLACE,
|
|
t.DAYPLAN_ID, t.DAYPLAN_NO, t.DAYPLAN_TRUCK_NUMBER, t.SHIPMENT_UNIT_ID, t.DAYPLAN_DELIVERY_PLACE,
|
|
t.DAYPLAN_RECEIVE_UNIT, t.DAYPLAN_DELIVERY_DATE, t.MATERIAL_ID, t.DAYPLAN_MATERIAL_WEIGHT,
|
|
t.DAYPLAN_RECEIVE_UNIT, t.DAYPLAN_DELIVERY_DATE, t.MATERIAL_ID, t.DAYPLAN_MATERIAL_WEIGHT,
|
|
t.DAYPLAN_RECEIVE_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
t.DAYPLAN_RECEIVE_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
- t.INSERT_UPDATE_REMARK
|
|
|
|
|
|
+ t.INSERT_UPDATE_REMARK, t.CARRIER_ID
|
|
</sql>
|
|
</sql>
|
|
<sql id="select">
|
|
<sql id="select">
|
|
SELECT <include refid="columns"/> FROM AMSTRUCK_RAIL_DAYPLAN
|
|
SELECT <include refid="columns"/> FROM AMSTRUCK_RAIL_DAYPLAN
|
|
@@ -37,7 +38,7 @@
|
|
SELECT <include refid="columns_alias"/> FROM AMSTRUCK_RAIL_DAYPLAN t
|
|
SELECT <include refid="columns_alias"/> FROM AMSTRUCK_RAIL_DAYPLAN t
|
|
</sql>
|
|
</sql>
|
|
<sql id="where">
|
|
<sql id="where">
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="dayplanId != null">
|
|
<if test="dayplanId != null">
|
|
and DAYPLAN_ID = #{dayplanId}
|
|
and DAYPLAN_ID = #{dayplanId}
|
|
</if>
|
|
</if>
|
|
@@ -53,7 +54,7 @@
|
|
<if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
<if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
and DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace}
|
|
and DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace}
|
|
</if>
|
|
</if>
|
|
- <if test="dayplanReceiveUnit != null and dayplanReceiveUnit != ''">
|
|
|
|
|
|
+ <if test="dayplanReceiveUnit != null">
|
|
and DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit}
|
|
and DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit}
|
|
</if>
|
|
</if>
|
|
<if test="dayplanDeliveryDate != null">
|
|
<if test="dayplanDeliveryDate != null">
|
|
@@ -83,10 +84,13 @@
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="carrierId != null">
|
|
|
|
+ and CARRIER_ID = #{carrierId}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<sql id="whereLike">
|
|
<sql id="whereLike">
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="dayplanId != null">
|
|
<if test="dayplanId != null">
|
|
and DAYPLAN_ID = #{dayplanId}
|
|
and DAYPLAN_ID = #{dayplanId}
|
|
</if>
|
|
</if>
|
|
@@ -102,8 +106,8 @@
|
|
<if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
<if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
and DAYPLAN_DELIVERY_PLACE LIKE '%${dayplanDeliveryPlace}%'
|
|
and DAYPLAN_DELIVERY_PLACE LIKE '%${dayplanDeliveryPlace}%'
|
|
</if>
|
|
</if>
|
|
- <if test="dayplanReceiveUnit != null and dayplanReceiveUnit != ''">
|
|
|
|
- and DAYPLAN_RECEIVE_UNIT LIKE '%${dayplanReceiveUnit}%'
|
|
|
|
|
|
+ <if test="dayplanReceiveUnit != null">
|
|
|
|
+ and DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit}
|
|
</if>
|
|
</if>
|
|
<if test="dayplanDeliveryDate != null">
|
|
<if test="dayplanDeliveryDate != null">
|
|
and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
|
|
and TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = #{dayplanDeliveryDate}
|
|
@@ -132,6 +136,9 @@
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
<if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="carrierId != null">
|
|
|
|
+ and CARRIER_ID = #{carrierId}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -140,63 +147,66 @@
|
|
</delete>
|
|
</delete>
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
<delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
delete from AMSTRUCK_RAIL_DAYPLAN
|
|
delete from AMSTRUCK_RAIL_DAYPLAN
|
|
- where 1!=1
|
|
|
|
- <if test="dayplanNo != null and dayplanNo != ''">
|
|
|
|
- or DAYPLAN_NO = #{dayplanNo}
|
|
|
|
- </if>
|
|
|
|
- <if test="dayplanTruckNumber != null">
|
|
|
|
- or DAYPLAN_TRUCK_NUMBER = #{dayplanTruckNumber}
|
|
|
|
- </if>
|
|
|
|
- <if test="shipmentUnitId != null">
|
|
|
|
- or SHIPMENT_UNIT_ID = #{shipmentUnitId}
|
|
|
|
- </if>
|
|
|
|
- <if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
|
|
- or DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace}
|
|
|
|
- </if>
|
|
|
|
- <if test="dayplanReceiveUnit != null and dayplanReceiveUnit != ''">
|
|
|
|
- or DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit}
|
|
|
|
- </if>
|
|
|
|
- <if test="dayplanDeliveryDate != null">
|
|
|
|
- or TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = '#{dayplanDeliveryDate}'
|
|
|
|
- </if>
|
|
|
|
- <if test="materialId != null">
|
|
|
|
- or MATERIAL_ID = #{materialId}
|
|
|
|
- </if>
|
|
|
|
- <if test="dayplanMaterialWeight != null">
|
|
|
|
- or DAYPLAN_MATERIAL_WEIGHT = #{dayplanMaterialWeight}
|
|
|
|
- </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>
|
|
|
|
|
|
+ where 1!=1
|
|
|
|
+ <if test="dayplanNo != null and dayplanNo != ''">
|
|
|
|
+ or DAYPLAN_NO = #{dayplanNo}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanTruckNumber != null">
|
|
|
|
+ or DAYPLAN_TRUCK_NUMBER = #{dayplanTruckNumber}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="shipmentUnitId != null">
|
|
|
|
+ or SHIPMENT_UNIT_ID = #{shipmentUnitId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanDeliveryPlace != null and dayplanDeliveryPlace != ''">
|
|
|
|
+ or DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanReceiveUnit != null">
|
|
|
|
+ or DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanDeliveryDate != null">
|
|
|
|
+ or TO_CHAR(DAYPLAN_DELIVERY_DATE,'yyyy-MM-dd') = '#{dayplanDeliveryDate}'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="materialId != null">
|
|
|
|
+ or MATERIAL_ID = #{materialId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanMaterialWeight != null">
|
|
|
|
+ or DAYPLAN_MATERIAL_WEIGHT = #{dayplanMaterialWeight}
|
|
|
|
+ </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>
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
- insert into AMSTRUCK_RAIL_DAYPLAN (DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER,
|
|
|
|
- SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE, DAYPLAN_RECEIVE_UNIT,
|
|
|
|
- DAYPLAN_DELIVERY_DATE, MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
|
|
- DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME,
|
|
|
|
- UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
|
- )
|
|
|
|
- values (#{dayplanId,jdbcType=DECIMAL}, #{dayplanNo,jdbcType=VARCHAR}, #{dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
- #{shipmentUnitId,jdbcType=DECIMAL}, #{dayplanDeliveryPlace,jdbcType=VARCHAR}, #{dayplanReceiveUnit,jdbcType=VARCHAR},
|
|
|
|
- #{dayplanDeliveryDate,jdbcType=TIMESTAMP}, #{materialId,jdbcType=DECIMAL}, #{dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
- #{dayplanReceiveStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
- #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
- )
|
|
|
|
|
|
+ insert into AMSTRUCK_RAIL_DAYPLAN (DAYPLAN_ID, DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER,
|
|
|
|
+ SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE, DAYPLAN_RECEIVE_UNIT,
|
|
|
|
+ DAYPLAN_DELIVERY_DATE, MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
|
|
+ DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME, INSERT_TIME,
|
|
|
|
+ UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
+ CARRIER_ID)
|
|
|
|
+ values (#{dayplanId,jdbcType=DECIMAL}, #{dayplanNo,jdbcType=VARCHAR}, #{dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
+ #{shipmentUnitId,jdbcType=DECIMAL}, #{dayplanDeliveryPlace,jdbcType=VARCHAR}, #{dayplanReceiveUnit,jdbcType=DECIMAL},
|
|
|
|
+ #{dayplanDeliveryDate,jdbcType=TIMESTAMP}, #{materialId,jdbcType=DECIMAL}, #{dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
+ #{dayplanReceiveStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
|
+ #{carrierId,jdbcType=DECIMAL})
|
|
</insert>
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
insert into AMSTRUCK_RAIL_DAYPLAN
|
|
insert into AMSTRUCK_RAIL_DAYPLAN
|
|
@@ -246,6 +256,9 @@
|
|
<if test="insertUpdateRemark != null">
|
|
<if test="insertUpdateRemark != null">
|
|
INSERT_UPDATE_REMARK,
|
|
INSERT_UPDATE_REMARK,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="carrierId != null">
|
|
|
|
+ CARRIER_ID,
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="dayplanId != null">
|
|
<if test="dayplanId != null">
|
|
@@ -264,7 +277,7 @@
|
|
#{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
#{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="dayplanReceiveUnit != null">
|
|
<if test="dayplanReceiveUnit != null">
|
|
- #{dayplanReceiveUnit,jdbcType=VARCHAR},
|
|
|
|
|
|
+ #{dayplanReceiveUnit,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
<if test="dayplanDeliveryDate != null">
|
|
<if test="dayplanDeliveryDate != null">
|
|
#{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
#{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
@@ -293,24 +306,28 @@
|
|
<if test="insertUpdateRemark != null">
|
|
<if test="insertUpdateRemark != null">
|
|
#{insertUpdateRemark,jdbcType=VARCHAR},
|
|
#{insertUpdateRemark,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="carrierId != null">
|
|
|
|
+ #{carrierId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
update AMSTRUCK_RAIL_DAYPLAN
|
|
update AMSTRUCK_RAIL_DAYPLAN
|
|
set DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
|
|
set DAYPLAN_NO = #{dayplanNo,jdbcType=VARCHAR},
|
|
- DAYPLAN_TRUCK_NUMBER = #{dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
- SHIPMENT_UNIT_ID = #{shipmentUnitId,jdbcType=DECIMAL},
|
|
|
|
- DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
|
|
- DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit,jdbcType=VARCHAR},
|
|
|
|
- DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
|
- MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
- DAYPLAN_MATERIAL_WEIGHT = #{dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
- 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}
|
|
|
|
|
|
+ DAYPLAN_TRUCK_NUMBER = #{dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
+ SHIPMENT_UNIT_ID = #{shipmentUnitId,jdbcType=DECIMAL},
|
|
|
|
+ DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
|
|
+ DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit,jdbcType=DECIMAL},
|
|
|
|
+ DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
|
+ MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
|
+ DAYPLAN_MATERIAL_WEIGHT = #{dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
+ 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}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckRailDayplan">
|
|
@@ -329,7 +346,7 @@
|
|
DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
DAYPLAN_DELIVERY_PLACE = #{dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="dayplanReceiveUnit != null">
|
|
<if test="dayplanReceiveUnit != null">
|
|
- DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit,jdbcType=VARCHAR},
|
|
|
|
|
|
+ DAYPLAN_RECEIVE_UNIT = #{dayplanReceiveUnit,jdbcType=DECIMAL},
|
|
</if>
|
|
</if>
|
|
<if test="dayplanDeliveryDate != null">
|
|
<if test="dayplanDeliveryDate != null">
|
|
DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
DAYPLAN_DELIVERY_DATE = #{dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
@@ -358,6 +375,9 @@
|
|
<if test="insertUpdateRemark != null">
|
|
<if test="insertUpdateRemark != null">
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="carrierId != null">
|
|
|
|
+ CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
</set>
|
|
</set>
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
@@ -374,100 +394,104 @@
|
|
<include refid="whereLike"/>
|
|
<include refid="whereLike"/>
|
|
</select>
|
|
</select>
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
- insert into AMSTRUCK_RAIL_DAYPLAN
|
|
|
|
- (DAYPLAN_ID,
|
|
|
|
- DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER,
|
|
|
|
- SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE,
|
|
|
|
- DAYPLAN_RECEIVE_UNIT, DAYPLAN_DELIVERY_DATE,
|
|
|
|
- MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
|
|
- DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME,
|
|
|
|
- INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
- UPDATE_TIME, INSERT_UPDATE_REMARK
|
|
|
|
- )
|
|
|
|
- ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
- select
|
|
|
|
- #{item.dayplanId,jdbcType=DECIMAL},
|
|
|
|
- #{item.dayplanNo,jdbcType=VARCHAR}, #{item.dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
- #{item.shipmentUnitId,jdbcType=DECIMAL}, #{item.dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
|
|
- #{item.dayplanReceiveUnit,jdbcType=VARCHAR}, #{item.dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
|
- #{item.materialId,jdbcType=DECIMAL}, #{item.dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
- #{item.dayplanReceiveStatus,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
|
- #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
|
- #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
|
- from dual
|
|
|
|
- </foreach> )
|
|
|
|
|
|
+ insert into AMSTRUCK_RAIL_DAYPLAN
|
|
|
|
+ (DAYPLAN_ID,
|
|
|
|
+ DAYPLAN_NO, DAYPLAN_TRUCK_NUMBER,
|
|
|
|
+ SHIPMENT_UNIT_ID, DAYPLAN_DELIVERY_PLACE,
|
|
|
|
+ DAYPLAN_RECEIVE_UNIT, DAYPLAN_DELIVERY_DATE,
|
|
|
|
+ MATERIAL_ID, DAYPLAN_MATERIAL_WEIGHT,
|
|
|
|
+ DAYPLAN_RECEIVE_STATUS, INSERT_USERNAME,
|
|
|
|
+ INSERT_TIME, UPDATE_USERNAME,
|
|
|
|
+ UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
|
+ CARRIER_ID)
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.dayplanId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.dayplanNo,jdbcType=VARCHAR}, #{item.dayplanTruckNumber,jdbcType=DECIMAL},
|
|
|
|
+ #{item.shipmentUnitId,jdbcType=DECIMAL}, #{item.dayplanDeliveryPlace,jdbcType=VARCHAR},
|
|
|
|
+ #{item.dayplanReceiveUnit,jdbcType=DECIMAL}, #{item.dayplanDeliveryDate,jdbcType=TIMESTAMP},
|
|
|
|
+ #{item.materialId,jdbcType=DECIMAL}, #{item.dayplanMaterialWeight,jdbcType=DECIMAL},
|
|
|
|
+ #{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} from dual
|
|
|
|
+ </foreach> )
|
|
</insert>
|
|
</insert>
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
- update AMSTRUCK_RAIL_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_TRUCK_NUMBER=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanTruckNumber,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,SHIPMENT_UNIT_ID=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.shipmentUnitId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,DAYPLAN_DELIVERY_PLACE=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDeliveryPlace,jdbcType=VARCHAR}
|
|
|
|
- </foreach>
|
|
|
|
- ,DAYPLAN_RECEIVE_UNIT=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanReceiveUnit,jdbcType=VARCHAR}
|
|
|
|
- </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>
|
|
|
|
- ,MATERIAL_ID=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
- ,DAYPLAN_MATERIAL_WEIGHT=
|
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
- when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanMaterialWeight,jdbcType=DECIMAL}
|
|
|
|
- </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>
|
|
|
|
- where DAYPLAN_ID in
|
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
- #{item.dayplanId,jdbcType=DECIMAL}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+ update AMSTRUCK_RAIL_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_TRUCK_NUMBER=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanTruckNumber,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,SHIPMENT_UNIT_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.shipmentUnitId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,DAYPLAN_DELIVERY_PLACE=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanDeliveryPlace,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,DAYPLAN_RECEIVE_UNIT=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanReceiveUnit,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>
|
|
|
|
+ ,MATERIAL_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,DAYPLAN_MATERIAL_WEIGHT=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case DAYPLAN_ID" close="end">
|
|
|
|
+ when #{item.dayplanId,jdbcType=DECIMAL} then #{item.dayplanMaterialWeight,jdbcType=DECIMAL}
|
|
|
|
+ </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>
|
|
|
|
+ where DAYPLAN_ID in
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
+ #{item.dayplanId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
</update>
|
|
</update>
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
delete from AMSTRUCK_RAIL_DAYPLAN
|
|
delete from AMSTRUCK_RAIL_DAYPLAN
|
|
- where DAYPLAN_ID in
|
|
|
|
|
|
+ where DAYPLAN_ID in
|
|
<foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
<foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -476,34 +500,187 @@
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 展示汽车发运焦炭/水渣日计划 -->
|
|
<!-- 展示汽车发运焦炭/水渣日计划 -->
|
|
<select id="getTruckRailDayPlan" parameterType="java.util.Map" resultType="java.util.Map">
|
|
<select id="getTruckRailDayPlan" parameterType="java.util.Map" resultType="java.util.Map">
|
|
- select
|
|
|
|
- t.DAYPLAN_ID "dayPlanId",
|
|
|
|
- t.dayplan_no as "dayplanNo",
|
|
|
|
- t.dayplan_truck_number as "dayplanTruckNumber",
|
|
|
|
- t.shipment_unit_id as "shipmentUnitId",
|
|
|
|
- t.dayplan_delivery_place as "dayplanDeliveryPlace",
|
|
|
|
- t.dayplan_receive_unit as "dayplanReceiveUnit",
|
|
|
|
- t.dayplan_delivery_date as "dayplanDeliveryDate",
|
|
|
|
- rm.material_name as "materialName",
|
|
|
|
- t.dayplan_material_weight as "dayplanMaterialWeight"
|
|
|
|
-from amstruck_rail_dayplan t
|
|
|
|
-left join rms_material rm on t.material_id=rm.material_id
|
|
|
|
-where t.dayplan_receive_status=0 and t.material_id=495
|
|
|
|
|
|
+ select *
|
|
|
|
+ from (
|
|
|
|
+ select t.DAYPLAN_ID "dayPlanId",
|
|
|
|
+ t.dayplan_no as "dayplanNo",
|
|
|
|
+ t.dayplan_truck_number as "dayplanTruckNumber",
|
|
|
|
+ rs.SHIPPER_NAME "shipperName",
|
|
|
|
+ rc.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
|
|
|
|
+ to_char(t.dayplan_delivery_date, 'yyyy-mm-dd') as "dayplanDeliveryDate",
|
|
|
|
+ rm.material_name as "materialName",
|
|
|
|
+ t.dayplan_material_weight as "dayplanMaterialWeight",
|
|
|
|
+ t.INSERT_UPDATE_REMARK "insertUpdateRemark",
|
|
|
|
+ RC2.CARRIER_NAME "carrierName",
|
|
|
|
+ t.INSERT_TIME "insertTime"
|
|
|
|
+ from amstruck_rail_dayplan t
|
|
|
|
+ left join rms_material rm on t.material_id = rm.material_id
|
|
|
|
+ left join RMS_SHIPPER rs on rs.SHIPPER_ID = t.SHIPMENT_UNIT_ID
|
|
|
|
+ left join RMS_CONSIGNEE RC on RC.CONSIGNEE_ID = t.DAYPLAN_RECEIVE_UNIT
|
|
|
|
+ left join RMS_CARRIER RC2 on RC2.CARRIER_ID = t.CARRIER_ID
|
|
|
|
+
|
|
|
|
+ <where>
|
|
|
|
+ t.material_id = 1
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ and t.dayplan_receive_status = #{status}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ )
|
|
|
|
+ <where>
|
|
|
|
+ <if test="dayplanNo != null">
|
|
|
|
+ <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanNo" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanTruckNumber != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="dayplanTruckNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanTruckNumber" 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="consigneeCompanyName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "consigneeCompanyName" 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="materialName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "materialName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanMaterialWeight != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="dayplanMaterialWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanMaterialWeight" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="carrierName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "carrierName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="insertUpdateRemark" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "insertUpdateRemark" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <include refid="orderBy"></include>
|
|
</select>
|
|
</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>
|
|
|
|
+
|
|
<!-- 展示汽车发运焦炭/水渣日计划 -->
|
|
<!-- 展示汽车发运焦炭/水渣日计划 -->
|
|
<select id="getSzTruckRailDayPlan" parameterType="java.util.Map" resultType="java.util.Map">
|
|
<select id="getSzTruckRailDayPlan" parameterType="java.util.Map" resultType="java.util.Map">
|
|
- select
|
|
|
|
- t.DAYPLAN_ID "dayPlanId",t.dayplan_no as "dayplanNo",
|
|
|
|
- t.dayplan_truck_number as "dayplanTruckNumber",
|
|
|
|
- t.shipment_unit_id as "shipmentUnitId",
|
|
|
|
- t.dayplan_delivery_place as "dayplanDeliveryPlace",
|
|
|
|
- t.dayplan_receive_unit as "dayplanReceiveUnit",
|
|
|
|
- t.dayplan_delivery_date as "dayplanDeliveryDate",
|
|
|
|
- rm.material_name as "materialName",
|
|
|
|
- t.dayplan_material_weight as "dayplanMaterialWeight"
|
|
|
|
-from amstruck_rail_dayplan t
|
|
|
|
-left join rms_material rm on t.material_id=rm.material_id
|
|
|
|
-where t.dayplan_receive_status=0 and t.material_id=496
|
|
|
|
|
|
+ select
|
|
|
|
+ *
|
|
|
|
+ from(
|
|
|
|
+ select t.DAYPLAN_ID "dayPlanId",
|
|
|
|
+ t.dayplan_no as "dayplanNo",
|
|
|
|
+ t.dayplan_truck_number as "dayplanTruckNumber",
|
|
|
|
+ rs.SHIPPER_NAME "shipperName",
|
|
|
|
+ rc.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
|
|
|
|
+ to_char(t.dayplan_delivery_date, 'yyyy-mm-dd') as "dayplanDeliveryDate",
|
|
|
|
+ rm.material_name as "materialName",
|
|
|
|
+ t.dayplan_material_weight as "dayplanMaterialWeight",
|
|
|
|
+ t.INSERT_UPDATE_REMARK "insertUpdateRemark",
|
|
|
|
+ RC2.CARRIER_NAME "carrierName",
|
|
|
|
+ t.INSERT_TIME "insertTime"
|
|
|
|
+ from amstruck_rail_dayplan t
|
|
|
|
+ left join rms_material rm on t.material_id = rm.material_id
|
|
|
|
+ left join RMS_SHIPPER rs on rs.SHIPPER_ID = t.SHIPMENT_UNIT_ID
|
|
|
|
+ left join RMS_CONSIGNEE RC on RC.CONSIGNEE_ID = t.DAYPLAN_RECEIVE_UNIT
|
|
|
|
+ left join RMS_CARRIER RC2 on RC2.CARRIER_ID = t.CARRIER_ID
|
|
|
|
+ <where>
|
|
|
|
+ t.material_id = 3650
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ and t.dayplan_receive_status = #{status}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ )
|
|
|
|
+ <where>
|
|
|
|
+ <if test="dayplanNo != null">
|
|
|
|
+ <foreach collection="dayplanNo" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanNo" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanTruckNumber != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="dayplanTruckNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanTruckNumber" 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="consigneeCompanyName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "consigneeCompanyName" 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="materialName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "materialName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dayplanMaterialWeight != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="dayplanMaterialWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "dayplanMaterialWeight" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="carrierName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "carrierName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="insertUpdateRemark" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "insertUpdateRemark" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ <include refid="orderBy"></include>
|
|
|
|
+
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 得到最大id -->
|
|
<!-- 得到最大id -->
|
|
@@ -523,4 +700,26 @@ where t.dayplan_receive_status=0 and t.material_id=496
|
|
ARRIVAL_NAME "label"
|
|
ARRIVAL_NAME "label"
|
|
from RMSTRAIN_ARRIVAL_SEND
|
|
from RMSTRAIN_ARRIVAL_SEND
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+<!-- 通过发运计划ID查询修改信息 -->
|
|
|
|
+ <select id="getDayPlanByDayPlanId" parameterType="int" resultType="java.util.Map">
|
|
|
|
+ select ARD.DAYPLAN_NO "dayplanNo",
|
|
|
|
+ ARD.DAYPLAN_TRUCK_NUMBER "dayplanTruckNumber",
|
|
|
|
+ ARD.SHIPMENT_UNIT_ID "shipperId",
|
|
|
|
+ ARD.DAYPLAN_RECEIVE_UNIT "dayplanReceiveUnit",
|
|
|
|
+ ARD.DAYPLAN_DELIVERY_DATE "dayplanDeliveryDate",
|
|
|
|
+ ARD.MATERIAL_ID "materialId",
|
|
|
|
+ ARD.DAYPLAN_MATERIAL_WEIGHT "dayplanMaterialWeight",
|
|
|
|
+ ARD.INSERT_UPDATE_REMARK "insertUpdateRemark"
|
|
|
|
+ from AMSTRUCK_RAIL_DAYPLAN ARD
|
|
|
|
+ where ARD.DAYPLAN_ID = #{dayplanId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+<!-- 查询所有承运商 -->
|
|
|
|
+ <select id="getCarrierMes" resultType="java.util.Map">
|
|
|
|
+ select RC.CARRIER_ID "id",
|
|
|
|
+ RC.CARRIER_ID "value",
|
|
|
|
+ RC.CARRIER_NAME "label"
|
|
|
|
+ from RMS_CARRIER RC
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|