select id,year,month,provice,city,unit,testitem,people,regis_time,eng_time,test_time,regis_notice,regis_notice_path,face_course,face_course_path,check_censoring_time,admission_regis_path,test_eng_time,check_grade_time,UNIX_TIMESTAMP(), IF (UNIX_TIMESTAMP(regis_time) <= UNIX_TIMESTAMP() AND UNIX_TIMESTAMP(eng_time)+86400 >= UNIX_TIMESTAMP(),2,-1 ) as sjsort from dede_examtime where 1=1 and provice like '山西%' and testitem='医疗卫生' and city like '大同%' and month='08' order by sjsort desc,id DESC limit 0,20