insert into crm_quote_info(
tenant_id,
quote_code,
quote_name,
quote_round,
quote_category,
quote_type,
business_direction,
quote_dept_id,
quote_date,
valid_from,
valid_days,
valid_to,
delivery_period,
delivery_method,
payment_method,
currency_type,
tax_included_info,
tax_rate,
total_price,
total_before_tax,
total_tax,
total_including_tax,
customer_contact_id,
customer_contact_name,
customer_contact_phone,
customer_contact_email,
supplier_contact_id,
supplier_contact_name,
supplier_contact_phone,
supplier_contact_email,
project_id,
template_id,
oss_id,
quote_status,
flow_status,
remark,
del_flag,
create_dept,
create_by,
create_time,
update_by,
update_time
)
values
(
#{item.tenantId},
#{item.quoteCode},
#{item.quoteName},
#{item.quoteRound},
#{item.quoteCategory},
#{item.quoteType},
#{item.businessDirection},
#{item.quoteDeptId},
#{item.quoteDate},
#{item.validFrom},
#{item.validDays},
#{item.validTo},
#{item.deliveryPeriod},
#{item.deliveryMethod},
#{item.paymentMethod},
#{item.currencyType},
#{item.taxIncludedInfo},
#{item.taxRate},
#{item.totalPrice},
#{item.totalBeforeTax},
#{item.totalTax},
#{item.totalIncludingTax},
#{item.customerContactId},
#{item.customerContactName},
#{item.customerContactPhone},
#{item.customerContactEmail},
#{item.supplierContactId},
#{item.supplierContactName},
#{item.supplierContactPhone},
#{item.supplierContactEmail},
#{item.projectId},
#{item.templateId},
#{item.ossId},
#{item.quoteStatus},
#{item.flowStatus},
#{item.remark},
#{item.delFlag},
#{item.createDept},
#{item.createBy},
#{item.createTime},
#{item.updateBy},
#{item.updateTime}
)
update crm_quote_info
tenant_id = #{item.tenantId},
quote_code = #{item.quoteCode},
quote_name = #{item.quoteName},
quote_round = #{item.quoteRound},
quote_category = #{item.quoteCategory},
quote_type = #{item.quoteType},
business_direction = #{item.businessDirection},
quote_dept_id = #{item.quoteDeptId},
quote_date = #{item.quoteDate},
valid_from = #{item.validFrom},
valid_days = #{item.validDays},
valid_to = #{item.validTo},
delivery_period = #{item.deliveryPeriod},
delivery_method = #{item.deliveryMethod},
payment_method = #{item.paymentMethod},
currency_type = #{item.currencyType},
tax_included_info = #{item.taxIncludedInfo},
tax_rate = #{item.taxRate},
total_price = #{item.totalPrice},
total_before_tax = #{item.totalBeforeTax},
total_tax = #{item.totalTax},
total_including_tax = #{item.totalIncludingTax},
customer_contact_id = #{item.customerContactId},
customer_contact_name = #{item.customerContactName},
customer_contact_phone = #{item.customerContactPhone},
customer_contact_email = #{item.customerContactEmail},
supplier_contact_id = #{item.supplierContactId},
supplier_contact_name = #{item.supplierContactName},
supplier_contact_phone = #{item.supplierContactPhone},
supplier_contact_email = #{item.supplierContactEmail},
project_id = #{item.projectId},
template_id = #{item.templateId},
oss_id = #{item.ossId},
quote_status = #{item.quoteStatus},
flow_status = #{item.flowStatus},
remark = #{item.remark},
del_flag = #{item.delFlag},
create_dept = #{item.createDept},
create_by = #{item.createBy},
create_time = #{item.createTime},
update_by = #{item.updateBy},
update_time = #{item.updateTime}
where quote_id = #{item.quoteId}
delete from crm_quote_info
AND ${ew.sqlSegment}
delete from crm_quote_info
where quote_id in
#{id}