|
@@ -3,6 +3,7 @@ package com.zcxk.water.web.controller;
|
|
|
import com.zcxk.core.common.pojo.AjaxMessage;
|
|
|
import com.zcxk.water.api.dto.AlarmDetailsAddDto;
|
|
|
import com.zcxk.water.api.dto.DeviceDataDto;
|
|
|
+import com.zcxk.water.api.dto.DeviceStateDto;
|
|
|
import com.zcxk.water.web.service.AlarmDetailsService;
|
|
|
import com.zcxk.water.web.service.NotifyService;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -30,9 +31,9 @@ public class NotifyController {
|
|
|
@Autowired
|
|
|
private NotifyService notifyService;
|
|
|
|
|
|
- @RequestMapping(value="alarm/add" , method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value="add/alarm" , method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "告警信息添加")
|
|
|
- public AjaxMessage<Integer> alarmAdd(@ApiParam(value = "报警详情信息") @RequestBody AlarmDetailsAddDto dto){
|
|
|
+ public AjaxMessage<Integer> addAlarm(@ApiParam(value = "报警详情信息") @RequestBody AlarmDetailsAddDto dto){
|
|
|
return AjaxMessage.success(notifyService.insertAlarmInfo(dto));
|
|
|
}
|
|
|
|
|
@@ -44,5 +45,12 @@ public class NotifyController {
|
|
|
return AjaxMessage.success();
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(value="update/device/state" , method = RequestMethod.POST)
|
|
|
+ @ApiOperation(value = "更新设备状态")
|
|
|
+ public AjaxMessage updateDeviceState(@ApiParam(value = "设备数据处理") @RequestBody DeviceStateDto dto){
|
|
|
+ notifyService.updateDeviceSate(dto);
|
|
|
+ return AjaxMessage.success();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|