select id,
serial_number,
name,
site_type,
mac_addr,
ip,
camera_fun_type,
longitude,
latitude,
camera_capture_area,
on_state,
civil_code,
integrated_device,
camera_brand,
address,
net_working,
public_security,
installed_time,
management_unit,
mu_contact_info,
storage_days,
monitor_azimuth,
scene_photo_addr,
model,
site_vulgo,
camera_type,
camera_light_type,
encoded_format,
camera_dept,
hybm,
lxbm,
device_type
from t_monitor
insert into t_monitor
serial_number,
name,
site_type,
mac_addr,
ip,
camera_fun_type,
longitude,
latitude,
camera_capture_area,
on_state,
civil_code,
integrated_device,
camera_brand,
address,
net_working,
public_security,
installed_time,
management_unit,
mu_contact_info,
storage_days,
monitor_azimuth,
scene_photo_addr,
model,
site_vulgo,
camera_type,
camera_light_type,
encoded_format,
camera_dept,
hybm,
lxbm,
device_type,
#{serialNumber},
#{name},
#{siteType},
#{macAddr},
#{ip},
#{cameraFunType},
#{longitude},
#{latitude},
#{cameraCaptureArea},
#{onState},
#{civilCode},
#{integratedDevice},
#{cameraBrand},
#{address},
#{netWorking},
#{publicSecurity},
#{installedTime},
#{managementUnit},
#{muContactInfo},
#{storageDays},
#{monitorAzimuth},
#{scenePhotoAddr},
#{model},
#{siteVulgo},
#{cameraType},
#{cameraLightType},
#{encodedFormat},
#{cameraDept},
#{hybm},
#{lxbm},
#{deviceType},
update t_monitor set device_type = #{deviceType} where serial_number in
#{number}
update t_monitor
serial_number = #{serialNumber},
name = #{name},
site_type = #{siteType},
mac_addr = #{macAddr},
ip = #{ip},
camera_fun_type = #{cameraFunType},
longitude = #{longitude},
latitude = #{latitude},
camera_capture_area =
#{cameraCaptureArea},
on_state = #{onState},
civil_code = #{civilCode},
integrated_device = #{integratedDevice},
camera_brand = #{cameraBrand},
address = #{address},
net_working = #{netWorking},
public_security = #{publicSecurity},
installed_time = #{installedTime},
management_unit = #{managementUnit},
mu_contact_info = #{muContactInfo},
storage_days = #{storageDays},
monitor_azimuth = #{monitorAzimuth},
scene_photo_addr = #{scenePhotoAddr},
model = #{model},
site_vulgo = #{siteVulgo},
camera_type = #{cameraType},
camera_light_type = #{cameraLightType},
encoded_format = #{encodedFormat},
camera_dept = #{cameraDept},
hybm = #{hybm},
lxbm = #{lxbm},
device_type = #{deviceType},
where id = #{id}
delete
from t_monitor
id = #{id}
delete from t_monitor where id in
#{id}
delete from t_monitor
UPDATE
t_yw_point
SET
online = #{online.online},
update_time = #{online.updateTime}
WHERE
EXISTS (SELECT 1 FROM t_monitor
WHERE ip = #{online.ip}
AND t_monitor.serial_number = t_yw_point.serial_number )
UPDATE
t_yw_point
SET
online = #{online.online},
update_time = #{online.updateTime}
WHERE
serial_number = #{online.serialNumber}
UPDATE
t_yw_point p
LEFT JOIN t_monitor m on p.serial_number = m.serial_number
SET
p.ping_online = #{online},
p.update_time = #{date}
WHERE m.ip in
#{ip}
delete m from t_monitor m left join t_yw_point p on m.serial_number = p.serial_number
where p.examine_status != 1