select bom_id, version_number, bom_code, bom_name, bom_production_cost, bom_remarks, bom_creator, enterprise_name, bom_time, enterprise_code, customer_number, finish_product_code, finish_product_name, specification_model, type_machine, inventory_unit, current_version, confirm_no, confirm_name, confirm_time, first_add_time, update_info_time from sys_bom
insert into sys_bom
version_number,
bom_code,
bom_name,
bom_production_cost,
bom_remarks,
bom_creator,
enterprise_name,
bom_time,
enterprise_code,
customer_number,
finish_product_code,
finish_product_name,
specification_model,
type_machine,
inventory_unit,
current_version,
confirm_no,
confirm_name,
confirm_time,
first_add_time,
#{versionNumber},
#{bomCode},
#{bomName},
#{bomProductionCost},
#{bomRemarks},
#{bomCreator},
#{enterpriseName},
#{bomTime},
#{enterpriseCode},
#{customerNumber},
#{finishProductCode},
#{finishProductName},
#{specificationModel},
#{typeMachine},
#{inventoryUnit},
#{currentVersion},
#{confirmNo},
#{confirmName},
#{confirmTime},
now(),
update sys_bom
version_number = #{versionNumber},
bom_code = #{bomCode},
bom_name = #{bomName},
bom_production_cost = #{bomProductionCost},
bom_remarks = #{bomRemarks},
bom_creator = #{bomCreator},
enterprise_name = #{enterpriseName},
bom_time = #{bomTime},
enterprise_code = #{enterpriseCode},
customer_number = #{customerNumber},
finish_product_code = #{finishProductCode},
finish_product_name = #{finishProductName},
specification_model = #{specificationModel},
type_machine = #{typeMachine},
inventory_unit = #{inventoryUnit},
current_version = #{currentVersion},
confirm_no = #{confirmNo},
confirm_name = #{confirmName},
confirm_time = #{confirmTime},
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
where bom_id = #{bomId}
delete from sys_bom where bom_id = #{bomId}
delete from sys_bom where bom_id in
#{bomId}