|
|
|
|
@ -1,7 +1,9 @@ |
|
|
|
|
package com.alops.web.controller.equManagement; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
@ -105,8 +107,17 @@ public class EquBaseController extends BaseController |
|
|
|
|
@ApiOperation("按设备类型分类统计设备信息") |
|
|
|
|
public AjaxResult listMonitorInfoByType() { |
|
|
|
|
List<MonitorStatisticDto> list = equBaseService.selectEquStatisticByType(); |
|
|
|
|
return AjaxResult.success("查询成功", list); |
|
|
|
|
// 获取总设备数
|
|
|
|
|
int totalCount = 0; |
|
|
|
|
if (list != null) { |
|
|
|
|
totalCount = list.stream().mapToInt(MonitorStatisticDto::getCount).sum(); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
|
result.put("totalCount", totalCount); |
|
|
|
|
result.put("list", list); |
|
|
|
|
return AjaxResult.success("查询成功", result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取设备基本信息详细信息 |
|
|
|
|
|