| | |
| | | and pt.patrol_task_name like concat('%',#{param2.patrolTaskName},'%') |
| | | </if> |
| | | <if test="param2.patrolTaskType != null and param2.patrolTaskType != ''"> |
| | | and pt.patrol_task_type like concat('%',#{param2.patrolTaskType},'%') |
| | | /* 将逗号分隔的字符串转换为带引号的格式,如 "road,road1" 转为 "\"road\",\"road1\"" */ |
| | | and pt.patrol_task_type like concat('%', |
| | | ( |
| | | select string_agg(concat('"', trim(arr_val), '"'), ',') |
| | | from unnest(string_to_array(#{param2.patrolTaskType}, ',')) as arr_val |
| | | ), |
| | | '%') |
| | | </if> |
| | | <if test="param2.taskStatus != null and param2.taskStatus != ''"> |
| | | /* 报错信息中出现了这个参数,务必加强转 */ |