|
@@ -517,7 +517,8 @@
|
|
RW.WAREHOUSE_NAME "unloadPointName",
|
|
RW.WAREHOUSE_NAME "unloadPointName",
|
|
t_unload.RESULT_BIG_TICKET_WEIGHT "resultBigTicketWeight",
|
|
t_unload.RESULT_BIG_TICKET_WEIGHT "resultBigTicketWeight",
|
|
t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT "resultRailHorizontalWeight",
|
|
t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT "resultRailHorizontalWeight",
|
|
- t_unload.RESULT_REMARK "resultRemark"
|
|
|
|
|
|
+ t_unload.RESULT_REMARK "resultRemark",
|
|
|
|
+ DBI.INFACTORY_SHIP_NAME "infactoryShipName"
|
|
from TMSTRAIN_LOADING_RESULT t_load
|
|
from TMSTRAIN_LOADING_RESULT t_load
|
|
left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
|
|
left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
|
|
on t_load.RESULT_WAGON_NO=t_unload.RESULT_WAGON_NO
|
|
on t_load.RESULT_WAGON_NO=t_unload.RESULT_WAGON_NO
|
|
@@ -526,101 +527,30 @@
|
|
left join DIL_BATCH d_batch
|
|
left join DIL_BATCH d_batch
|
|
on t_load.BATCH_ID=d_batch.BATCH_ID
|
|
on t_load.BATCH_ID=d_batch.BATCH_ID
|
|
left join RMS_MATERIAL r_material
|
|
left join RMS_MATERIAL r_material
|
|
- on d_batch.MATERIAL_ID=r_material.MATERIAL_ID
|
|
|
|
|
|
+ on t_load.MATERIAL_ID=r_material.MATERIAL_ID
|
|
left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
|
|
left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
|
|
on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
|
|
on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
|
|
left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
|
|
left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
|
|
on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
|
|
on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
|
|
left join RMS_WAREHOUSE RW
|
|
left join RMS_WAREHOUSE RW
|
|
on RW.WAREHOUSE_ID = t_unload.UNLOADING_POINT_ID
|
|
on RW.WAREHOUSE_ID = t_unload.UNLOADING_POINT_ID
|
|
|
|
+ left join DIL_BATCH_INFACOTRY DBI
|
|
|
|
+ on DBI.BATCH_ID = d_batch.BATCH_ID
|
|
where t_unload.DELETED = 0 and t_load.DELETED = 2 and t_unload.RESULT_TYPE = #{resultType}
|
|
where t_unload.DELETED = 0 and t_load.DELETED = 2 and t_unload.RESULT_TYPE = #{resultType}
|
|
|
|
+ <if test="con!=null and con!=''.toString()">
|
|
|
|
+ and (
|
|
|
|
+ a_order.PURCHASE_ORDER_NO like concat('%',concat(#{con},'%'))
|
|
|
|
+ or t_unload.RESULT_WAGON_NO like concat('%',concat(#{con},'%'))
|
|
|
|
+ or t_unload.RESULT_WAGON_NO like concat('%',concat(#{con},'%'))
|
|
|
|
+ or t_load.RESULT_CLASS like concat('%',concat(#{con},'%'))
|
|
|
|
+ or d_batch.RESULT_FOREIGN_SHIP_NAME like concat('%',concat(#{con},'%'))
|
|
|
|
+ or r_material.MATERIAL_NAME like concat('%',concat(#{con},'%'))
|
|
|
|
+ or r_s_arrival.ARRIVAL_NAME like concat('%',concat(#{con},'%'))
|
|
|
|
+ or r_a_arrival.ARRIVAL_NAME like concat('%',concat(#{con},'%'))
|
|
|
|
+ or RW.WAREHOUSE_NAME like concat('%',concat(#{con},'%'))
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
)
|
|
)
|
|
- <where>
|
|
|
|
- <if test="purchaseOrderNo != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
|
- "purchaseOrderNo" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultWagonNo != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultWagonNo" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultLoadingDate != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultLoadingDate" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultArrivalDate != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultArrivalDate" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultArrivalDate" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultUnloadTime != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultUnloadTime" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultUnloadTime" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultClass != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultClass" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultClass" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultForeignShipName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultForeignShipName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="materialName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "materialName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="sendStationName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "sendStationName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="arrivalStationName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
|
|
|
|
- arrivalStationName like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="unloadPointName != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="unloadPointName" item="item" open="(" separator="or" close=")">
|
|
|
|
- "unloadPointName" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultBigTicketWeight != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultBigTicketWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultBigTicketWeight" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultRailHorizontalWeight != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultRailHorizontalWeight" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultRailHorizontalWeight" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- <if test="resultRemark != null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="resultRemark" item="item" open="(" separator="or" close=")">
|
|
|
|
- "resultRemark" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
<include refid="orderBy"></include>
|
|
<include refid="orderBy"></include>
|
|
<if test="orderField == null ">
|
|
<if test="orderField == null ">
|
|
order by "resultUnloadTime" desc
|
|
order by "resultUnloadTime" desc
|