select zt_dept.name , zt_user.realname ,zt_task.id ,zt_task.assignedTo ,zt_task.estimate ,zt_task.status ,SUBSTRING(if (zt_task.estStarted = "0000-00-00", zt_task.assignedDate ,zt_task.estStarted ) , 1, 10) from zt_user right join zt_task on if (status <>"closed", zt_user.account=zt_task.assignedTo ,zt_user.account=zt_task.finishedBy )left join zt_dept on zt_dept.id=zt_user.dept where zt_dept.name !="曾经的战友" ;数据库中执行成功,但是finereport中末尾的where条件没有生效,执行出的是全量数据