select id, wall_name, wall_poi, wall_type from ard_tank_wall
and wall_name like '%'||#{wallName}||'%'
and wall_poi = #{wallPoi}
and wall_type = #{wallType}
where id = #{id}
insert into ard_tank_wall
id,
wall_name,
wall_poi,
wall_type,
#{id},
#{wallName},
#{wallPoi},
#{wallType},
update ard_tank_wall
wall_name = #{wallName},
wall_poi = #{wallPoi},
wall_type = #{wallType},
where id = #{id}
delete from ard_tank_wall where id = #{id}
delete from ard_tank_wall where id in
#{id}
select * from ard_tank_wall order by wall_name
select atw.id as "wallId",atw.wall_name as "wallName",atw.wall_poi as "wallPoi",
atwl.process_type as "processType",case process_type when '-1' then '关动作'
when '0' then '无动作' when '1' then '开动作' end as process
from ard_tank_wall_lock atwl
inner join ard_tank_wall atw on atwl.wall_id = atw.id
where atwl.lock_id = #{id}
select count(*) from ard_tank_wall atw
and wall_name like '%'||#{wallName}||'%'
select distinct atw.* from ard_tank_lock atl
inner join ard_tank_wall_lock atwl on atl.id = atwl.lock_id
inner join ard_tank_wall atw on atwl.wall_id = atw.id
where atl.car_id = #{carId}
select atw.* from ard_tank_wall_lock atwl
inner join ard_tank_wall atw on atwl.wall_id = atw.id
where atwl.lock_id = #{lockId} and atwl.process_type != '0'
select distinct atw.* from ard_tank_lock atl
inner join ard_tank_wall_lock atwl on atl.id = atwl.lock_id
inner join ard_tank_wall atw on atwl.wall_id = atw.id
where atl.car_id = #{carId}