SELECT id, order_num, matter_id, submit_type, matter_name, timeout_time, is_hide_comments, is_push, (select organization_name from automessage_organization_chart where a.department_id=id)organizationName, concat( (select classify_name from automessage_classify_administration where id=(select parent_id from automessage_classify_administration where id=a.classify_id)), '-',(select classify_name from automessage_classify_administration where id=a.classify_id) ) sumClassifyName, department_id, classify_id, consult_content, concat((IFNULL(consult_user_name,'')),(IFNULL(consult_user_phone,''))) consultUser, consult_user_name, concat((IFNULL((select user_name from automessage_sys_user where a.submit_user_id=user_id ),'')), (IFNULL(submit_user_phone,''))) submitUser, submit_user_id, concat((IFNULL((select user_name from automessage_sys_user where a.guide_user_id=user_id ),'')), (ifnull(guide_user_phone,''))) guideUser, guide_user_id, (select organization_name from automessage_organization_chart where a.guide_department_id=id)guideDepartmentName, guide_department_id, state, consult_user_phone, submit_user_phone, guide_user_phone, (select name from automessage_area_code_2022 where code=a.area_code)areaName, area_code, detailed_address, create_time, update_time, evaluate_content, suggest, evaluate_state, service_state, video, images, is_timeout FROM automessage_guide_repair_order a update automessage_guide_repair_order guide_user_id=#{guideUserId}, guide_department_id=#{guideDepartmentId}, state=#{state}, guide_user_phone=#{guideUserPhone}, evaluate_state=#{evaluateState}, evaluate_content=#{evaluateContent}, suggest=#{suggest}, service_state=#{serviceState}, is_timeout=#{isTimeout}, timeout_time=#{timeoutTime}, update_time=sysdate() where id= #{id} delete from automessage_guide_repair_order where id= #{Id}