select temp1.*,
temp2.self_evaluation
from declare_key_tasks_details temp1
LEFT JOIN `declare_month_key_tasks_complete_status` temp2
ON temp1.id = temp2.task_id
where
temp1.responsible_department = ' '
and temp1.task_type =
and temp2.self_evaluation IS NULL OR temp2.self_evaluation!= 4
and temp2.expected_results != 1
需要满足 self_evaluation 可以为空 并且同时满足 self_evaluation!= 4 expected_results != 1