when t1.ITEM_STATE = 0 and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) = 1 then 1
when (t1.ITEM_STATE = 0 or t1.ITEM_STATE = 5) and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) > 1 then 2
else '' end as projectLevel
from (select * from(select *, CASE WHEN EVALUATION_SCORE = 2 THEN 100 WHEN EVALUATION_SCORE = 0 THEN 60 ELSE 80 END AS satisfactionScore from esua_epdc_events.epdc_item where DEL_FLAG = '0'
and GRID_ID not in ( SELECT t.`dept_id`
from (select * from(select *, CASE WHEN EVALUATION_SCORE = 2 THEN 100 WHEN EVALUATION_SCORE = 0 THEN 60 ELSE 80 END AS satisfactionScore from esua_epdc_events.epdc_item where GRID_ID not in ( SELECT t.`dept_id`