feat(schedule): 优化楼层任务调度逻辑
- 新增任务执行阶段状态管理,支持多阶段任务查询 - 完善任务下发逻辑,增加任务执行状态更新机制 - 修改PLC写入逻辑,确保任务正确下发至设备 - 移除冗余代码,提升线程执行效率 - 更新任务执行阶段常量定义,统一状态码管理 - 优化MydoJob实体类,支持执行阶段列表查询 - 调整数据库查询条件,支持入口ID列表筛选
This commit is contained in:
@@ -36,23 +36,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
<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 trayCode = #{tray_code}</if>
|
||||
<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 trayCode = #{tray_code}</if>
|
||||
<if test="epList != null and epList.size() > 0">
|
||||
and entrance_id in
|
||||
<foreach item="item" index="index" collection="epList" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user