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.pq_id, a.pq_code, a.pq_number, a.pq_salesman_code, a.pq_salesman_bm, a.pq_salesman_name,
a.pq_salesman_dept_id, a.pq_salesman_dept_name, a.pq_customer_bm,
a.pq_customer_name, a.pq_project, a.pq_bid_winning_remark, a.pq_authorized_representative,
a.pq_bid_date, a.pq_zbr, a.pq_bid_winning_status, a.pq_illustrate,
a.pq_announcement_link_website, a.pq_phone, a.pq_agency, a.pq_remark,
a.pq_approval_status,a.pq_oa_approval_status,a.pq_returnRemark, a.pq_archiving, a.pq_vp_approval,
a.create_by, u.nick_name create_name,a.create_time, a.update_by, a.update_time
from zgys a
insert into zgys
pq_id,
pq_code,
pq_number,
pq_salesman_code,
pq_salesman_bm,
pq_salesman_name,
pq_salesman_dept_id,
pq_salesman_dept_name,
pq_customer_bm,
pq_customer_name,
pq_project,
pq_bid_winning_remark,
pq_authorized_representative,
pq_bid_date,
pq_zbr,
pq_bid_winning_status,
pq_illustrate,
pq_announcement_link_website,
pq_phone,
pq_agency,
pq_remark,
pq_approval_status,
pq_oa_approval_status,
pq_returnRemark,
pq_archiving,
pq_vp_approval,
create_by,
create_time,
update_by,
update_time,
#{pqId},
#{pqCode},
#{pqNumber},
#{pqSalesmanCode},
#{pqSalesmanBm},
#{pqSalesmanName},
#{pqSalesmanDeptId},
#{pqSalesmanDeptName},
#{pqCustomerBm},
#{pqCustomerName},
#{pqProject},
#{pqBidWinningRemark},
#{pqAuthorizedRepresentative},
#{pqBidDate},
#{pqZbr},
#{pqBidWinningStatus},
#{pqIllustrate},
#{pqAnnouncementLinkWebsite},
#{pqPhone},
#{pqAgency},
#{pqRemark},
#{pqApprovalStatus},
#{pqOaApprovalStatus},
#{pqReturnRemark},
#{pqArchiving},
#{pqVpApproval},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
insert into sys_oa_zgys
user_id,
department_id,
submission_time,
pq_id,
pq_code,
pq_number,
pq_salesman_name,
pq_customer_name,
pq_project,
pq_bid_winning_remark,
pq_authorized_representative,
pq_bid_date,
pq_zbr,
pq_bid_winning_status,
pq_illustrate,
create_time,
pq_ywy_file,
isFinish,
#{userId},
#{departmentId},
#{submissionTime},
#{pqId},
#{pqCode},
#{pqNumber},
#{pqSalesmanName},
#{pqCustomerName},
#{pqProject},
#{pqBidWinningRemark},
#{pqAuthorizedRepresentative},
#{pqBidDate},
#{pqZbr},
#{pqBidWinningStatus},
#{pqIllustrate},
#{createTime},
#{pqYwyFile},
#{isFinish},
update zgys
pq_code = #{pqCode},
pq_number = #{pqNumber},
pq_salesman_code = #{pqSalesmanCode},
pq_salesman_bm = #{pqSalesmanBm},
pq_salesman_name = #{pqSalesmanName},
pq_salesman_dept_id = #{pqSalesmanDeptId},
pq_salesman_dept_name = #{pqSalesmanDeptName},
pq_customer_bm = #{pqCustomerBm},
pq_customer_name = #{pqCustomerName},
pq_project = #{pqProject},
pq_bid_winning_remark = #{pqBidWinningRemark},
pq_authorized_representative = #{pqAuthorizedRepresentative},
pq_bid_date = #{pqBidDate},
pq_zbr = #{pqZbr},
pq_bid_winning_status = #{pqBidWinningStatus},
pq_illustrate = #{pqIllustrate},
pq_announcement_link_website = #{pqAnnouncementLinkWebsite},
pq_phone = #{pqPhone},
pq_agency = #{pqAgency},
pq_remark = #{pqRemark},
pq_approval_status = #{pqApprovalStatus},
pq_oa_approval_status = #{pqOaApprovalStatus},
pq_returnRemark = #{pqReturnRemark},
pq_archiving = #{pqArchiving},
pq_vp_approval = #{pqVpApproval},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where pq_id = #{pqId}
delete from zgys where pq_id = #{pqId}
delete from zgys where pq_id in
#{pqId}