select id, waybill_id, bill_code, attach_type, file_name, file_url, file_siez, file_desc, order_num, data_from, bl_audit, audit_date, audit_man_code, audit_site_code, audit_note, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill_declare_attachment
insert into emis_waybill_declare_attachment
waybill_id,
bill_code,
attach_type,
file_name,
file_url,
file_siez,
file_desc,
order_num,
data_from,
bl_audit,
audit_date,
audit_man_code,
audit_site_code,
audit_note,
remark,
del_flag,
create_by,
create_time,
update_by,
update_time,
create_site,
update_site,
#{waybillId},
#{billCode},
#{attachType},
#{fileName},
#{fileUrl},
#{fileSiez},
#{fileDesc},
#{orderNum},
#{dataFrom},
#{blAudit},
#{auditDate},
#{auditManCode},
#{auditSiteCode},
#{auditNote},
#{remark},
#{delFlag},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{createSite},
#{updateSite},
update emis_waybill_declare_attachment
waybill_id = #{waybillId},
bill_code = #{billCode},
attach_type = #{attachType},
file_name = #{fileName},
file_url = #{fileUrl},
file_siez = #{fileSiez},
file_desc = #{fileDesc},
order_num = #{orderNum},
data_from = #{dataFrom},
bl_audit = #{blAudit},
audit_date = #{auditDate},
audit_man_code = #{auditManCode},
audit_site_code = #{auditSiteCode},
audit_note = #{auditNote},
remark = #{remark},
del_flag = #{delFlag},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
create_site = #{createSite},
update_site = #{updateSite},
where id = #{id}
update emis_waybill_declare_attachment set del_flag='1' where id = #{id}
update emis_waybill_declare_attachment set del_flag='1' where id in
#{id}
update emis_waybill_declare_attachment set del_flag='1' where bill_code = #{billCode} and attach_type = #{attachType}
update emis_waybill_declare_attachment set del_flag='1' where waybill_id = #{waybillId}