t.task_state=case when el.executor_userid is null and t.task_state='1' then '0' when el.executor_userid is not null and t.task_state='0' then '1' else t.task_state
t.task_state=case when e1.executor_userid is null and t.task_state='1' then '0' when e1.executor_userid is not null and t.task_state='0' then '1' else t.task_state end