left join sys_user u on u.user_name=a.create_by
left join sys_dept d on u.dept_id = d.dept_id
select a.doa_id, a.doa_code, a.doa_number, a.doa_salesman_code, a.doa_salesman_bm, a.doa_salesman_name, a.doa_salesman_dept_id,
a.doa_salesman_dept_name, a.doa_salesman_phone, a.doa_project, a.doa_customer_bm, a.doa_customer_name,
a.doa_owner_unit, a.doa_generalcontract_unit, a.doa_subcontract_unit, a.doa_authorizer, a.doa_authorizer_phone,
a.doa_authorizer_identification_number, a.doa_authorization_duration, a.doa_power_attorney_purpose,
a.doa_format, a.doa_remark, a.doa_rejection_reasons, a.doa_standardizer, a.doa_archiving, a.doa_vice_president_approved,
a.doa_approval_status, a.doa_oa_approval_status, a.doa_oa_remark,
a.create_by, u.nick_name create_name, a.create_time, a.update_by, a.update_time
from authorize a
insert into authorize
doa_id,
doa_code,
doa_number,
doa_salesman_code,
doa_salesman_bm,
doa_salesman_name,
doa_salesman_dept_id,
doa_salesman_dept_name,
doa_salesman_phone,
doa_project,
doa_customer_bm,
doa_customer_name,
doa_owner_unit,
doa_generalcontract_unit,
doa_subcontract_unit,
doa_authorizer,
doa_authorizer_phone,
doa_authorizer_identification_number,
doa_authorization_duration,
doa_power_attorney_purpose,
doa_format,
doa_remark,
doa_rejection_reasons,
doa_standardizer,
doa_archiving,
doa_vice_president_approved,
doa_approval_status,
doa_oa_approval_status,
doa_oa_remark,
create_by,
create_time,
update_by,
update_time,
#{doaId},
#{doaCode},
#{doaNumber},
#{doaSalesmanCode},
#{doaSalesmanBm},
#{doaSalesmanName},
#{doaSalesmanDeptId},
#{doaSalesmanDeptName},
#{doaSalesmanPhone},
#{doaProject},
#{doaCustomerBm},
#{doaCustomerName},
#{doaOwnerUnit},
#{doaGeneralcontractUnit},
#{doaSubcontractUnit},
#{doaAuthorizer},
#{doaAuthorizerPhone},
#{doaAuthorizerIdentificationNumber},
#{doaAuthorizationDuration},
#{doaPowerAttorneyPurpose},
#{doaFormat},
#{doaRemark},
#{doaRejectionReasons},
#{doaStandardizer},
#{doaArchiving},
#{doaVicePresidentApproved},
#{doaApprovalStatus},
#{doaOaApprovalStatus},
#{doaOaRemark},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
insert into sys_oa_authorize
user_id,
department_id,
submission_time,
doa_id,
doa_code,
doa_salesman_name,
doa_salesman_phone,
doa_project,
doa_customer_name,
doa_owner_unit,
doa_generalcontract_unit,
doa_subcontract_unit,
doa_authorizer,
doa_authorizer_phone,
doa_authorizer_identification_number,
doa_authorization_duration,
doa_power_attorney_purpose,
doa_format,
doa_remark,
doa_standardizer,
doa_archiving,
doa_vice_president_approved,
create_time,
file_address,
isFinish,
#{userId},
#{departmentId},
#{submissionTime},
#{doaId},
#{doaCode},
#{doaSalesmanName},
#{doaSalesmanPhone},
#{doaProject},
#{doaCustomerName},
#{doaOwnerUnit},
#{doaGeneralcontractUnit},
#{doaSubcontractUnit},
#{doaAuthorizer},
#{doaAuthorizerPhone},
#{doaAuthorizerIdentificationNumber},
#{doaAuthorizationDuration},
#{doaPowerAttorneyPurpose},
#{doaFormat},
#{doaRemark},
#{doaStandardizer},
#{doaArchiving},
#{doaVicePresidentApproved},
#{createTime},
#{fileAddress},
#{isFinish},
update authorize
doa_code = #{doaCode},
doa_number = #{doaNumber},
doa_salesman_code = #{doaSalesmanCode},
doa_salesman_bm = #{doaSalesmanBm},
doa_salesman_name = #{doaSalesmanName},
doa_salesman_dept_id = #{doaSalesmanDeptId},
doa_salesman_dept_name = #{doaSalesmanDeptName},
doa_salesman_phone = #{doaSalesmanPhone},
doa_project = #{doaProject},
doa_customer_bm = #{doaCustomerBm},
doa_customer_name = #{doaCustomerName},
doa_owner_unit = #{doaOwnerUnit},
doa_generalcontract_unit = #{doaGeneralcontractUnit},
doa_subcontract_unit = #{doaSubcontractUnit},
doa_authorizer = #{doaAuthorizer},
doa_authorizer_phone = #{doaAuthorizerPhone},
doa_authorizer_identification_number = #{doaAuthorizerIdentificationNumber},
doa_authorization_duration = #{doaAuthorizationDuration},
doa_power_attorney_purpose = #{doaPowerAttorneyPurpose},
doa_format = #{doaFormat},
doa_remark = #{doaRemark},
doa_rejection_reasons = #{doaRejectionReasons},
doa_standardizer = #{doaStandardizer},
doa_archiving = #{doaArchiving},
doa_vice_president_approved = #{doaVicePresidentApproved},
doa_approval_status = #{doaApprovalStatus},
doa_oa_approval_status = #{doaOaApprovalStatus},
doa_oa_remark = #{doaOaRemark},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where doa_id = #{doaId}
delete from authorize where doa_id = #{doaId}
delete from authorize where doa_id in
#{doaId}