设备监测统计适配移动端筛选

This commit is contained in:
kerwincui
2022-07-01 22:35:57 +08:00
parent d33c66d49c
commit ebea98ca99
3 changed files with 37 additions and 4 deletions

View File

@@ -70,6 +70,39 @@ public class DeviceLog extends BaseEntity
@Excel(name = "租户名称") @Excel(name = "租户名称")
private String tenantName; private String tenantName;
/** 查询用的开始时间 */
private String beginTime;
/** 查询用的结束时间 */
private String endTime;
/** 查询的总数 */
private int total;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public String getBeginTime() {
return beginTime;
}
public void setBeginTime(String beginTime) {
this.beginTime = beginTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public Integer getMode() { public Integer getMode() {
return mode; return mode;
} }

View File

@@ -38,10 +38,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="1==1"> and device_id = #{deviceId} </if> <if test="1==1"> and device_id = #{deviceId} </if>
<if test="1==1"> and identity = #{identity} </if> <if test="1==1"> and identity = #{identity} </if>
<if test="1==1"> and is_monitor=1</if> <if test="1==1"> and is_monitor=1</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if> <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> and create_time between #{beginTime} and #{endTime}</if>
</where> </where>
order by create_time desc order by create_time desc
limit 2000 limit #{total}
</select> </select>
<select id="selectDeviceLogList" parameterType="com.ruoyi.iot.domain.DeviceLog" resultMap="DeviceLogResult"> <select id="selectDeviceLogList" parameterType="com.ruoyi.iot.domain.DeviceLog" resultMap="DeviceLogResult">

View File

@@ -119,9 +119,9 @@
is_monitor=1 is_monitor=1
<if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if> <if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if>
<if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if> <if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if>
<if test="device.params.beginTime != null and device.params.beginTime != '' and device.params.endTime != null and device.params.endTime != ''"> and ts between #{device.params.beginTime} and #{device.params.endTime}</if> <if test="device.beginTime != null and device.beginTime != '' and device.endTime != null and device.endTime != ''"> and ts between #{device.beginTime} and #{device.endTime}</if>
order by ts desc order by ts desc
limit 2000 limit #{device.total}
</where> </where>
</select> </select>