id, deleted, created, modified, name, order_id, financial, allot_type, client_manager_id, principal_id, department_id, business_object_type, special_type, business_gener, evaluate_aim, entrust_again, multiple_removal, informal_evaluate, clientele_type, clientele_id, clientele_contact_id, dispense_benefit, nonnative, refinance, loan_limit, loan_period, loan_nature, loan_aim, loan_expire, bailor, bailor_address, bailor_contact_name, bailor_contact_tel, owner, owner_tel, urgent, terminal_clientele_id, terminal_clientele_type, terminal_clientele_contact_id, remark,members, production_info,printing,printing_remark SELECT wfni.currentNodeId AS id, wfni.nodeName, wfni.productionName, wfni.business_sub_id AS statementNo, wfni.business_min_id AS reportNo, m.id AS majorId, m.created, m.NAME, m.order_id, m.financial, m.allot_type, m.client_manager_id, u.NAME AS clientManager, m.principal_id, u1.NAME AS principal, m.department_id, d.NAME AS department, m.business_object_type, m.clientele_id, m.clientele_contact_id, m.clientele_id AS clientele, m.clientele_contact_id AS clienteleContact, cc1.NAME AS cClienteleName, cc2.NAME AS cClienteleSubName, cl1.NAME AS cClienteleContactName, cl1.mobile AS cMobile, wfni.client_name, wfni.client_tel, wfni.evaluate_amount, wfni.OWNER, wfni.HANDLER, wfni.nodeCode, wfni.currentNodeId FROM major m LEFT JOIN user u ON u.id = m.client_manager_id LEFT JOIN user u1 ON u1.id = m.principal_id LEFT JOIN department d ON d.id = m.department_id INNER JOIN ( SELECT wf.id AS currentNodeId, wf.node_id, wf.business_id, wf.business_sub_id, wf.business_min_id, wf.state, wn.NAME AS nodeName, mp.NAME AS productionName, mp.client_name, mp.client_tel, mp.evaluate_amount, mp.OWNER, u.NAME AS HANDLER, wn.CODE AS nodeCode, mp.client_address FROM work_flow_node_instance wf LEFT JOIN work_node wn ON wn.id = wf.node_id LEFT JOIN ( SELECT report_no, major_id, NAME, client_name,client_address, client_tel, evaluate_amount, OWNER FROM major_production WHERE deleted = 0 ) mp ON ( mp.major_id = wf.business_id AND mp.report_no = ifnull( wf.business_min_id, wf.business_sub_id ) ) LEFT JOIN work_task_record wtr ON wtr.instance_id = wf.id LEFT JOIN user u ON u.id = wtr.handler_id WHERE wf.business_type = 'MAJOR_BUSINESS' AND wf.deleted = 0 AND wf.state = 'PENDING' ) wfni ON wfni.business_id = m.id LEFT JOIN customer_company cc1 ON cc1.id = m.clientele_id LEFT JOIN customer_company cc2 ON cc2.id = m.clientele_sub_id LEFT JOIN customer_linkman cl1 ON cl1.id = m.clientele_contact_id WHERE m.deleted = 0