order_no, order_type, creater, create_time, update_time, buyer_id, first_amount, total_amount, settlement_amount, refund_amount, order_status, liquidation_status, process_status, project_status, approval, order_remarks, delete_sign, salesman_id, finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no, contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count, proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order, old_salesman_id, back_status, agreement_url, new_user, service_content, sales_type, channel_id, other, user_type, examine_name, tag, patent_status delete from t_order_new where order_no = #{orderNo,jdbcType=VARCHAR} insert into t_order_new (order_no, order_type, creater, create_time, update_time, buyer_id, first_amount, total_amount, settlement_amount, refund_amount, order_status, liquidation_status, process_status, project_status, approval, order_remarks, delete_sign, salesman_id, finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no, contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count, proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order, old_salesman_id, back_status, agreement_url, new_user, service_content, sales_type, channel_id, other, user_type, examine_name, tag, patent_status) values (#{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE}, #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT}, #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER}, #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR}, #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, #{agreementUrl,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR}, #{salesType,jdbcType=INTEGER}, #{channelId,jdbcType=VARCHAR}, #{other,jdbcType=VARCHAR}, #{userType,jdbcType=INTEGER}, #{examineName,jdbcType=VARCHAR}, #{tag,jdbcType=INTEGER}, #{patentStatus,jdbcType=INTEGER}) insert into t_order_new order_no, order_type, creater, create_time, update_time, buyer_id, first_amount, total_amount, settlement_amount, refund_amount, order_status, liquidation_status, process_status, project_status, approval, order_remarks, delete_sign, salesman_id, finance_id, technician_id, sign_time, settlement_time, contract_picture_url, contract_no, contract_type, contacts, contact_mobile, legal_person, legal_person_tel, proof_count, proof_aid, proof_time, proof_status, order_dep, outsource, additional_order, primary_order, old_salesman_id, back_status, agreement_url, new_user, service_content, sales_type, channel_id, other, user_type, examine_name, tag, patent_status, #{orderNo,jdbcType=VARCHAR}, #{orderType,jdbcType=INTEGER}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{buyerId,jdbcType=VARCHAR}, #{firstAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, #{refundAmount,jdbcType=DECIMAL}, #{orderStatus,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{projectStatus,jdbcType=INTEGER}, #{approval,jdbcType=INTEGER}, #{orderRemarks,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR}, #{technicianId,jdbcType=VARCHAR}, #{signTime,jdbcType=DATE}, #{settlementTime,jdbcType=DATE}, #{contractPictureUrl,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{contractType,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{legalPerson,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR}, #{proofCount,jdbcType=FLOAT}, #{proofAid,jdbcType=VARCHAR}, #{proofTime,jdbcType=TIMESTAMP}, #{proofStatus,jdbcType=INTEGER}, #{orderDep,jdbcType=VARCHAR}, #{outsource,jdbcType=INTEGER}, #{additionalOrder,jdbcType=VARCHAR}, #{primaryOrder,jdbcType=VARCHAR}, #{oldSalesmanId,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, #{agreementUrl,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{serviceContent,jdbcType=VARCHAR}, #{salesType,jdbcType=INTEGER}, #{channelId,jdbcType=VARCHAR}, #{other,jdbcType=VARCHAR}, #{userType,jdbcType=INTEGER}, #{examineName,jdbcType=VARCHAR}, #{tag,jdbcType=INTEGER}, #{patentStatus,jdbcType=INTEGER}, update t_order_new order_type = #{orderType,jdbcType=INTEGER}, creater = #{creater,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, buyer_id = #{buyerId,jdbcType=VARCHAR}, first_amount = #{firstAmount,jdbcType=DECIMAL}, total_amount = #{totalAmount,jdbcType=DECIMAL}, settlement_amount = #{settlementAmount,jdbcType=DECIMAL}, refund_amount = #{refundAmount,jdbcType=DECIMAL}, order_status = #{orderStatus,jdbcType=INTEGER}, liquidation_status = #{liquidationStatus,jdbcType=INTEGER}, process_status = #{processStatus,jdbcType=INTEGER}, project_status = #{projectStatus,jdbcType=INTEGER}, approval = #{approval,jdbcType=INTEGER}, order_remarks = #{orderRemarks,jdbcType=VARCHAR}, delete_sign = #{deleteSign,jdbcType=INTEGER}, salesman_id = #{salesmanId,jdbcType=VARCHAR}, finance_id = #{financeId,jdbcType=VARCHAR}, technician_id = #{technicianId,jdbcType=VARCHAR}, sign_time = #{signTime,jdbcType=DATE}, settlement_time = #{settlementTime,jdbcType=DATE}, contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR}, contract_no = #{contractNo,jdbcType=VARCHAR}, contract_type = #{contractType,jdbcType=VARCHAR}, contacts = #{contacts,jdbcType=VARCHAR}, contact_mobile = #{contactMobile,jdbcType=VARCHAR}, legal_person = #{legalPerson,jdbcType=VARCHAR}, legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR}, proof_count = #{proofCount,jdbcType=FLOAT}, proof_aid = #{proofAid,jdbcType=VARCHAR}, proof_time = #{proofTime,jdbcType=TIMESTAMP}, proof_status = #{proofStatus,jdbcType=INTEGER}, order_dep = #{orderDep,jdbcType=VARCHAR}, outsource = #{outsource,jdbcType=INTEGER}, additional_order = #{additionalOrder,jdbcType=VARCHAR}, primary_order = #{primaryOrder,jdbcType=VARCHAR}, old_salesman_id = #{oldSalesmanId,jdbcType=VARCHAR}, back_status = #{backStatus,jdbcType=INTEGER}, agreement_url = #{agreementUrl,jdbcType=VARCHAR}, new_user = #{newUser,jdbcType=INTEGER}, service_content = #{serviceContent,jdbcType=VARCHAR}, sales_type = #{salesType,jdbcType=INTEGER}, channel_id = #{channelId,jdbcType=VARCHAR}, other = #{other,jdbcType=VARCHAR}, user_type = #{userType,jdbcType=INTEGER}, examine_name = #{examineName,jdbcType=VARCHAR}, tag = #{tag,jdbcType=INTEGER}, patent_status = #{patentStatus,jdbcType=INTEGER}, where order_no = #{orderNo,jdbcType=VARCHAR} update t_order_new set order_type = #{orderType,jdbcType=INTEGER}, creater = #{creater,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP}, buyer_id = #{buyerId,jdbcType=VARCHAR}, first_amount = #{firstAmount,jdbcType=DECIMAL}, total_amount = #{totalAmount,jdbcType=DECIMAL}, settlement_amount = #{settlementAmount,jdbcType=DECIMAL}, refund_amount = #{refundAmount,jdbcType=DECIMAL}, order_status = #{orderStatus,jdbcType=INTEGER}, liquidation_status = #{liquidationStatus,jdbcType=INTEGER}, process_status = #{processStatus,jdbcType=INTEGER}, project_status = #{projectStatus,jdbcType=INTEGER}, approval = #{approval,jdbcType=INTEGER}, order_remarks = #{orderRemarks,jdbcType=VARCHAR}, delete_sign = #{deleteSign,jdbcType=INTEGER}, salesman_id = #{salesmanId,jdbcType=VARCHAR}, finance_id = #{financeId,jdbcType=VARCHAR}, technician_id = #{technicianId,jdbcType=VARCHAR}, sign_time = #{signTime,jdbcType=DATE}, settlement_time = #{settlementTime,jdbcType=DATE}, contract_picture_url = #{contractPictureUrl,jdbcType=VARCHAR}, contract_no = #{contractNo,jdbcType=VARCHAR}, contract_type = #{contractType,jdbcType=VARCHAR}, contacts = #{contacts,jdbcType=VARCHAR}, contact_mobile = #{contactMobile,jdbcType=VARCHAR}, legal_person = #{legalPerson,jdbcType=VARCHAR}, legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR}, proof_count = #{proofCount,jdbcType=FLOAT}, proof_aid = #{proofAid,jdbcType=VARCHAR}, proof_time = #{proofTime,jdbcType=TIMESTAMP}, proof_status = #{proofStatus,jdbcType=INTEGER}, order_dep = #{orderDep,jdbcType=VARCHAR}, outsource = #{outsource,jdbcType=INTEGER}, additional_order = #{additionalOrder,jdbcType=VARCHAR}, primary_order = #{primaryOrder,jdbcType=VARCHAR}, old_salesman_id = #{oldSalesmanId,jdbcType=VARCHAR}, back_status = #{backStatus,jdbcType=INTEGER}, agreement_url = #{agreementUrl,jdbcType=VARCHAR}, new_user = #{newUser,jdbcType=INTEGER}, service_content = #{serviceContent,jdbcType=VARCHAR}, sales_type = #{salesType,jdbcType=INTEGER}, channel_id = #{channelId,jdbcType=VARCHAR}, other = #{other,jdbcType=VARCHAR}, user_type = #{userType,jdbcType=INTEGER}, examine_name = #{examineName,jdbcType=VARCHAR}, tag = #{tag,jdbcType=INTEGER}, patent_status = #{patentStatus,jdbcType=INTEGER} where order_no = #{orderNo,jdbcType=VARCHAR} update t_order_new set finance_id= #{newFinance,jdbcType=VARCHAR} where order_no in #{orderNo} and finance_id= #{aid,jdbcType=VARCHAR} update t_order_new set salesman_id= #{transferId},old_salesman_id= #{aid} where delete_sign in(0,2,3) and salesman_id= #{aid} update t_order_new set settlement_amount=settlement_amount-#{refundAmount,jdbcType=DECIMAL}, refund_amount=#{refundAmount,jdbcType=DECIMAL} where order_no=#{orderNo} update t_order_new a ,(select a.department_id depId,group_concat(a.name) name from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id where c.role_type ='9996' and a.status ='0' and a.department_id = #{departmentId} group by a.department_id ) b set a.examine_name =b.name where a.order_dep = #{departmentId} and a.order_dep =b.depId update t_order_new a left join admin b on a.salesman_id =b.id left join admin c on b.manager_id =c.id set a.examine_name =c.name where a.process_status =1 and c.id= #{id} left join (select a.department_id depId,group_concat(a.name) name from admin a left join admin b on a.department_id =b.department_id left join user_role c on a.id=c.uid left join `role` d on c.rid =d.id where b.id= #{id} and d.role_type ='9996' and a.status ='0' group by b.department_id )x on a.order_dep=x.depId set a.examine_name=x.name where a.process_status =2 left join department b on a.order_dep =b.id left join admin c on b.finance_id =c.id set a.examine_name =c.name where a.process_status =3 and c.id =#{id} update t_order_new a left join (select group_concat(a.name) name from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id where c.role_type in ('9998') and a.status ='0' )b on 1=1 set a.examine_name =b.name where a.process_status =5 update t_order_new set tag = #{param2} where order_no in #{e}