|
@@ -193,11 +193,34 @@
|
|
<if test=" executorName!= null and executorName != '' ">
|
|
<if test=" executorName!= null and executorName != '' ">
|
|
AND te.executor_name LIKE CONCAT('%', #{executorName}, '%')
|
|
AND te.executor_name LIKE CONCAT('%', #{executorName}, '%')
|
|
</if>
|
|
</if>
|
|
- <if test=" startDate!= null">
|
|
|
|
|
|
+ <!--<if test=" startDate!= null">
|
|
AND task.start_date > #{startDate}
|
|
AND task.start_date > #{startDate}
|
|
</if>
|
|
</if>
|
|
<if test=" endDate!= null">
|
|
<if test=" endDate!= null">
|
|
AND task.end_date < #{endDate}
|
|
AND task.end_date < #{endDate}
|
|
|
|
+ </if>-->
|
|
|
|
+ <if test=" startDate!= null and endDate!= null">
|
|
|
|
+ AND
|
|
|
|
+ (
|
|
|
|
+ (
|
|
|
|
+ (task.start_date IS NULL OR task.start_date <= #{startDate}) AND (task.end_date >= #{startDate} AND task.end_date <= #{endDate})
|
|
|
|
+ )
|
|
|
|
+ OR
|
|
|
|
+ (
|
|
|
|
+ (task.end_date IS NULL OR task.end_date >= #{endDate}) AND (task.start_date >= #{startDate} AND task.start_date <= #{endDate})
|
|
|
|
+ )
|
|
|
|
+ OR
|
|
|
|
+ (
|
|
|
|
+ task.start_date IS NOT NULL AND task.end_date IS NOT NULL AND task.start_date >= #{startDate}
|
|
|
|
+ AND task.start_date <= #{endDate} AND task.end_date >= #{startDate} AND task.end_date <= #{endDate}
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" startDate != null and endDate == null">
|
|
|
|
+ AND (task.end_date IS NOT NULL and task.end_date >= #{startDate})
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" startDate == null and endDate != null">
|
|
|
|
+ AND (task.start_date IS NOT NULL and task.start_date <= #{endDate})
|
|
</if>
|
|
</if>
|
|
<if test=" companyId!= null ">
|
|
<if test=" companyId!= null ">
|
|
AND task.company_id = #{companyId}
|
|
AND task.company_id = #{companyId}
|
|
@@ -275,11 +298,34 @@
|
|
<if test=" executorName!= null and executorName != '' ">
|
|
<if test=" executorName!= null and executorName != '' ">
|
|
AND te.executor_name LIKE CONCAT('%', #{executorName}, '%')
|
|
AND te.executor_name LIKE CONCAT('%', #{executorName}, '%')
|
|
</if>
|
|
</if>
|
|
- <if test=" startDate!= null ">
|
|
|
|
|
|
+ <!--<if test=" startDate!= null ">
|
|
AND task.start_date > #{startDate}
|
|
AND task.start_date > #{startDate}
|
|
</if>
|
|
</if>
|
|
<if test=" endDate!= null ">
|
|
<if test=" endDate!= null ">
|
|
AND task.end_date < #{endDate}
|
|
AND task.end_date < #{endDate}
|
|
|
|
+ </if>-->
|
|
|
|
+ <if test=" startDate!= null and endDate!= null">
|
|
|
|
+ AND
|
|
|
|
+ (
|
|
|
|
+ (
|
|
|
|
+ (task.start_date IS NULL OR task.start_date <= #{startDate}) AND (task.end_date >= #{startDate} AND task.end_date <= #{endDate})
|
|
|
|
+ )
|
|
|
|
+ OR
|
|
|
|
+ (
|
|
|
|
+ (task.end_date IS NULL OR task.end_date >= #{endDate}) AND (task.start_date >= #{startDate} AND task.start_date <= #{endDate})
|
|
|
|
+ )
|
|
|
|
+ OR
|
|
|
|
+ (
|
|
|
|
+ task.start_date IS NOT NULL AND task.end_date IS NOT NULL AND task.start_date >= #{startDate}
|
|
|
|
+ AND task.start_date <= #{endDate} AND task.end_date >= #{startDate} AND task.end_date <= #{endDate}
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" startDate != null and endDate == null">
|
|
|
|
+ AND (task.end_date IS NOT NULL and task.end_date >= #{startDate})
|
|
|
|
+ </if>
|
|
|
|
+ <if test=" startDate == null and endDate != null">
|
|
|
|
+ AND (task.start_date IS NOT NULL and task.start_date <= #{endDate})
|
|
</if>
|
|
</if>
|
|
<if test=" companyId!= null ">
|
|
<if test=" companyId!= null ">
|
|
AND task.company_id = #{companyId}
|
|
AND task.company_id = #{companyId}
|