A.oc_id,
A.check_record_id,
A.account_id,
F.account_name,
A.task_id,
B.task_title,
A.risk_point_id,
C.risk_point_title,
B.group_id,
D.group_name,
B.position_id,
E.position_name,
A.checklist_id,
A.hazard_id,
A.hazard_title,
A.hazard_code,
A.risk_id,
A.risk_title,
A.risk_code,
A.measure_id,
G.task_cat_title,
A.measure_type_id,
H.measure_type_title,
A.measure_content,
A.measure_reference,
A.check_time,
A.check_result,
A.check_desc,
A.danger_id
INSERT INTO check_record_event
oc_id,
check_record_id,
account_id,
task_id,
checklist_id,
risk_point_id,
hazard_id,
hazard_title,
hazard_code,
risk_id,
risk_title,
risk_code,
measure_id,
measure_type_id,
measure_content,
measure_reference,
check_time,
check_result,
danger_id,
check_desc,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{checkRecordId ,jdbcType=BIGINT},
#{accountId ,jdbcType=BIGINT},
#{taskId ,jdbcType=BIGINT},
#{checklistId ,jdbcType=BIGINT},
#{riskPointId ,jdbcType=BIGINT},
#{hazardId ,jdbcType=BIGINT},
#{hazardTitle ,jdbcType=VARCHAR},
#{hazardCode ,jdbcType=VARCHAR},
#{riskId ,jdbcType=BIGINT},
#{riskTitle ,jdbcType=VARCHAR},
#{riskCode ,jdbcType=VARCHAR},
#{measureId ,jdbcType=BIGINT},
#{measureTypeId ,jdbcType=BIGINT},
#{measureContent ,jdbcType=VARCHAR},
#{measureReference ,jdbcType=VARCHAR},
#{checkTime ,jdbcType=DATE},
#{checkResult ,jdbcType=BIGINT},
#{dangerId ,jdbcType=BIGINT},
#{checkDesc ,jdbcType=VARCHAR},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
UPDATE check_record_event
check_result = #{checkResult ,jdbcType=BIGINT},
danger_id = #{dangerId ,jdbcType=BIGINT},
check_desc = #{checkDesc ,jdbcType=VARCHAR},
updated_by = #{updatedBy ,jdbcType=BIGINT},
updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
WHERE 1 = 1
AND oc_id = #{ocId,jdbcType=BIGINT}
AND check_record_id = #{checkRecordId ,jdbcType=BIGINT}
DELETE FROM check_record_event
WHERE 1 = 1
AND oc_id = #{ocId,jdbcType=BIGINT}
AND check_record_id = #{checkRecordId ,jdbcType=BIGINT}
AND account_id = #{accountId ,jdbcType=BIGINT}
AND task_id = #{taskId ,jdbcType=BIGINT}
AND checklist_id = #{checklistId ,jdbcType=BIGINT}
AND risk_point_id = #{riskPointId ,jdbcType=BIGINT}
AND hazard_id = #{hazardId ,jdbcType=BIGINT}
AND risk_id = #{riskId ,jdbcType=BIGINT}
AND measure_id = #{measureId ,jdbcType=BIGINT}
AND check_result = #{checkResult ,jdbcType=BIGINT}