select d.name dname,
qm.id,
cm.father,
unit,
cm.name
from mom_ocean.technique_model qm,
mom_ocean.technical_model cm,
mom_ocean.device d,
mom_ocean.technology_template tt
where qm.state = 1
and d.id = qm.device_id
and cm.id = qm.technical_model_id
and tt.id = qm.tech_tem_id
and qm.tech_tem_id = #{id}
select father,
id technicalModelId,
name,
unit
from mom_ocean.technical_model
where state = 1
and tech_tem_id = #{id}
select id devId,
name
from mom_ocean.device
where state = 1
and device_status in (1, 5)
and father = (select device_group
from mom_ocean.technology_template
where technology_template.state = 1
and technology_template.id = #{id})
select tt.type,
tt.father techFather,
tt.name techName,
tt.id tid,
d.id did,
d.name dname,
cm.father,
cm.name,
unit
from mom_ocean.technique_model qm,
mom_ocean.technology_template tt,
mom_ocean.device d,
mom_ocean.technical_model cm
where qm.tech_tem_id = tt.id
and device_id = d.id
and cm.id = qm.technical_model_id
and qm.id = #{id}
update mom_ocean.technique_model
set state=0
where id in (${ids})
update mom_ocean.technique_model
set state=0
where tech_tem_id = #{id}
update mom_ocean.technique_model
set state=0
where tech_tem_id in (${ids})