A.oc_id,
O.oc_name,
A.risk_point_id,
D.risk_point_title,
A.check_def_id,
A.check_cat_id,
B.check_cat_title,
A.check_desc,
A.check_title,
A.checklist_id,
C.checklist_title,
A.group_id,
A.group_name,
A.position_id,
A.position_name,
A.account_id,
A.account_name,
A.check_count,
A.def_start_date,
A.def_end_date,
A.is_shared,
A.status,
A.job_id,
J.cycle_title,
A.last_cycle_start_time,
A.last_cycle_end_time
INSERT INTO check_def
oc_id,
risk_point_id,
check_def_id,
check_cat_id,
check_title,
check_desc,
checklist_id,
group_id,
group_name,
position_id,
position_name,
account_id,
account_name,
check_count,
def_start_date,
def_end_date,
is_shared,
status,
job_id,
created_by,
created_at,
#{ocId ,jdbcType=BIGINT},
#{riskPointId ,jdbcType=BIGINT},
#{checkDefId ,jdbcType=BIGINT},
#{checkCatId ,jdbcType=BIGINT},
#{checkTitle, jdbcType=VARCHAR},
#{checkDesc, jdbcType=VARCHAR},
#{checklistId, jdbcType=BIGINT},
#{groupId, jdbcType=BIGINT},
#{groupName, jdbcType=VARCHAR},
#{positionId, jdbcType=BIGINT},
#{positionName ,jdbcType=VARCHAR},
#{accountId, jdbcType=BIGINT},
#{accountName, jdbcType=VARCHAR},
#{checkCount ,jdbcType=INTEGER},
#{defStartDate ,jdbcType=DATE},
#{defEndDate ,jdbcType=DATE},
#{isShared ,jdbcType=BIGINT},
#{status ,jdbcType=BIGINT},
#{jobId ,jdbcType=BIGINT},
#{createdBy ,jdbcType=BIGINT},
#{createdAt ,jdbcType=TIMESTAMP},
UPDATE check_def
check_cat_id = #{checkCatId ,jdbcType=BIGINT},
check_title =#{checkTitle ,jdbcType=VARCHAR},
check_desc = #{checkDesc ,jdbcType=VARCHAR},
checklist_id = #{checklistId ,jdbcType=BIGINT},
group_id = #{groupId ,jdbcType=BIGINT},
group_name = #{groupName, jdbcType=VARCHAR},
position_id = #{positionId ,jdbcType=BIGINT},
position_name = #{positionName ,jdbcType=VARCHAR},
account_id = #{accountId ,jdbcType=BIGINT},
account_name = #{accountName, jdbcType=VARCHAR},
check_count = #{checkCount ,jdbcType=INTEGER},
def_start_date = #{defStartDate ,jdbcType=DATE},
def_end_date = #{defEndDate ,jdbcType=DATE},
is_shared = #{isShared ,jdbcType=BIGINT},
status = #{status ,jdbcType=BIGINT},
job_id = #{jobId ,jdbcType=BIGINT},
last_cycle_start_time = #{lastCycleStartTime ,jdbcType=TIMESTAMP},
last_cycle_end_time = #{lastCycleEndTime ,jdbcType=TIMESTAMP},
updated_by = #{updatedBy ,jdbcType=BIGINT},
updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
WHERE oc_id = #{ocId ,jdbcType=BIGINT}
AND risk_point_id = #{riskPointId ,jdbcType=BIGINT}
AND check_def_id = #{checkDefId ,jdbcType=BIGINT}
UPDATE check_def
last_cycle_start_time = #{lastCycleStartTime ,jdbcType=TIMESTAMP},
last_cycle_end_time = #{lastCycleEndTime ,jdbcType=TIMESTAMP},
WHERE deleted_flag = 0
AND oc_id = #{ocId,jdbcType=BIGINT}
AND risk_point_id = #{riskPointId ,jdbcType=BIGINT}
AND check_def_id = #{checkDefId ,jdbcType=BIGINT}
UPDATE check_def
deleted_by = #{deletedBy ,jdbcType=BIGINT},
deleted_at = #{deletedAt ,jdbcType=DATE},
deleted_flag = #{deletedFlag ,jdbcType=BIGINT},
WHERE deleted_flag = 0
AND oc_id = #{ocId,jdbcType=BIGINT}
AND risk_point_id = #{riskPointId ,jdbcType=BIGINT}
AND check_def_id = #{checkDefId ,jdbcType=BIGINT}