|
@@ -1,6 +1,7 @@
|
|
package com.ruoyi.web.controller.system;
|
|
package com.ruoyi.web.controller.system;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.ruoyi.common.annotation.Excel;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
@@ -128,12 +129,20 @@ public class TDataDisplayController extends BaseController {
|
|
|
|
|
|
@GetMapping("/deviceView")
|
|
@GetMapping("/deviceView")
|
|
public AjaxResult deviceView() {
|
|
public AjaxResult deviceView() {
|
|
- DeviceViewDto dto = new DeviceViewDto();
|
|
|
|
- dto.setDeviceCount(tShouhuanAlarmListService.selectTShouhuanAlarmStatus() + tShouhuanAlarmListService.selectTShouhuanAlarmStatusSolve());
|
|
|
|
- dto.setDeviceOnline(tShouhuanAlarmListService.selectTShouhuanAlarmStatus());
|
|
|
|
- dto.setUn_deviceOnline(tShouhuanAlarmListService.selectTShouhuanAlarmStatusSolve());
|
|
|
|
- dto.setAlarmCount(tShouhuanAlarmListService.selectTShouhuanAlarmListCount());
|
|
|
|
- return success(dto);
|
|
|
|
|
|
+ DeviceViewDto deviceViewDto = new DeviceViewDto();
|
|
|
|
+ /** 总数 deviceCount */
|
|
|
|
+ Integer deviceCount = itShouhuanInfoService.selectTShouhuanInfoAllCount();
|
|
|
|
+ deviceViewDto.setDeviceCount(deviceCount == null ? 0 : deviceCount);
|
|
|
|
+ /** 在线 deviceOnline */
|
|
|
|
+ Integer deviceOnline = itShouhuanInfoService.selectTShouhuanInfoAllOnlineCount();
|
|
|
|
+ deviceViewDto.setDeviceOnline(deviceOnline == null ? 0 : deviceOnline);
|
|
|
|
+ /** 离线 un_deviceOnline */
|
|
|
|
+ Integer un_deviceOnline = itShouhuanInfoService.selectTShouhuanInfoAllUnOnlineCount();
|
|
|
|
+ deviceViewDto.setUn_deviceOnline(un_deviceOnline == null ? 0 : un_deviceOnline);
|
|
|
|
+ /** 告警数 alarmCount */
|
|
|
|
+ Integer alarmCount = tEarlyWarningService.selectTEarlyWarningUnCompletedAllCount();
|
|
|
|
+ deviceViewDto.setAlarmCount(alarmCount == null ? 0 : alarmCount);
|
|
|
|
+ return success(deviceViewDto);
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/deviceType")
|
|
@GetMapping("/deviceType")
|
|
@@ -154,7 +163,7 @@ public class TDataDisplayController extends BaseController {
|
|
public AjaxResult userAgeAll() {
|
|
public AjaxResult userAgeAll() {
|
|
Integer total = userProfileService.selectuserAgeCount();
|
|
Integer total = userProfileService.selectuserAgeCount();
|
|
List<UserAgeDto> dtoList = userProfileService.selectuserAgeDto();
|
|
List<UserAgeDto> dtoList = userProfileService.selectuserAgeDto();
|
|
- dtoList.removeIf(user -> StringUtils.isNull(user.getAge()));
|
|
|
|
|
|
+ dtoList.removeIf(user -> StringUtils.isNull(user.getAgeGroup()));
|
|
AjaxResult ajax = new AjaxResult();
|
|
AjaxResult ajax = new AjaxResult();
|
|
ajax.put("list", dtoList);
|
|
ajax.put("list", dtoList);
|
|
ajax.put("total", total);
|
|
ajax.put("total", total);
|