设备名称,编号模糊搜索
This commit is contained in:
@ -1,9 +1,6 @@
|
|||||||
package com.fastbee.data.controller;
|
package com.fastbee.data.controller;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@ -56,14 +53,25 @@ public class DeviceReportInfoController extends BaseController
|
|||||||
* 查询设备上电审核前上报的基础信息列表
|
* 查询设备上电审核前上报的基础信息列表
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('iot:info:list')")
|
// @PreAuthorize("@ss.hasPermi('iot:info:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询设备上电审核前上报的基础信息列表")
|
@ApiOperation("查询设备上电审核前上报的基础信息列表")
|
||||||
public TableDataInfo list(DeviceReportInfo deviceReportInfo)
|
public TableDataInfo list(DeviceReportInfo deviceReportInfo)
|
||||||
{
|
{
|
||||||
|
System.err.println(deviceReportInfo.getSearchValue());
|
||||||
|
List<DeviceReportInfo> list=new ArrayList<>();
|
||||||
|
if(deviceReportInfo.getSearchValue()!=null){
|
||||||
|
deviceReportInfo.setSerialNumber(deviceReportInfo.getSearchValue());
|
||||||
|
}
|
||||||
|
|
||||||
startPage();
|
startPage();
|
||||||
List<DeviceReportInfo> list = deviceReportInfoService.selectDeviceReportInfoList(deviceReportInfo);
|
list = deviceReportInfoService.selectDeviceReportInfoList(deviceReportInfo);
|
||||||
System.err.println("查询条件:"+deviceReportInfo.getOnLine());
|
|
||||||
System.err.println("设备总长度:"+list.size());
|
if (list.isEmpty()){
|
||||||
|
deviceReportInfo.setSerialNumber(null);
|
||||||
|
deviceReportInfo.setName(deviceReportInfo.getSearchValue());
|
||||||
|
list = deviceReportInfoService.selectDeviceReportInfoList(deviceReportInfo);
|
||||||
|
}
|
||||||
|
|
||||||
//查询设备在线状态
|
//查询设备在线状态
|
||||||
list.forEach(d->{
|
list.forEach(d->{
|
||||||
if(d.getType()==1){
|
if(d.getType()==1){
|
||||||
@ -78,6 +86,8 @@ public class DeviceReportInfoController extends BaseController
|
|||||||
d.setType(0);
|
d.setType(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// //处理在线/离线筛选
|
// //处理在线/离线筛选
|
||||||
// if(deviceReportInfo.getOnLine()!=null){
|
// if(deviceReportInfo.getOnLine()!=null){
|
||||||
// //根据online状态的值过滤集合
|
// //根据online状态的值过滤集合
|
||||||
@ -86,7 +96,7 @@ public class DeviceReportInfoController extends BaseController
|
|||||||
// }
|
// }
|
||||||
System.err.println("过滤后总长度:"+list.size());
|
System.err.println("过滤后总长度:"+list.size());
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
//统计是设备相关信息
|
//统计是设备相关信息
|
||||||
@GetMapping("/list/count")
|
@GetMapping("/list/count")
|
||||||
@ApiOperation("统计是设备相关信息")
|
@ApiOperation("统计是设备相关信息")
|
||||||
|
Reference in New Issue
Block a user