insert into OAQuot
quot_id,
quotCode,
quotCustomer,
quotProject,
quotLxr,
quotLxrdh,
totalPrice,
perc,
perc2,
rbDateUid,
create_by,
create_time,
update_by,
update_time,
#{quot_id},
#{quotCode},
#{quotCustomer},
#{quotProject},
#{quotLxr},
#{quotLxrdh},
#{totalPrice},
#{perc},
#{perc2},
#{rbDateUid},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
update OAQuot
quotCode = #{quotCode},
quotCustomer = #{quotCustomer},
quotProject = #{quotProject},
quotLxr = #{quotLxr},
quotLxrdh = #{quotLxrdh},
totalPrice = #{totalPrice},
perc = #{perc},
perc2 = #{perc2},
rbDateUid = #{rbDateUid},
quotApprovalStatus = #{quotApprovalStatus},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where quot_id = #{quot_id}
insert into OAQuotProduct(uid_0,quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values
(#{item.uid_0}, #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index})
LEFT JOIN sys_user u on u.user_name=a.create_by
LEFT JOIN sys_dept d on u.dept_id = d.dept_id
delete from OAQuot where quot_id = #{quotId}
delete from OAQuotProduct where quot_id = #{quotId}