select id, task_id, patient_contact, patient_phone, patient_name, patient_gender, patient_id_card, patient_condition, hospital_out_name, hospital_out_id, hospital_out_department, hospital_out_department_id, hospital_out_bed_number, hospital_out_address, hospital_out_longitude, hospital_out_latitude, hospital_in_name, hospital_in_id, hospital_in_department, hospital_in_department_id, hospital_in_bed_number, hospital_in_address, hospital_in_longitude, hospital_in_latitude, transfer_distance, transfer_price, passenger_contact, passenger_phone, disease_ids, document_type_id, task_type_id, legacy_service_ord_id, legacy_dispatch_ord_id, sync_status, sync_time, sync_error_msg, dispatch_sync_status, dispatch_sync_time, dispatch_sync_error_msg, need_resync, legacy_service_ord_no, legacy_dispatch_ord_no, legacy_service_ns_time, legacy_dispatch_ns_time, legacy_dispatch_ord_class, legacy_service_ord_class, create_time, update_time, create_by, update_by from sys_task_emergency insert into sys_task_emergency task_id, patient_contact, patient_phone, patient_name, patient_gender, patient_id_card, patient_condition, hospital_out_name, hospital_out_id, hospital_out_department, hospital_out_department_id, hospital_out_bed_number, hospital_out_address, hospital_out_longitude, hospital_out_latitude, hospital_in_name, hospital_in_id, hospital_in_department, hospital_in_department_id, hospital_in_bed_number, hospital_in_address, hospital_in_longitude, hospital_in_latitude, transfer_distance, transfer_price, passenger_contact, passenger_phone, disease_ids, document_type_id, task_type_id, legacy_service_ord_id, legacy_dispatch_ord_id, sync_status, sync_time, sync_error_msg, dispatch_sync_status, dispatch_sync_time, dispatch_sync_error_msg, need_resync, legacy_service_ord_no, legacy_dispatch_ord_no, legacy_service_ns_time, legacy_dispatch_ns_time, legacy_dispatch_ord_class, legacy_service_ord_class, create_time, update_time, create_by, update_by, #{taskId}, #{patientContact}, #{patientPhone}, #{patientName}, #{patientGender}, #{patientIdCard}, #{patientCondition}, #{hospitalOutName}, #{hospitalOutId}, #{hospitalOutDepartment}, #{hospitalOutDepartmentId}, #{hospitalOutBedNumber}, #{hospitalOutAddress}, #{hospitalOutLongitude}, #{hospitalOutLatitude}, #{hospitalInName}, #{hospitalInId}, #{hospitalInDepartment}, #{hospitalInDepartmentId}, #{hospitalInBedNumber}, #{hospitalInAddress}, #{hospitalInLongitude}, #{hospitalInLatitude}, #{transferDistance}, #{transferPrice}, #{passengerContact}, #{passengerPhone}, #{diseaseIds}, #{documentTypeId}, #{taskTypeId}, #{legacyServiceOrdId}, #{legacyDispatchOrdId}, #{syncStatus}, #{syncTime}, #{syncErrorMsg}, #{dispatchSyncStatus}, #{dispatchSyncTime}, #{dispatchSyncErrorMsg}, #{needResync}, #{legacyServiceOrdNo}, #{legacyDispatchOrdNo}, #{legacyServiceNsTime}, #{legacyDispatchNsTime}, #{legacyDispatchOrdClass}, #{legacyServiceOrdClass}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy}, update sys_task_emergency patient_contact = #{patientContact}, patient_phone = #{patientPhone}, patient_name = #{patientName}, patient_gender = #{patientGender}, patient_id_card = #{patientIdCard}, patient_condition = #{patientCondition}, hospital_out_name = #{hospitalOutName}, hospital_out_id = #{hospitalOutId}, hospital_out_department = #{hospitalOutDepartment}, hospital_out_department_id = #{hospitalOutDepartmentId}, hospital_out_bed_number = #{hospitalOutBedNumber}, hospital_out_address = #{hospitalOutAddress}, hospital_out_longitude = #{hospitalOutLongitude}, hospital_out_latitude = #{hospitalOutLatitude}, hospital_in_name = #{hospitalInName}, hospital_in_id = #{hospitalInId}, hospital_in_department = #{hospitalInDepartment}, hospital_in_department_id = #{hospitalInDepartmentId}, hospital_in_bed_number = #{hospitalInBedNumber}, hospital_in_address = #{hospitalInAddress}, hospital_in_longitude = #{hospitalInLongitude}, hospital_in_latitude = #{hospitalInLatitude}, transfer_distance = #{transferDistance}, transfer_price = #{transferPrice}, passenger_contact = #{passengerContact}, passenger_phone = #{passengerPhone}, disease_ids = #{diseaseIds}, document_type_id = #{documentTypeId}, task_type_id = #{taskTypeId}, legacy_service_ord_id = #{legacyServiceOrdId}, legacy_dispatch_ord_id = #{legacyDispatchOrdId}, sync_status = #{syncStatus}, sync_time = #{syncTime}, sync_error_msg = #{syncErrorMsg}, dispatch_sync_status = #{dispatchSyncStatus}, dispatch_sync_time = #{dispatchSyncTime}, dispatch_sync_error_msg = #{dispatchSyncErrorMsg}, need_resync = #{needResync}, legacy_service_ord_no = #{legacyServiceOrdNo}, legacy_dispatch_ord_no = #{legacyDispatchOrdNo}, legacy_service_ns_time = #{legacyServiceNsTime}, legacy_dispatch_ns_time = #{legacyDispatchNsTime}, legacy_dispatch_ord_class = #{legacyDispatchOrdClass}, legacy_service_ord_class = #{legacyServiceOrdClass}, update_time = #{updateTime}, update_by = #{updateBy}, where id = #{id} delete from sys_task_emergency where id = #{id} delete from sys_task_emergency where task_id = #{taskId}