select id, type, model, serial, mac, date_time, ip_address, ipv6_address, port_no, protocol_type, event_type, event_description, direction, verify_type, create_time, create_by, update_time, update_by, remark, config_status, device_id, device_key, order_code, status, input, now, T1, H1, T2, H2, device_index, ver, will_pass, passed, modbus, voice, req_result, resp_result, dept_id
from zdy_device_gate_heart_log
select l.id, l.type, l.model, l.serial, l.mac, l.date_time, l.ip_address, l.ipv6_address, l.port_no, l.protocol_type, l.event_type, l.event_description, l.direction, l.verify_type, l.create_time, l.create_by, l.update_time, l.update_by, l.remark, l.config_status, l.device_id, l.device_key, l.order_code, l.status, l.input, l.now, l.T1, l.H1, l.T2, l.H2, l.device_index, l.ver, l.will_pass, passed, l.modbus, l.voice, l.req_result, l.resp_result, l.dept_id, g.device_name
from zdy_device_gate_heart_log l
left join sys_dept d on d.dept_id = l.dept_id
left join zdy_device_gate g on g.serial_no = l.serial and g.del_flag != 1
insert into zdy_device_gate_heart_log
type,
model,
serial,
mac,
date_time,
ip_address,
ipv6_address,
port_no,
protocol_type,
event_type,
event_description,
direction,
verify_type,
create_time,
create_by,
update_time,
update_by,
remark,
config_status,
device_id,
device_key,
order_code,
status,
input,
now,
T1,
H1,
T2,
H2,
device_index,
ver,
will_pass,
passed,
modbus,
voice,
req_result,
resp_result,
dept_id,
#{type},
#{model},
#{serial},
#{mac},
#{dateTime},
#{ipAddress},
#{ipv6Address},
#{portNo},
#{protocolType},
#{eventType},
#{eventDescription},
#{direction},
#{verifyType},
#{createTime},
#{createBy},
#{updateTime},
#{updateBy},
#{remark},
#{configStatus},
#{deviceId},
#{deviceKey},
#{orderCode},
#{status},
#{input},
#{now},
#{T1},
#{H1},
#{T2},
#{H2},
#{deviceIndex},
#{ver},
#{willPass},
#{passed},
#{modbus},
#{voice},
#{reqResult},
#{respResult},
#{deptId},
insert into zdy_device_gate_heart_log
(model, serial, mac, ip_address, event_description, create_time, device_id, config_status, status, dept_id)
values
(#{item.model}, #{item.serial}, #{item.mac}, #{item.ipAddress}, #{item.eventDescription}, #{item.createTime}, #{item.deviceId}, #{item.configStatus}, #{item.status}, #{item.deptId})
update zdy_device_gate_heart_log
type =
#{type},
model =
#{model},
serial =
#{serial},
mac =
#{mac},
date_time =
#{dateTime},
ip_address =
#{ipAddress},
ipv6_address =
#{ipv6Address},
port_no =
#{portNo},
protocol_type =
#{protocolType},
event_type =
#{eventType},
event_description =
#{eventDescription},
direction =
#{direction},
verify_type =
#{verifyType},
create_time =
#{createTime},
create_by =
#{createBy},
update_time =
#{updateTime},
update_by =
#{updateBy},
remark =
#{remark},
config_status =
#{configStatus},
device_id =
#{deviceId},
device_key =
#{deviceKey},
order_code =
#{orderCode},
status =
#{status},
input =
#{input},
now =
#{now},
T1 =
#{T1},
H1 =
#{H1},
T2 =
#{T2},
H2 =
#{H2},
device_index =
#{deviceIndex},
ver =
#{ver},
will_pass =
#{willPass},
passed =
#{passed},
modbus =
#{modbus},
voice =
#{voice},
where id = #{id}
delete from zdy_device_gate_heart_log where id = #{id}
delete from zdy_device_gate_heart_log where id in
#{id}