select distinct t.task_id, t.task_uuid, t.task_name, t.description, t.annotation_scene, t.annotation_type, FROM ai_annotation_task t left join ai_annotation_task_annotator_map a on t.task_id = a.task_id UPDATE ai_annotation_task SET del_flag = '1' WHERE task_id = #{taskId} UPDATE ai_annotation_task_annotator_map SET del_flag = '1' WHERE task_id = #{taskId} INSERT INTO ai_annotation_task dataset_id, task_name, task_uuid, description, annotation_scene, annotation_type, labels, is_annotation_team, annotation_status, label_studio_project_id, del_flag, create_time, create_by, update_by, update_time, start_time, end_time, #{datasetId}, #{taskName}, #{taskUuid}, #{taskDesc}, #{annotateScene}, #{annotateType}, #{labels}, #{isStartTeam}, #{annotateTaskStatus}, #{labelStudioProjectId}, #{delFlag}, sysdate(), #{createBy}, #{updateBy}, #{updateTime}, STR_TO_DATE(#{startTime}, '%Y-%m-%d %H:%i:%s'), STR_TO_DATE(#{endTime}, '%Y-%m-%d %H:%i:%s'), INSERT INTO ai_annotation_task_annotator_map task_id , file_id , file_url , label_studio_task_id, annotator_id , reviewer_id , description , annotation_status , audit_failed_reason , annotation_result , annotation_resource, annotation_time , review_time , del_flag, create_time, create_by, update_by, update_time, VALUES #{taskId}, #{fileId}, #{fileUrl}, #{labelStudioTaskId}, #{annotatorId}, #{reviewerId}, #{description} , #{annotationStatus}, #{auditFailedReason} , #{annotationResult}, #{annotationResource}, #{annotationTime} , #{reviewTime} , #{delFlag}, sysdate(), #{createBy}, #{updateBy}, #{updateTime}, UPDATE ai_annotation_task dataset_id = #{datasetId}, task_name = #{taskName}, task_uuid = #{taskUuid}, description = #{taskDesc}, annotation_scene = #{annotateScene}, annotation_type = #{annotateType}, labels = #{labels}, is_annotation_team = #{isStartTeam}, annotation_status = #{annotateTaskStatus}, label_studio_project_id = #{labelStudioProjectId}, del_flag = #{delFlag}, update_by = #{updateBy}, start_time = STR_TO_DATE(#{startTime}, '%Y-%m-%d %H:%i:%s'), end_time= STR_TO_DATE(#{startTime}, '%Y-%m-%d %H:%i:%s'), WHERE task_id = #{taskId} UPDATE ai_annotation_task_annotator_map annotation_result = #{annotationResult}, annotation_time = sysdate(), annotation_status = '1', audit_failed_reason = #{auditFailedReason}, review_time = sysdate(), annotation_status = '3', annotation_status = #{annotationStatus}, review_time = sysdate(), annotation_resource = #{annotationResource} update_by = #{updateBy}, WHERE task_id = #{taskId} and file_id = #{fileId}