|
@@ -27,8 +27,19 @@
|
|
|
left join ${database_system}.sys_dept d on a.dept_id = d.dept_id
|
|
|
<where>
|
|
|
<if test="type != null and type != ''">and a.type = #{type}</if>
|
|
|
- <if test="startDate != null and startDate != ''">and a.update_time >= concat(#{startDate},' 00:00:00')</if>
|
|
|
- <if test="endDate != null and endDate != ''">and a.update_time <= concat(#{endDate},' 23:59:59')</if>
|
|
|
+ <choose>
|
|
|
+ <when test="mark != null and mark != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
|
|
+ and a.update_time >= concat(#{startDate},' 00:00:00')
|
|
|
+ and a.update_time <= concat(#{endDate},' 23:59:59')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and a.update_time is not null
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
<if test="deptIds != null and deptIds != ''">and CONCAT(d.ancestors,',',a.dept_id) = #{deptIds}</if>
|
|
|
</where>
|
|
|
</select>
|