监测统计进行日期范围查询

This commit is contained in:
kerwincui
2022-05-20 21:54:42 +08:00
parent 1113ed0c50
commit 28ead10408
2 changed files with 3 additions and 9 deletions

View File

@@ -318,7 +318,7 @@ public class ToolController extends BaseController {
return;
}
String[] clientInfo = model.getClientid().split("&");
String deviceNum = clientInfo[0];
String deviceNum = clientInfo[1];
Device device = deviceService.selectShortDeviceBySerialNumber(deviceNum);
// 设备状态1-未激活2-禁用3-在线4-离线)
if (model.getAction().equals("client_disconnected")) {
@@ -326,7 +326,7 @@ public class ToolController extends BaseController {
deviceService.updateDeviceStatusAndLocation(device, "");
// 发布设备状态
emqxService.publishStatus(device.getProductId(), device.getSerialNumber(), 4, device.getIsShadow());
// 清空保留消息,上线后发布新的属性功能保留消息
// 清空保留消息,上线后发布新的属性功能保留消息 TODO 发布的时候取消保留消息
emqxService.publishProperty(device.getProductId(), device.getSerialNumber(), null);
emqxService.publishFunction(device.getProductId(), device.getSerialNumber(), null);
} else if (model.getAction().equals("client_connected")) {

View File

@@ -3,9 +3,6 @@
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="75px" style="">
<el-form-item label="最大数量" prop="deviceName">
<el-input v-model="queryParams.params.maxSize" placeholder="请输入设备名称" clearable size="small" />
</el-form-item>
<el-form-item label="时间范围">
<el-date-picker v-model="daterangeTime" size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
@@ -67,9 +64,7 @@ export default {
queryParams: {
deviceId: 0,
identity: "",
params: {
maxSize:'998'
},
params: {},
},
};
},
@@ -104,7 +99,6 @@ export default {
this.queryParams.params['beginTime'] = this.daterangeTime[0];
this.queryParams.params['endTime'] = this.daterangeTime[1];
}
console.log(this.queryParams);
listMonitor(this.queryParams).then(response => {
let data = response.rows;
// 对象转数组