select c.id, c.well_id, c.well_number, c.oil_production, c.well_block, c.production_date, c.displacement_mode, c.surrounding_environment, c.well_type, c.installed_load, c.metering_station, c.transfer_station, c.dehydration_station, c.run_status, c.longitude, c.latitude, c.altitude, c.dept_id, c.user_id, c.create_by, c.create_time, c.update_by, c.update_time from ard_alarmpoints_well c left join sys_dept d on d.dept_id = c.dept_id left join sys_user u on u.user_id = c.user_id insert into ard_alarmpoints_well id, well_id, well_number, oil_production, well_block, production_date, displacement_mode, surrounding_environment, well_type, installed_load, metering_station, transfer_station, dehydration_station, run_status, longitude, latitude, altitude, dept_id, user_id, create_by, create_time, update_by, update_time, guide_p1, guide_t1, guide_z1, guide_p2, guide_t2, guide_z2, #{id}, #{wellId}, #{wellNumber}, #{oilProduction}, #{wellBlock}, #{productionDate}, #{displacementMode}, #{surroundingEnvironment}, #{wellType}, #{installedLoad}, #{meteringStation}, #{transferStation}, #{dehydrationStation}, #{runStatus}, #{longitude}, #{latitude}, #{altitude}, #{deptId}, #{userId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{guideP1}, #{guideT1}, #{guideZ1}, #{guideP2}, #{guideT2}, #{guideZ2}, update ard_alarmpoints_well well_id = #{wellId}, well_number = #{wellNumber}, oil_production = #{oilProduction}, well_block = #{wellBlock}, production_date = #{productionDate}, displacement_mode = #{displacementMode}, surrounding_environment = #{surroundingEnvironment}, well_type = #{wellType}, installed_load = #{installedLoad}, metering_station = #{meteringStation}, transfer_station = #{transferStation}, dehydration_station = #{dehydrationStation}, run_status = #{runStatus}, longitude = #{longitude}, latitude = #{latitude}, altitude = #{altitude}, dept_id = #{deptId}, user_id = #{userId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, guide_p1 = #{guideP1}, guide_t1 = #{guideT1}, guide_z1 = #{guideZ1}, guide_p2 = #{guideP2}, guide_t2 = #{guideT2}, guide_z2 = #{guideZ2}, where id = #{id} update ard_alarmpoints_well well_id = #{wellId}, well_number = #{wellNumber}, oil_production = #{oilProduction}, well_block = #{wellBlock}, production_date = #{productionDate}, displacement_mode = #{displacementMode}, surrounding_environment = #{surroundingEnvironment}, well_type = #{wellType}, installed_load = #{installedLoad}, metering_station = #{meteringStation}, transfer_station = #{transferStation}, dehydration_station = #{dehydrationStation}, run_status = #{runStatus}, longitude = #{longitude}, latitude = #{latitude}, altitude = #{altitude}, dept_id = #{deptId}, user_id = #{userId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, guide_p1 = #{guideP1}, guide_t1 = #{guideT1}, guide_z1 = #{guideZ1}, guide_p2 = #{guideP2}, guide_t2 = #{guideT2}, guide_z2 = #{guideZ2}, where well_id = #{wellId} delete from ard_alarmpoints_well where id = #{id} delete from ard_alarmpoints_well where id in #{id}