select distinct td.device_name devName,td.mac_id macId,
td.puid puId,td.gb_code gbCode,t_code tCode,
t_name tName,tw_code twCode,td_code tdCode
from jj_class_meetting cm
left join jj_ball jbl ON jbl.id=cm.camera_id3
left join t_device td on jbl.camera_no=td.t_code AND td.is_flag=0
where cm.camera_id2 is not null and cm.current_constr_date=current_date()
and td.pass_way in(
#{item}
)
select distinct td.device_name devName,td.mac_id macId,
td.puid puId,td.gb_code gbCode,t_code tCode,
t_name tName,tw_code twCode,td_code tdCode
from jj_class_meetting cm
left join jj_ball jbl ON jbl.id=cm.camera_id2
left join t_device td on jbl.camera_no=td.t_code AND td.is_flag=0
where cm.camera_id2 is not null and cm.current_constr_date=current_date()
and td.is_t='1' AND t_code is not null
select td.device_name devName,td.mac_id macId,td.puid puId,td.gb_code gbCode,t_code tCode,t_name tName,tw_code twCode,td_code tdCode
from t_device td
where td.is_flag=0
select td.device_name devName,td.mac_id macId,td.puid puId,td.gb_code gbCode,t_code tCode,t_name tName,tw_code twCode,td_code tdCode
from t_device td
where td.is_flag=0 and td.is_t='1'
AND t_code is not null
UPDATE t_device SET state = #{param.OnlineFlag} , update_time=#{time}
WHERE puid = #{param.PUID}
UPDATE t_device SET state = #{status}
WHERE t_code = #{devCode}
replace INTO t_device_updown
(puid, up_time,
down_time,
create_day
) values
(#{puid},#{onlineTime},
#{offlineTime},
#{day}
)