|
@@ -227,8 +227,11 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="factoryId != null and factoryId != '' and factoryId != 'ALL'">and a1.TENANTID = #{factoryId}</if>
|
|
|
- <if test="startTime != null ">and a1.PLANSTARTDATE >= #{startTime}</if>
|
|
|
- <if test="endTime != null ">and a1.PLANENDDATE <= #{endTime}</if>
|
|
|
+
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and (#{startTime} between a1.PLANSTARTDATE and a1.PLANENDDATE
|
|
|
+ or #{endTime} between a1.PLANSTARTDATE and a1.PLANENDDATE)
|
|
|
+ </if>
|
|
|
<if test="processids != null ">and a1.PROCESSID in (${processids})</if>
|
|
|
</where>
|
|
|
order by a1.PLANSTARTDATE asc,a1.PLANENDDATE asc
|