select dtdl.id,
dtdl.cfg_id,
dtdl.project_id,
dtdl.com_id,
sp.dept_name projectName,
sd.dept_name com_name,dtdl.dept_id,pd.sub_dept_name dept_name,
dtdl.device_key,
dtdl.device_source,
dtdl.tower_id,
dtdl.range_near_end_ad_value,
dtdl.range_near_end_reality_value,
dtdl.range_far_end_ad_value,
dtdl.range_far_end_reality_value,
dtdl.high_near_end_ad_value,
dtdl.high_near_end_reality_value,
dtdl.high_far_end_ad_value,
dtdl.high_far_end_reality_value,
dtdl.empty_weight_ad_value,
dtdl.empty_weight_reality_value,
dtdl.load_weight_ad_value,
dtdl.load_weight_reality_value,
dtdl.rotation_start_ad_value,
dtdl.rotation_start_reality_value,
dtdl.rotation_end_ad_value,
dtdl.rotation_end_reality_value,
dtdl.wind_speed_factor,
dtdl.tilt_factor,
dtdl.is_del,
dtdl.create_by,
dtdl.create_time,
dtdl.update_by,
dtdl.update_time,
dtdl.remark
from dev_tower_data_local dtdl
left join sys_dept sp on sp.dept_id = dtdl.project_id
left join sys_dept sd on sd.dept_id = dtdl.com_id
left join pro_project_info_subdepts pd on pd.id=dtdl.dept_id
insert into dev_tower_data_local
cfg_id,
project_id,
com_id,
dept_id,
device_key,
device_source,
tower_id,
range_near_end_ad_value,
range_near_end_reality_value,
range_far_end_ad_value,
range_far_end_reality_value,
high_near_end_ad_value,
high_near_end_reality_value,
high_far_end_ad_value,
high_far_end_reality_value,
empty_weight_ad_value,
empty_weight_reality_value,
load_weight_ad_value,
load_weight_reality_value,
rotation_start_ad_value,
rotation_start_reality_value,
rotation_end_ad_value,
rotation_end_reality_value,
wind_speed_factor,
tilt_factor,
is_del,
create_by,
create_time,
update_by,
update_time,
remark,
#{cfgId},
#{projectId},
#{comId},
#{deptId},
#{deviceKey},
#{deviceSource},
#{towerId},
#{rangeNearEndAdValue},
#{rangeNearEndRealityValue},
#{rangeFarEndAdValue},
#{rangeFarEndRealityValue},
#{highNearEndAdValue},
#{highNearEndRealityValue},
#{highFarEndAdValue},
#{highFarEndRealityValue},
#{emptyWeightAdValue},
#{emptyWeightRealityValue},
#{loadWeightAdValue},
#{loadWeightRealityValue},
#{rotationStartAdValue},
#{rotationStartRealityValue},
#{rotationEndAdValue},
#{rotationEndRealityValue},
#{windSpeedFactor},
#{tiltFactor},
#{isDel},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update dev_tower_data_local
cfg_id = #{cfgId},
project_id = #{projectId},
com_id = #{comId},
dept_id = #{deptId},
device_key = #{deviceKey},
device_source = #{deviceSource},
tower_id = #{towerId},
range_near_end_ad_value = #{rangeNearEndAdValue},
range_near_end_reality_value = #{rangeNearEndRealityValue},
range_far_end_ad_value = #{rangeFarEndAdValue},
range_far_end_reality_value = #{rangeFarEndRealityValue},
high_near_end_ad_value = #{highNearEndAdValue},
high_near_end_reality_value = #{highNearEndRealityValue},
high_far_end_ad_value = #{highFarEndAdValue},
high_far_end_reality_value = #{highFarEndRealityValue},
empty_weight_ad_value = #{emptyWeightAdValue},
empty_weight_reality_value = #{emptyWeightRealityValue},
load_weight_ad_value = #{loadWeightAdValue},
load_weight_reality_value = #{loadWeightRealityValue},
rotation_start_ad_value = #{rotationStartAdValue},
rotation_start_reality_value = #{rotationStartRealityValue},
rotation_end_ad_value = #{rotationEndAdValue},
rotation_end_reality_value = #{rotationEndRealityValue},
wind_speed_factor = #{windSpeedFactor},
tilt_factor = #{tiltFactor},
is_del = #{isDel},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
delete from dev_tower_data_local where id = #{id}
delete from dev_tower_data_local where id in
#{id}