id, major_id, deleted, created, modified, report_no, production,signatory, name, client_name, client_tel, client_address, owner, value_timing, evaluate_acreage, evaluate_amount, evaluate_price , comment,qr_code,repertory_state,first_check,second_check,third_check,save_file_check,save_file_second_check,if_save_file SELECT mp.id AS id, m.id as businessId, m.order_id, m.name as orderName, mp.report_no as productionNo, mp.if_save_file, u.name as principal, u1.name as clientManager, cc.name as clienteleName, cc1.name as clienteleSubName, cl.name as clienteleContactName, m.bailor, m.owner, m.created, orf.id as orderFundId, orf.should_amount, orf.real_amount, orf.remark, ( SELECT declare_result FROM commission_declare WHERE business_id = m.id AND production_id IS NULL AND business_type = 'COMMISSION_DECLARE_MAJOR_MARKET' AND deleted = 0 ) as mDeclareResult, ( SELECT declare_result FROM commission_declare WHERE business_id = m.id AND production_id IS NULL AND business_type = 'COMMISSION_DECLARE_MAJOR_EVALUATE' AND deleted = 0 ) as eDeclareResult FROM major m left join major_production mp on mp.major_id = m.id left join user u on u.id = m.principal_id left join user u1 on u1.id = m.client_manager_id left join customer_company cc on cc.id = m.clientele_id left join customer_company cc1 on cc1.id = m.clientele_sub_id left join customer_linkman cl on cl.id = m.clientele_contact_id left join (select * from order_fund where business_type ='MAJOR_BUSINESS' and deleted = 0) orf on orf.business_id = m.id update major_production set if_save_file = 1 ,save_file_date= now() where id in ( #{item} ) update major_production set delivery = 0 ,delivery_date = null where major_id = #{businessId} and report_no = #{businessSubId} and production = #{productionType}