select sop_id, sop_code, sop_name, sop_model, type_of_machine, sop_unit, drawing_file, workhour_file, sop_file, sip_file, spp_file, bom_file, customer_file, other_file, customer_code, customer_name, date_of_registration, sop_registrant, sop_remark, current_version, first_add_time, update_info_time from sys_sop
insert into sys_sop
sop_code,
sop_name,
sop_model,
type_of_machine,
sop_unit,
drawing_file,
workhour_file,
sop_file,
sip_file,
spp_file,
bom_file,
customer_file,
other_file,
customer_code,
customer_name,
date_of_registration,
sop_registrant,
sop_remark,
current_version,
first_add_time,
#{sopCode},
#{sopName},
#{sopModel},
#{typeOfMachine},
#{sopUnit},
#{drawingFile},
#{workhourFile},
#{sopFile},
#{sipFile},
#{sppFile},
#{bomFile},
#{customerFile},
#{otherFile},
#{customerCode},
#{customerName},
#{dateOfRegistration},
#{sopRegistrant},
#{sopRemark},
#{currentVersion},
now(),
update sys_sop
sop_code = #{sopCode},
sop_name = #{sopName},
sop_model = #{sopModel},
type_of_machine = #{typeOfMachine},
sop_unit = #{sopUnit},
drawing_file = #{drawingFile},
workhour_file = #{workhourFile},
sop_file = #{sopFile},
sip_file = #{sipFile},
spp_file = #{sppFile},
bom_file = #{bomFile},
customer_file = #{customerFile},
other_file = #{otherFile},
customer_code = #{customerCode},
customer_name = #{customerName},
date_of_registration = #{dateOfRegistration},
sop_registrant = #{sopRegistrant},
sop_remark = #{sopRemark},
current_version = #{currentVersion},
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
where sop_id = #{sopId}
delete from sys_sop where sop_id = #{sopId}
delete from sys_sop where sop_id in
#{sopId}