yzm3RKaM5405064(提问者)SELECT * FROM [dbo].[SB_bfequipment]
WHERE 1=1
${if(len(设备编号) == 0,\"\",\" and equ_number LIKE \'%\"+ 设备编号 +\"%\'\")}
${if(len(设备名称) == 0,\"\",\" and equ_name LIKE \'%\"+ 设备名称 +\"%\'\")}
${if(len(使用单位) == 0,\"\",\" and dept LIKE \'%\"+ 使用单位 +\"%\'\")}
${if(len(使用人) == 0,\"\",\" and person LIKE \'%\"+ 使用人 +\"%\'\")}
${if(len(规格型号) == 0,\"\",\" and equ_model LIKE \'%\"+ 规格型号 +\"%\'\")}
${if(len(工作令) == 0,\"\",\" and work_order LIKE \'%\"+ 工作令+\"%\'\")}
${if(len(采购渠道) == 0,\"\",\" and pro_channel LIKE \'%\"+ 采购渠道 +\"%\'\")}
${if(len(安装开始时间)==0,\"\",\" and install_time>=\'\"+安装开始时间+\"\'\")}
${if(len(安装结束时间)==0,\"\",\" and install_time<=\'\"+安装结束时间+\"\'\")}
order by install_time desc