5 changed files with 183 additions and 0 deletions
@ -0,0 +1,42 @@ |
|||||||
|
package com.mh.web.controller.monitor; |
||||||
|
|
||||||
|
import com.mh.common.core.controller.BaseController; |
||||||
|
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
||||||
|
import com.mh.common.core.page.TableDataInfo; |
||||||
|
import com.mh.system.service.device.ICollectionParamsManageService; |
||||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 风柜监控系统 |
||||||
|
* @date 2025-03-17 17:33:24 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/device/ahu") |
||||||
|
public class AirHandingUnitsMonitorController extends BaseController { |
||||||
|
|
||||||
|
private final ICollectionParamsManageService iCollectionParamsManageService; |
||||||
|
|
||||||
|
public AirHandingUnitsMonitorController(ICollectionParamsManageService iCollectionParamsManageService) { |
||||||
|
this.iCollectionParamsManageService = iCollectionParamsManageService; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取监控列表内容数据 |
||||||
|
*/ |
||||||
|
@GetMapping("/monitor/list") |
||||||
|
public TableDataInfo list(@RequestParam(name = "systemType") String systemType, @RequestParam(name = "houseId") String houseId) |
||||||
|
{ |
||||||
|
List<DeviceMonitorDTO> list = iCollectionParamsManageService.selectMonitorListBySystemTypeAndHouseId(systemType, houseId); |
||||||
|
return getDataTable(list); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,64 @@ |
|||||||
|
package com.mh.web.controller.monitor; |
||||||
|
|
||||||
|
import com.mh.common.core.controller.BaseController; |
||||||
|
import com.mh.common.core.domain.dto.DeviceMonitorDTO; |
||||||
|
import com.mh.common.core.domain.vo.DeviceOperateMonitorVO; |
||||||
|
import com.mh.common.core.page.TableDataInfo; |
||||||
|
import com.mh.system.service.device.ICollectionParamsManageService; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author LJF |
||||||
|
* @version 1.0 |
||||||
|
* @project EEMCS |
||||||
|
* @description 冷源系统监测 |
||||||
|
* @date 2025-03-17 17:36:44 |
||||||
|
*/ |
||||||
|
@Slf4j |
||||||
|
@RestController |
||||||
|
@RequestMapping("/device/cs") |
||||||
|
public class CoolingSystemMonitorController extends BaseController { |
||||||
|
|
||||||
|
private final ICollectionParamsManageService iCollectionParamsManageService; |
||||||
|
|
||||||
|
public CoolingSystemMonitorController(ICollectionParamsManageService iCollectionParamsManageService) { |
||||||
|
this.iCollectionParamsManageService = iCollectionParamsManageService; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取监控列表内容数据 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('device:cpm:list')") |
||||||
|
@GetMapping("/monitor/list") |
||||||
|
public TableDataInfo list(@RequestParam(name = "systemType") String systemType) |
||||||
|
{ |
||||||
|
List<DeviceMonitorDTO> list = iCollectionParamsManageService.selectMonitorListBySystemType(systemType); |
||||||
|
return getDataTable(list); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 对设备进行操作处理获取对应的列表数据 |
||||||
|
* |
||||||
|
* @param systemType |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('device:cpm:operationList')") |
||||||
|
@GetMapping("/operation/list") |
||||||
|
public TableDataInfo operationDeviceList(@RequestParam(name = "systemType") String systemType) { |
||||||
|
try { |
||||||
|
List<DeviceOperateMonitorVO> deviceOperateMonitorVOS = iCollectionParamsManageService.operationDeviceList(systemType); |
||||||
|
return getDataTable(deviceOperateMonitorVOS); |
||||||
|
} catch (Exception e) { |
||||||
|
log.error("设备操作失败", e); |
||||||
|
return getDataTable(null); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue