select device_id, device_no, device_name, station_id,d.dept_name as station_name, device_type, device_serial_num, gun_no,
pos_fanout_exchange, pos_queue, device_factory
from station_device_manage m join sys_dept d on m.station_id = d.dept_id
insert into station_device_manage
device_no,
device_name,
station_id,
device_type,
device_serial_num,
gun_no,
device_factory,
pos_fanout_exchange,
pos_queue,
#{deviceNo},
#{deviceName},
#{stationId},
#{deviceType},
#{deviceSerialNum},
#{gunNo},
#{deviceFactory},
#{posFanoutExchange},
#{posQueue},
update station_device_manage
device_no = #{deviceNo},
device_name = #{deviceName},
station_id = #{stationId},
device_type = #{deviceType},
device_serial_num = #{deviceSerialNum},
gun_no = #{gunNo},
device_factory = #{deviceFactory},
pos_fanout_exchange= #{posFanoutExchange},
pos_queue=#{posQueue},
where device_id = #{deviceId}
delete from station_device_manage where device_id = #{deviceId}
delete from station_device_manage where device_id in
#{deviceId}