insert into iot_data.alarm_${workstationId}
values ${sql}
create table if not exists iot_data.alarm_${workstationId} using super_alarm tags
(
#{workstationId}
)
select * count(*)
from iot_data.super_alarm
where workstation_id = #{vo.workstationId}
/*按照班次查询*/
and shift_index = #{vo.shiftIndex}
and factory_date = #{queryTime}
/*按照日查询*/
and factory_date = #{queryTime}
/*按照月查询*/
and factory_year = #{vo.year}
and factory_month = #{vo.month}
/*按照周询*/
and factory_year = #{vo.year}
and factory_week = #{vo.week}
select *
from iot_data.super_alarm
where workstation_id = #{vo.workstationId}
and factory_date between #{startTime} and #{endTime}
and shift_index != -1
and factory_year = #{year}
and factory_month in
#{month}
and factory_year = #{year}
and factory_week in
#{week}
and factory_date between #{startTime} and #{endTime}
order by ts desc
select
-- code as alarmCode,
-- ts,
factory_date factoryDate,
-- factory_year factoryYear,
factory_month factoryMonth,
factory_week factoryWeek,
workstation_id workstationId,
shift_index shiftIndex,
shift_time_type shiftTimeType
from iot_data.super_alarm
where shift_index != 0
AND workstation_id IN
#{id}
AND factory_date BETWEEN #{beginTime} AND #{endTime}
order by ts desc
select
shift_index shiftIndex,
ts,
factory_date factoryDate,
workstation_id workstationId
from iot_data.super_alarm
where shift_index != 0
AND workstation_id IN
#{id}
AND factory_date BETWEEN #{beginTime} AND #{endTime}
and shift_time_type != 2
and shift_index > 0
order by ts desc
select code as alarmCode,
ts,
message alarmMsg,
factory_date factoryDate,
workstation_id workstationId
from iot_data.alarm_${workstationId}
where shift_index != 0
AND factory_date BETWEEN #{beginTime} AND #{endTime}
and shift_time_type != 2
and shift_index > 0
order by ts desc
limit ${(pageNo - 1) * pageSize}, ${pageSize}
select code as alarmCode,
ts,
message alarmMsg,
factory_date factoryDate,
workstation_id workstationId,
shift_index shiftIndex
from iot_data.alarm_${workstationId}
where shift_index != 0
AND factory_date BETWEEN #{beginTime} AND #{endTime}
and shift_time_type != 2
and shift_index > 0
order by ts desc
limit ${(pageNo - 1) * pageSize}, ${pageSize}
select count(*)
from iot_data.alarm_${workstationId}
where shift_index != 0
AND factory_date BETWEEN #{beginTime} AND #{endTime}
and shift_time_type != 2
and shift_index > 0
select *
from iot_data.super_alarm
where workstation_id = #{workstationId}
order by ts desc
limit ${(pageNo - 1) * pageSize}, ${pageSize}
select count(ts)
from iot_data.super_alarm
where workstation_id = #{workstationId}
select code as alarmCode,
message as alarmMsg
from root.f2.alarm_${workstationId} order by time desc
limit #{end} offset #{start}
align by device
select count(workstation_id) from root.f2.alarm_${workstationId}
code,message,level,workstation_id as workstationId,calendar_code as calendarCode,factory_year as factoryYear,factory_month as factoryMonth,factory_week as factoryWeek,factory_date as factoryDate,shift_index as shiftIndex,shift_time_type as shiftTimeType
select
from root.f2.alarm_*
where workstation_id = #{vo.workstationId}
and shift_index = #{vo.shiftIndex}
and factory_date = #{factoryDate}
and factory_date = #{factoryDate}
and factory_year = #{vo.year}
and factory_month = #{vo.month}
and factory_year = #{vo.year}
and factory_week = #{vo.week}
align by device
select
from root.f2.alarm_*
where workstation_id = #{vo.workstationId}
and shift_index = #{vo.shiftIndex}
and factory_date = #{factoryDate}
and factory_date = #{factoryDate}
and factory_year = #{vo.year}
and factory_month = #{vo.month}
and factory_year = #{vo.year}
and factory_week = #{vo.week}
order by time desc
limit ${query.size} offset ${(query.current - 1) * query.size}
align by device
select
from root.f2.alarm_*
where workstation_id = #{workstationId}
and factory_date =]]> #{startFactoryDate}
and factory_date #{endFactoryDate}
align by device