|
|
@@ -5,9 +5,11 @@ import com.yunfeiyun.agmp.common.core.controller.BaseController;
|
|
|
import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
|
|
|
import com.yunfeiyun.agmp.common.core.page.TableDataInfo;
|
|
|
import com.yunfeiyun.agmp.common.enums.BusinessType;
|
|
|
+import com.yunfeiyun.agmp.common.utils.DateUtils;
|
|
|
import com.yunfeiyun.agmp.common.utils.SecurityUtils;
|
|
|
import com.yunfeiyun.agmp.common.utils.poi.ExcelUtil;
|
|
|
import com.yunfeiyun.agmp.iot.common.domain.IotWarnlog;
|
|
|
+import com.yunfeiyun.agmp.iotm.web.domain.reqvo.IotWarnlogDealReqVo;
|
|
|
import com.yunfeiyun.agmp.iotm.web.service.IIotWarnlogService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
@@ -58,9 +60,9 @@ public class IotWarnlogController extends BaseController{
|
|
|
* 获取告警记录详细信息
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('iot:warn:record:query')")
|
|
|
- @GetMapping(value = "/info/{wrBid}")
|
|
|
- public AjaxResult getInfo(@PathVariable("wrBid") String wrBid){
|
|
|
- return success(iotWarnlogService.selectIotWarnlogByWlBid(wrBid,SecurityUtils.getTid()));
|
|
|
+ @GetMapping(value = "/info/{wlBid}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("wlBid") String wlBid){
|
|
|
+ return success(iotWarnlogService.selectIotWarnlogByWlBid(wlBid,SecurityUtils.getTid()));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -86,6 +88,23 @@ public class IotWarnlogController extends BaseController{
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 修改告警记录
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('iot:warn:record:edit')")
|
|
|
+ @Log(title = "告警记录", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/deal")
|
|
|
+ public AjaxResult deal(@Valid @RequestBody IotWarnlogDealReqVo iotWarnlogDealReqVo){
|
|
|
+ IotWarnlog dealLog = new IotWarnlog();
|
|
|
+ dealLog.setTid(SecurityUtils.getTid());
|
|
|
+ dealLog.setWlBid(iotWarnlogDealReqVo.getWlBid());
|
|
|
+ dealLog.setWlDealresult(iotWarnlogDealReqVo.getWlDealresult());
|
|
|
+ dealLog.setWlDealtime(DateUtils.dateTimeNow());
|
|
|
+ dealLog.setWlDealuserid(SecurityUtils.getUserId());
|
|
|
+ return toAjax(iotWarnlogService.updateIotWarnlog(dealLog));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 删除告警记录
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('iot:warn:record:remove')")
|