From 355dda1f90c70ab04c4517688da37d1a4236f112 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期二, 23 十二月 2025 21:43:30 +0800
Subject: [PATCH] fix:优化保存
---
ruoyi-system/src/main/resources/mapper/system/SysTaskMapper.xml | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysTaskMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysTaskMapper.xml
index 1b5cfbb..3206401 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysTaskMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysTaskMapper.xml
@@ -86,6 +86,11 @@
<if test="taskCode != null and taskCode != ''"> and t.task_code like concat('%', #{taskCode}, '%')</if>
<if test="taskType != null and taskType != ''"> and t.task_type = #{taskType}</if>
<if test="taskStatus != null and taskStatus != ''"> and t.task_status = #{taskStatus}</if>
+ <if test="taskStatusList != null and taskStatusList != ''"> and t.task_status in
+ <foreach collection="taskStatusList.split(',')" item="status" open="(" separator="," close=")">
+ #{status}
+ </foreach>
+ </if>
<if test="vehicleNo != null and vehicleNo != ''"> and v.vehicle_no like concat('%', #{vehicleNo}, '%')</if>
<!-- 缁煎悎鏌ヨ锛氬綋鍓嶇敤鎴锋墍鍦ㄦ満鏋� OR 褰撳墠鐢ㄦ埛鍒涘缓 OR 鍒嗛厤缁欏綋鍓嶇敤鎴� -->
<if test="(creatorId != null and creatorId != 0) or (assigneeId != null and assigneeId != 0) or (deptId != null and deptId != 0) or (deptIds != null and deptIds.size() > 0)">
@@ -188,14 +193,13 @@
<select id="selectTaskByVehicleIdAndDate" resultMap="SysTaskResult">
select tv.task_id, t.actual_start_time,
- IFNULL(t.actual_end_time, NOW()) as t.actual_end_time
+ IFNULL(t.actual_end_time, NOW()) as actual_end_time
from sys_task_vehicle tv
inner join sys_task t on tv.task_id = t.task_id
where tv.vehicle_id = #{vehicleId}
and t.del_flag = '0'
and (
- (t.actual_end_time is not null and t.actual_start_time > #{startTime} and t.actual_end_time < #{endTime} )
- or (t.actual_end_time is null and t.actual_start_time > ${endTime} )
+ (t.actual_start_time <= #{endTime} and (t.actual_end_time is null or t.actual_end_time >= #{startTime}))
)
order by t.actual_start_time
</select>
@@ -290,7 +294,6 @@
<if test="actualEndTime != null">actual_end_time = #{actualEndTime},</if>
<if test="creatorId != null">creator_id = #{creatorId},</if>
<if test="assigneeId != null">assignee_id = #{assigneeId},</if>
-
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
--
Gitblit v1.9.1