INSERT INTO yh_type_config (name, type, create_user_name, create_time, create_user_id, is_active) VALUES (#{name}, #{type}, #{createUserName}, now(), #{createUserId}, 1) INSERT INTO yh_file (file_name, file_path, file_size, big_type, file_type, file_from, suffix , create_time, is_active) VALUES (#{fileName}, #{filePath}, #{fileSize}, #{bigType}, #{fileType}, #{id}, #{suffix}, now(), 1) INSERT INTO yh_safety_record (title, record_code, inspect_level, check_type, check_time, create_time, is_active) VALUES (#{title}, #{recordCode}, #{inspectLevel}, #{checkType}, #{checkTime}, now(), 1) INSERT INTO yh_pitfall_detaills (check_user_id, check_user_name, find_time, pro_id, pro_name, sub_id, sub_name, pitfall_type_id, pitfall_type_name, pitfall_level_id, pitfall_level_name, correction_time, sub_person_id, sub_person_name, pitfall_description, suggestion, dept_id, dept_name, user_id, user_name, sup_uuid) VALUES (#{checkUserId}, #{checkUserName}, #{findTime}, #{proId}, #{proName}, #{subId}, #{subName}, #{pitfallTypeId}, #{pitfallTypeName}, #{pitfallLevelId}, #{pitfallLevelName}, #{correctionTime}, #{subPersonId}, #{subPersonName}, #{pitfallDescription}, #{suggestion}, #{deptId}, #{deptName}, #{userId}, #{userName}, #{supUuid}) INSERT INTO yh_pitfall_info (pitfall_id, pitfall_code, record_id, check_level_id, check_level_name, check_type, check_type_name, create_user_id, create_user_name, create_time, accept_time, feedback_time, finsh_time, check_status, is_check, check_state, is_delay, is_process, is_from, is_active, delay_check_state) VALUES (#{id}, #{pitfallCode}, #{recordCode}, #{checkLevel}, #{checkLevelName}, #{checkType}, #{checkTypeName}, #{createUserId}, #{createUserName}, now(), #{acceptTime}, #{feedbackTime}, #{finshTime}, 1, 0 , 0, 0, #{isProcess}, #{isFrom}, 1, 0) UPDATE yh_type_config SET name = #{name}, update_time = NOW() WHERE id = #{id} UPDATE yh_safety_record SET title = #{title}, record_code = #{recordCode}, inspect_level = #{inspectLevel}, check_type = #{checkType}, check_time = #{checkTime}, update_time = NOW() WHERE record_id = #{id} UPDATE yh_pitfall_detaills SET duty_user_id = #{dutyUserId}, duty_user_name = #{dutyUserName}, generate_reason = #{generateReason}, correction_status = #{correctionStatus}, opinion = '', remarks = '' WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_check = #{isCheck}, check_state = '0', feedback_time = #{rectificationFeedbackTime} WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET check_state = #{checkState}, is_check = 2 WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET check_status = #{checkStatus}, is_check = 2 WHERE pitfall_id = #{id} UPDATE yh_pitfall_detaills SET opinion = #{opinion}, remarks = #{remarks} WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_check = 0, check_state = 0 WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET delay_time = #{delayTime}, is_delay = '1', delay_check_state = '0' WHERE pitfall_id = #{id} UPDATE yh_pitfall_detaills SET delay_reason = #{delayReason} WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET check_status = #{checkStatus} WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_check = '1' WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_delay = '0', rejection_delay = #{rejectionDelay}, delay_time = null WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_delay = '2', rejection_delay = '' WHERE pitfall_id = #{id} UPDATE yh_pitfall_detaills SET delay_reason = '' WHERE pitfall_id = #{id} UPDATE yh_pitfall_info SET is_delay = 0, delay_time = null, delay_check_state = 0 WHERE pitfall_id = #{id} UPDATE yh_type_config SET is_active = 0 WHERE id = #{id} UPDATE yh_file SET is_active = 0 WHERE file_id IN #{fileId}