A.oc_id,
        A.story_id,
        A.item_id,
        A.record_id,
        A.file_id,
        B.file_title,
        B.dir_id,
        B.file_url,
        B.file_ext,
        B.file_size,
        B.file_author,
        B.file_desc,
        B.uploaded_by  AS uploader_id,
        C.account_name AS uploader_name,
        B.uploaded_at
    
    
    
    
    
    
        INSERT INTO hos_assess_record_attach
        
            
                oc_id,
            
            
                story_id,
            
            
                item_id,
            
            
                record_id,
            
            
                file_id,
            
            
                created_by,
            
            
                created_at,
            
        
        
            
                #{ocId ,jdbcType=BIGINT},
            
            
                #{storyId ,jdbcType=BIGINT},
            
            
                #{itemId ,jdbcType=BIGINT},
            
            
                #{recordId ,jdbcType=BIGINT},
            
            
                #{fileId ,jdbcType=BIGINT},
            
            
                #{createdBy ,jdbcType=BIGINT},
            
            
                #{createdAt ,jdbcType=TIMESTAMP},
            
        
    
    
    
        DELETE FROM hos_assess_record_attach
        WHERE 1 = 1
        
            AND oc_id = #{ocId ,jdbcType=BIGINT}
        
        
            AND record_id = #{recordId ,jdbcType=BIGINT}
        
        
            AND file_id = #{fileId ,jdbcType=BIGINT}