|
|
|
@ -63,19 +63,28 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 树状获取监控单元列表
|
|
|
|
|
* @param hwMonitorUnits 监控单元对象
|
|
|
|
|
* @return list
|
|
|
|
|
* @throws
|
|
|
|
|
* */
|
|
|
|
|
@GetMapping("/treeList")
|
|
|
|
|
@PostMapping("/treeList")
|
|
|
|
|
public TableDataInfo treeList(List<HwMonitorUnit> hwMonitorUnits){
|
|
|
|
|
List<HwMonitorUnit> list = hwMonitorUnitService.selectTreeList(hwMonitorUnits);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//选择场景
|
|
|
|
|
@GetMapping("/selectHwSceneBySceneModeId")
|
|
|
|
|
public TableDataInfo selectHwSceneBySceneModeId(Long sceneModeId){
|
|
|
|
|
List<HwScene> hwScenes = hwSceneService.selectHwSceneBySceneModeId(sceneModeId);
|
|
|
|
|
return getDataTable(hwScenes);
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// *
|
|
|
|
|
// * 选择场景
|
|
|
|
|
// * @param sceneModeId 场景id
|
|
|
|
|
// * @return
|
|
|
|
|
// */
|
|
|
|
|
//
|
|
|
|
|
// @PostMapping("/selectHwSceneBySceneModeId")
|
|
|
|
|
// public TableDataInfo selectHwSceneBySceneModeId(Long sceneModeId){
|
|
|
|
|
// List<HwScene> hwScenes = hwSceneService.selectHwSceneBySceneModeId(sceneModeId);
|
|
|
|
|
// return getDataTable(hwScenes);
|
|
|
|
|
// }
|
|
|
|
|
/**
|
|
|
|
|
* 查询3. 设备各类型占所有设备数量百分比饼状图(左下角)
|
|
|
|
|
* */
|
|
|
|
@ -84,21 +93,33 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
List<DeviceModeVo> maps = hwDeviceService.selectDeviceModeNameVo();
|
|
|
|
|
return getDataTable(maps);
|
|
|
|
|
}
|
|
|
|
|
//获取有开关属性的设备
|
|
|
|
|
//
|
|
|
|
|
/**
|
|
|
|
|
* 获取有开关属性的设备
|
|
|
|
|
* @param monitorUnitId 监控单元id
|
|
|
|
|
* */
|
|
|
|
|
@PostMapping("/selectDeviceByDeviceModeByMonitorUnitId")
|
|
|
|
|
public Map<String, Map<String, Object>> selectDeviceByDeviceModeByMonitorUnitId(Long monitorUnitId){
|
|
|
|
|
startPage();
|
|
|
|
|
Map<String, Map<String, Object>> maps = hwDeviceService.selectDeviceByDeviceModeByMonitorUnitId(monitorUnitId);
|
|
|
|
|
return maps;
|
|
|
|
|
}
|
|
|
|
|
//获取直采变量的设备
|
|
|
|
|
/**
|
|
|
|
|
* 获取直采变量的设备
|
|
|
|
|
* @param monitorUnitId 监控单元id
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@PostMapping("/selectDeviceModeFunctionByFunctionType")
|
|
|
|
|
public Map<String, Map<String, Object>> selectDeviceModeFunctionByFunctionType(Long monitorUnitId){
|
|
|
|
|
startPage();
|
|
|
|
|
Map<String, Map<String, Object>> maps = hwDeviceService.selectDeviceModeFunctionByFunctionType(monitorUnitId);
|
|
|
|
|
return maps;
|
|
|
|
|
}
|
|
|
|
|
//设备历史数据
|
|
|
|
|
//
|
|
|
|
|
/**
|
|
|
|
|
* 设备历史数据
|
|
|
|
|
* @param deviceId 设备id
|
|
|
|
|
* */
|
|
|
|
|
@PostMapping("/getHistoryData")
|
|
|
|
|
public TableDataInfo getHistoryData(Long deviceId){
|
|
|
|
|
startPage();
|
|
|
|
@ -150,8 +171,9 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取最子级监控单元数量、设备数量和在线设备数量
|
|
|
|
|
* @param sceneId 场景id
|
|
|
|
|
* */
|
|
|
|
|
@GetMapping("/SubDevice")
|
|
|
|
|
@PostMapping("/SubDevice")
|
|
|
|
|
public SubDeviceSumVo subDevice(Long sceneId){
|
|
|
|
|
SubDeviceSumVo subDeviceSumVos = hwMonitorUnitService.selectSubDeviceSum(sceneId);
|
|
|
|
|
|
|
|
|
@ -159,6 +181,7 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 按电子围栏定位显示其下设备数量,以及报警的设备数量。
|
|
|
|
|
* @param 场景id
|
|
|
|
|
* */
|
|
|
|
|
@PostMapping("/ElectronicNumVo")
|
|
|
|
|
public AjaxResult ElectronicNumVo(Long sceneId){
|
|
|
|
@ -167,8 +190,9 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 获取监控单元详细信息
|
|
|
|
|
* @param 监控单元id
|
|
|
|
|
* */
|
|
|
|
|
@GetMapping("/selectMonitorUnitSub")
|
|
|
|
|
@PostMapping("/selectMonitorUnitSub")
|
|
|
|
|
//ok
|
|
|
|
|
public HwMonitorUnit selectMonitorUnitSub(Long monitorUnitId){
|
|
|
|
|
HwMonitorUnit hwMonitorUnits = hwMonitorUnitService.selectHwMonitorUnitByMonitorUnitId(monitorUnitId);
|
|
|
|
@ -177,6 +201,9 @@ public class HwMonitorUnitController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 2. 设备实时在运数量曲线图
|
|
|
|
|
* @param beginTime 开始时间
|
|
|
|
|
* @param endTime 结束时间
|
|
|
|
|
* @param sceneId 场景id
|
|
|
|
|
* */
|
|
|
|
|
@PostMapping("/getDeviceOperations")
|
|
|
|
|
public Integer selectTdengine(String beginTime,String endTime,Long sceneId){
|
|
|
|
|