|
|
@ -84,7 +84,22 @@ |
|
|
<where> |
|
|
<where> |
|
|
<if test="taskPatrolledId != null and taskPatrolledId != ''">and a.task_patrolled_id = #{taskPatrolledId} |
|
|
<if test="taskPatrolledId != null and taskPatrolledId != ''">and a.task_patrolled_id = #{taskPatrolledId} |
|
|
</if> |
|
|
</if> |
|
|
<if test="taskName != null and taskName != ''">and a.task_name like concat('%', #{taskName}, '%')</if> |
|
|
|
|
|
|
|
|
<choose> |
|
|
|
|
|
<!-- 当taskName和areaTaskName都有值时 --> |
|
|
|
|
|
<when test="taskName != null and taskName != '' and areaTaskName != null and areaTaskName != ''"> |
|
|
|
|
|
and (a.task_name like concat('%', #{taskName}, '%') |
|
|
|
|
|
or a.task_name like concat('%', #{areaTaskName}, '%')) |
|
|
|
|
|
</when> |
|
|
|
|
|
<otherwise> |
|
|
|
|
|
<!-- 只有一个参数有值时 --> |
|
|
|
|
|
<if test="taskName != null and taskName != ''"> |
|
|
|
|
|
and a.task_name like concat('%', #{taskName}, '%') |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="areaTaskName != null and areaTaskName != ''"> |
|
|
|
|
|
and a.task_name like concat('%', #{areaTaskName}, '%') |
|
|
|
|
|
</if> |
|
|
|
|
|
</otherwise> |
|
|
|
|
|
</choose> |
|
|
<if test="taskCode != null and taskCode != ''">and a.task_code = #{taskCode}</if> |
|
|
<if test="taskCode != null and taskCode != ''">and a.task_code = #{taskCode}</if> |
|
|
<if test="taskState != null and taskState != ''">and a.task_state = #{taskState}</if> |
|
|
<if test="taskState != null and taskState != ''">and a.task_state = #{taskState}</if> |
|
|
<if test="planStartTime != null ">and a.plan_start_time = #{planStartTime}</if> |
|
|
<if test="planStartTime != null ">and a.plan_start_time = #{planStartTime}</if> |
|
|
|