|
|
|
|
@ -13,32 +13,30 @@ |
|
|
|
|
AND TASK_STATUS NOT IN (2, 9); |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="selectEquipmentPage" resultType="org.springblade.desk.logistics.pojo.vo.TaskVO"> |
|
|
|
|
SELECT * |
|
|
|
|
<select id="selectPage" resultType="org.springblade.desk.logistics.pojo.vo.TaskVO"> |
|
|
|
|
SELECT l.*, |
|
|
|
|
b.WC_NAME AS wcName |
|
|
|
|
FROM LM_TASK l |
|
|
|
|
WHERE IS_DELETED = 0 |
|
|
|
|
<!-- 修复原代码拼写错误:boxBarcodede → boxBarcode --> |
|
|
|
|
left join BS_WORK_CENTER b |
|
|
|
|
on l.WC_ID = b.ID |
|
|
|
|
WHERE l.IS_DELETED = 0 <!-- 关键修复:添加 l. 表别名 --> |
|
|
|
|
<!-- 以下筛选条件保持不变 --> |
|
|
|
|
<if test="taskDto.boxBarcode != null and taskDto.boxBarcode != ''"> |
|
|
|
|
AND l.BOX_BARCODE LIKE CONCAT('%', #{taskDto.boxBarcode}, '%') |
|
|
|
|
</if> |
|
|
|
|
<!-- wcId 判断 --> |
|
|
|
|
<if test="taskDto.wcId != null and taskDto.wcId != ''"> |
|
|
|
|
AND l.WC_ID = #{taskDto.wcId} |
|
|
|
|
</if> |
|
|
|
|
<!-- 站点 判断 --> |
|
|
|
|
<if test="taskDto.stationId != null and taskDto.stationId != ''"> |
|
|
|
|
AND l.STATION_ID = #{taskDto.stationId} |
|
|
|
|
</if> |
|
|
|
|
<!-- 状态判断 --> |
|
|
|
|
<if test="taskDto.taskStatus != null and taskDto.taskStatus != ''"> |
|
|
|
|
AND l.TASK_STATUS = #{taskDto.taskStatus} |
|
|
|
|
</if> |
|
|
|
|
<!-- 新增:开始时间判断(CREATE_TIME >= 开始时间) --> |
|
|
|
|
<if test="taskDto.startTime != null"> |
|
|
|
|
<if test="taskDto.startTime != null and taskDto.startTime != ''"> |
|
|
|
|
AND l.CREATE_TIME >= #{taskDto.startTime} |
|
|
|
|
</if> |
|
|
|
|
<!-- 新增:结束时间判断(CREATE_TIME <= 结束时间) --> |
|
|
|
|
<if test="taskDto.endTime != null"> |
|
|
|
|
<if test="taskDto.endTime != null and taskDto.endTime != ''"> |
|
|
|
|
AND l.CREATE_TIME <= #{taskDto.endTime} |
|
|
|
|
</if> |
|
|
|
|
ORDER BY l.CREATE_TIME DESC |
|
|
|
|
|