A.oc_id,
A.checklist_id,
A.hazard_id,
A.risk_id,
A.measure_id,
A.measure_content,
A.measure_desc,
A.measure_type_id,
B.measure_type_title,
A.measure_reference
INSERT INTO checklist_hazard_risk_measure
oc_id,
checklist_id,
hazard_id,
risk_id,
measure_id,
measure_content,
measure_desc,
measure_reference,
measure_type_id,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{checklistId ,jdbcType=BIGINT},
#{hazardId ,jdbcType=BIGINT},
#{riskId ,jdbcType=BIGINT},
#{measureId ,jdbcType=BIGINT},
#{measureContent ,jdbcType=VARCHAR},
#{measureDesc ,jdbcType=VARCHAR},
#{measureReference ,jdbcType=VARCHAR},
#{measureTypeId ,jdbcType=BIGINT},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
UPDATE checklist_hazard_risk_measure
measure_content = #{measureContent, jdbcType=VARCHAR},
measure_desc = #{measureDesc, jdbcType=VARCHAR},
measure_reference = #{measureReference ,jdbcType=VARCHAR},
measure_type_id = #{measureTypeId, jdbcType=BIGINT},
updated_by = #{updatedBy ,jdbcType=BIGINT},
updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND checklist_id = #{checklistId ,jdbcType=BIGINT}
AND hazard_id = #{hazardId ,jdbcType=BIGINT}
AND risk_id = #{riskId ,jdbcType=BIGINT}
AND measure_id = #{measureId ,jdbcType=BIGINT}
UPDATE checklist_hazard_risk_measure
deleted_flag = #{deletedFlag,jdbcType=BIGINT},
deleted_time = #{deletedTime,jdbcType=VARCHAR},
deleted_by = #{deletedBy,jdbcType=BIGINT},
WHERE 1 = 1
AND oc_id = #{ocId ,jdbcType=BIGINT}
AND checklist_id = #{checklistId ,jdbcType=BIGINT}
AND hazard_id = #{hazardId ,jdbcType=BIGINT}
AND risk_id = #{riskId ,jdbcType=BIGINT}
AND measure_id = #{measureId ,jdbcType=BIGINT}