A.oc_id,
A.file_id,
A.task_code,
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 unloader_name,
B.uploaded_at
INSERT INTO ent_danger_attach
oc_id,
danger_id,
file_id,
task_code,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{dangerId ,jdbcType=BIGINT},
#{fileId ,jdbcType=BIGINT},
#{taskCode ,jdbcType=VARCHAR},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
DELETE FROM ent_danger_attach
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND danger_id = #{dangerId ,jdbcType=BIGINT}
AND task_code = #{formCode ,jdbcType=VARCHAR}
AND file_id = #{fileId ,jdbcType=BIGINT}