| | |
| | | * @return the alarm levels
|
| | | */
|
| | | @GetMapping("alarm-levels")
|
| | | public Object getAlarmLevels(HttpServletRequest request, Optional<Integer> orgId, Optional<Integer> mpId) {
|
| | | public Object getAlarmLevels(HttpServletRequest request, Optional<Integer> orgId, Optional<Integer> mpId,Optional<String> mac) {
|
| | | List<Map<String,Object>> sensorAlarmList = null;
|
| | | try {
|
| | | AlarmConfig alarmConfig = null;
|
| | |
| | | alarmConfig = alarmConfigService.queryValueByOrganizationId(orgId.get()).get();
|
| | | }else if(mpId.isPresent()){
|
| | | alarmConfig = alarmConfigService.queryByMonitorPointId(mpId.get()).get();
|
| | | } else if(mac.isPresent() ){
|
| | | alarmConfig = alarmConfigService.queryByDeviceMac(mac.get()).get();
|
| | | }
|
| | | //返回值处理
|
| | | if(alarmConfig.getValue()!=null&&alarmConfig.getValue().getAlarmLevels()!=null){
|