|
@@ -174,7 +174,7 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
|
|
delete
|
|
delete
|
|
from AMS_RAIL_OFFSET_DAYPLAN
|
|
from AMS_RAIL_OFFSET_DAYPLAN
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
@@ -473,7 +473,7 @@
|
|
</set>
|
|
</set>
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
</update>
|
|
</update>
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
|
|
<include refid="select"/>
|
|
<include refid="select"/>
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
where DAYPLAN_ID = #{dayplanId,jdbcType=DECIMAL}
|
|
</select>
|
|
</select>
|
|
@@ -753,13 +753,18 @@
|
|
<!-- 通过发运计划主键查询关联所有物资信息 -->
|
|
<!-- 通过发运计划主键查询关联所有物资信息 -->
|
|
<select id="getMaterialMesByDayPlanId" parameterType="java.util.Map" resultType="java.util.Map">
|
|
<select id="getMaterialMesByDayPlanId" parameterType="java.util.Map" resultType="java.util.Map">
|
|
SELECT *
|
|
SELECT *
|
|
- FROM (SELECT RM.MATERIAL_NAME AS "materailName",
|
|
|
|
|
|
+ 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_NUMBER AS "materialNumber",
|
|
AROM.OFFSET_MATERIAL_WEIGHT AS "materialWeight"
|
|
AROM.OFFSET_MATERIAL_WEIGHT AS "materialWeight"
|
|
FROM AMS_RAIL_OFFSET_MATERIAL AROM
|
|
FROM AMS_RAIL_OFFSET_MATERIAL AROM
|
|
LEFT JOIN RMS_MATERIAL RM
|
|
LEFT JOIN RMS_MATERIAL RM
|
|
ON AROM.MATERIAL_ID = RM.MATERIAL_ID
|
|
ON AROM.MATERIAL_ID = RM.MATERIAL_ID
|
|
- WHERE DAY_PLAN_ID = #{dayplanId})
|
|
|
|
|
|
+ WHERE arom.dayplan_id = #{dayplanId})
|
|
<where>
|
|
<where>
|
|
<if test="materailName != null">
|
|
<if test="materailName != null">
|
|
and
|
|
and
|
|
@@ -786,7 +791,110 @@
|
|
<select id="getdayPlanToTheStationId" resultType="java.util.Map">
|
|
<select id="getdayPlanToTheStationId" resultType="java.util.Map">
|
|
SELECT RAS.ARRIVAL_ID AS "id",
|
|
SELECT RAS.ARRIVAL_ID AS "id",
|
|
RAS.ARRIVAL_ID AS "value",
|
|
RAS.ARRIVAL_ID AS "value",
|
|
- RAS.ARRIVAL_NAME AS "arrivalName"
|
|
|
|
|
|
+ RAS.ARRIVAL_NAME AS "label"
|
|
FROM RMSTRAIN_ARRIVAL_SEND RAS
|
|
FROM RMSTRAIN_ARRIVAL_SEND RAS
|
|
</select>
|
|
</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>
|
|
</mapper>
|