|
|
|
|
@@ -38,6 +38,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag,flag,tray_code,tray_size,wms_task_no from mydo_job_wcs_finish
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<sql id="selectMydoJobUnion">
|
|
|
|
|
SELECT * FROM (
|
|
|
|
|
SELECT
|
|
|
|
|
job_id,status,task_no,roadway_id,cargo_space_id,target_roadway_id,target_cargo_space_id,priority,execution_phase,in_or_out,create_time,start_time,finish_time,entrance_id,exit_id,warehouse_id,fault_flag,flag,tray_code,tray_size,wms_task_no,'mydo_job_wcs' AS source_table
|
|
|
|
|
FROM mydo_job_wcs
|
|
|
|
|
UNION ALL
|
|
|
|
|
SELECTjob_id,status,task_no,roadway_id,cargo_space_id,target_roadway_id,target_cargo_space_id,priority,execution_phase,in_or_out,create_time,start_time,finish_time,entrance_id,exit_id,warehouse_id,fault_flag,flag,tray_code,tray_size,wms_task_no,'mydo_job_wcs_finish' AS source_table
|
|
|
|
|
FROM mydo_job_wcs_finish
|
|
|
|
|
)
|
|
|
|
|
AS combined_jobs
|
|
|
|
|
ORDER BY create_time DESC; -- 按创建时间倒序(最新在前)
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectMydoJobUnionList" parameterType="MydoJob" resultMap="MydoJobResult">
|
|
|
|
|
<include refid="selectMydoJobUnion"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="status != null and status != ''">and status = #{status}</if>
|
|
|
|
|
<if test="taskNo != null and taskNo != ''">and task_no = #{taskNo}</if>
|
|
|
|
|
<if test="roadwayId != null and roadwayId != ''">and roadway_id = #{roadwayId}</if>
|
|
|
|
|
<if test="cargoSpaceId != null and cargoSpaceId != ''">and cargo_space_id = #{cargoSpaceId}</if>
|
|
|
|
|
<if test="targetRoadwayId != null and targetRoadwayId != ''">and target_roadway_id = #{targetRoadwayId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''">and target_cargo_space_id =
|
|
|
|
|
#{targetCargoSpaceId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="priority != null ">and priority = #{priority}</if>
|
|
|
|
|
<if test="executionPhase != null and executionPhase != ''">and execution_phase = #{executionPhase}</if>
|
|
|
|
|
<if test="inOrOut != null and inOrOut != ''">and in_or_out = #{inOrOut}</if>
|
|
|
|
|
<if test="startTime != null and startTime != ''">and start_time = #{startTime}</if>
|
|
|
|
|
<if test="finishTime != null and finishTime != ''">and finish_time = #{finishTime}</if>
|
|
|
|
|
<if test="entranceId != null and entranceId != ''">and entrance_id = #{entranceId}</if>
|
|
|
|
|
<if test="exitId != null and exitId != ''">and exit_id = #{exitId}</if>
|
|
|
|
|
<if test="warehouseId != null and warehouseId != ''">and warehouse_id = #{warehouseId}</if>
|
|
|
|
|
<if test="faultFlag != null and faultFlag != ''">and fault_flag = #{faultFlag}</if>
|
|
|
|
|
<if test="flag != null and flag != ''">and flag = #{flag}</if>
|
|
|
|
|
<if test="trayCode != null and trayCode != ''">and tray_code = #{trayCode}</if>
|
|
|
|
|
<if test="traySize != null and traySize != ''">and traySize = #{tray_size}</if>
|
|
|
|
|
<if test="epList != null and epList.size() > 0">
|
|
|
|
|
and entrance_id in
|
|
|
|
|
<foreach item="item" index="index" collection="epList" separator="," open="(" close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="wmsTaskNo != null and wmsTaskNo != ''">and wms_task_no = #{wmsTaskNo}</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY create_time DESC,finish_time DESC;
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
|
|
|
|
<include refid="selectMydoJobVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
|