select distinct version
from mom_ocean.technique
where state = 1
and technology_id in (select id
from mom_ocean.technology
where technology.state = 1
and specifications_id = #{specificationsId})
order by version desc
select tq.id tqid,
device,
product_father,
product,
unit,
name,
father
from mom_ocean.technique tq
left join mom_ocean.technology tc on tq.technology_id = tc.id
where tq.state = 1
and specifications_id = #{specificationsId}
and tq.version = #{version}
and device like concat('%',#{message},'%')
select name device
from mom_ocean.device
where state = 1
and device_status in (1, 5)
and father = (select distinct device_group
from mom_ocean.technology
where technology.state = 1
and technology.id = #{technologyId})
select name product,
father productFather,
unit
from mom_ocean.product
where state = 1
and technology_id = #{technologyId}
select *
from mom_ocean.technique
where state = 1
and version = #{version}
and technology_id in (select id
from mom_ocean.technology
where technology.state = 1
and specifications_id = #{specificationsId})
select distinct version
from mom_ocean.technique
where state = 1
and technology_id = #{technologyId}
select device.id, device
from mom_ocean.technique
left join mom_ocean.device on name = device
where technique.state = 1
and technology_id = #{technologyId}
and product_father = #{father}
and product = #{name}
and version = #{ver}
select m.father,
type,
m.name,
st.name,
sp.name,
t.father,
t.name,
technology_id,
device,
product_father,
product,
unit
from mom_ocean.technique tq
left join mom_ocean.technology t on tq.technology_id = t.id
left join mom_ocean.specifications sp on t.specifications_id = sp.id
left join mom_ocean.standard st on sp.standard_id = st.id
left join mom_ocean.material m on st.material_id = m.id
where tq.state = 1
and tq.id = #{id}
update mom_ocean.technique
set state=0
where technology_id = #{id}
update mom_ocean.technique
set state=0
where technology_id in (${ids})
update mom_ocean.technique
set state=0
where id in (${ids})