|
|
@@ -74,12 +74,12 @@
|
|
|
INNER JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
INNER JOIN xjr_workflow_form_relation t3 ON t3.form_key_value = t1.id
|
|
|
WHERE t3.current_state = 'COMPLETED' AND t2.delete_mark = 0
|
|
|
- <if test="dto.startDate != null and dto.endDate != null">
|
|
|
+ <if test="dto.startTime != null and dto.endTime != null">
|
|
|
AND (
|
|
|
- (t1.leave_start_time BETWEEN concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59'))
|
|
|
- OR (t1.leave_end_time BETWEEN concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59'))
|
|
|
- OR (t1.leave_start_time > concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59') > t1.leave_end_time)
|
|
|
- OR (concat(#{dto.startDate}, '00:00:00') > t1.leave_start_time and t1.leave_end_time > concat(#{dto.endDate}, '23:59:59'))
|
|
|
+ (t1.leave_start_time BETWEEN #{dto.startTime} and #{dto.endTime})
|
|
|
+ OR (t1.leave_end_time BETWEEN #{dto.startTime} and #{dto.endTime})
|
|
|
+ OR (t1.leave_start_time > #{dto.startTime} and #{dto.endTime} > t1.leave_end_time)
|
|
|
+ OR (#{dto.startTime} > t1.leave_start_time and t1.leave_end_time > #{dto.endTime})
|
|
|
)
|
|
|
</if>
|
|
|
<if test="dto.userIds != null and dto.userIds.size() > 0">
|
|
|
@@ -91,6 +91,12 @@
|
|
|
<if test="dto.leaveType != null and dto.leaveType != ''">
|
|
|
AND #{dto.leaveType} like concat('%', t1.leave_type, '%')
|
|
|
</if>
|
|
|
+ <if test="dto.name != null and dto.name != ''">
|
|
|
+ AND t2.name like concat('%', #{dto.name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.userName != null and dto.userName != ''">
|
|
|
+ AND t2.user_name like concat('%', #{dto.userName}, '%')
|
|
|
+ </if>
|
|
|
GROUP BY t1.user_id,t1.leave_type
|
|
|
ORDER BY t2.user_name
|
|
|
</select>
|
|
|
@@ -106,12 +112,12 @@
|
|
|
INNER JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
INNER JOIN xjr_workflow_form_relation t3 ON t3.form_key_value = t1.id
|
|
|
WHERE t3.current_state = 'COMPLETED' AND t2.delete_mark = 0
|
|
|
- <if test="dto.startDate != null and dto.endDate != null">
|
|
|
+ <if test="dto.startTime != null and dto.endTime != null">
|
|
|
AND (
|
|
|
- (t1.leave_start_time BETWEEN concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59'))
|
|
|
- OR (t1.leave_end_time BETWEEN concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59'))
|
|
|
- OR (t1.leave_start_time > concat(#{dto.startDate}, '00:00:00') and concat(#{dto.endDate}, '23:59:59') > t1.leave_end_time)
|
|
|
- OR (concat(#{dto.startDate}, '00:00:00') > t1.leave_start_time and t1.leave_end_time > concat(#{dto.endDate}, '23:59:59'))
|
|
|
+ (t1.leave_start_time BETWEEN #{dto.startTime} and #{dto.endTime})
|
|
|
+ OR (t1.leave_end_time BETWEEN #{dto.startTime} and #{dto.endTime})
|
|
|
+ OR (t1.leave_start_time > #{dto.startTime} and #{dto.endTime} > t1.leave_end_time)
|
|
|
+ OR (#{dto.startTime} > t1.leave_start_time and t1.leave_end_time > #{dto.endTime})
|
|
|
)
|
|
|
</if>
|
|
|
<if test="dto.userIds != null and dto.userIds.size() > 0">
|
|
|
@@ -123,6 +129,12 @@
|
|
|
<if test="dto.leaveType != null and dto.leaveType != ''">
|
|
|
AND #{dto.leaveType} like concat('%', t1.leave_type, '%')
|
|
|
</if>
|
|
|
+ <if test="dto.name != null and dto.name != ''">
|
|
|
+ AND t2.name like concat('%', #{dto.name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="dto.userName != null and dto.userName != ''">
|
|
|
+ AND t2.user_name like concat('%', #{dto.userName}, '%')
|
|
|
+ </if>
|
|
|
GROUP BY t1.user_id,t1.leave_type
|
|
|
ORDER BY t2.user_name
|
|
|
</select>
|