select obj_id, bom_code, material_code, material_name, material_type, standard_amount, parent_id, plant_code, product_line_code, is_flag, created_by, created_time, updated_by, updated_time, ancestors from base_bominfo SELECT seq_base_bominfo.NEXTVAL as objId FROM DUAL insert into base_bominfo obj_id, bom_code, material_code, material_name, material_type, standard_amount, parent_id, plant_code, product_line_code, is_flag, created_by, created_time, updated_by, updated_time, ancestors, #{objId}, #{bomCode}, #{materialCode}, #{materialName}, #{materialType}, #{standardAmount}, #{parentId}, #{plantCode}, #{productLineCode}, #{isFlag}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime}, #{ancestors}, update base_bominfo bom_code = #{bomCode}, material_code = #{materialCode}, material_name = #{materialName}, material_type = #{materialType}, standard_amount = #{standardAmount}, parent_id = #{parentId}, plant_code = #{plantCode}, product_line_code = #{productLineCode}, is_flag = #{isFlag}, created_by = #{createdBy}, created_time = #{createdTime}, updated_by = #{updatedBy}, updated_time = #{updatedTime}, ancestors = #{ancestors}, where obj_id = #{objId} update base_bominfo set ancestors = when #{item.materialCode} then #{item.ancestors} where material_code in #{item.materialCode} delete from base_bominfo where obj_id = #{objId} delete from base_bominfo where obj_id in #{objId}