|
|
|
@ -3,22 +3,19 @@ package com.hnac.hzims.operational.alert.controller;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; |
|
|
|
|
import com.hnac.hzims.operational.alert.service.AlarmHandleService; |
|
|
|
|
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; |
|
|
|
|
import com.hnac.hzims.operational.alert.vo.HandleQueryVo; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author ysj |
|
|
|
@ -35,14 +32,13 @@ public class AlarmHandleController extends BladeController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 详情 |
|
|
|
|
* 告警处理:处理、延后、误报 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/detail") |
|
|
|
|
@PostMapping("/execute") |
|
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
|
@ApiOperation(value = "详情", notes = "传入AlarmHandleEntity") |
|
|
|
|
public R<AlarmHandleEntity> detail(AlarmHandleEntity entity) { |
|
|
|
|
AlarmHandleEntity detail = service.getOne(Condition.getQueryWrapper(entity)); |
|
|
|
|
return R.data(detail); |
|
|
|
|
@ApiOperation(value = "告警处理", notes = "传入AlarmHandleEntity") |
|
|
|
|
public R execute(@RequestBody AlarmHandleVo param) { |
|
|
|
|
return R.status(service.execute(param)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -57,23 +53,13 @@ public class AlarmHandleController extends BladeController {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 告警处理:处理、延后、误报 |
|
|
|
|
* 告警处理用户查询 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/execute") |
|
|
|
|
@GetMapping("/handleUser") |
|
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
|
@ApiOperation(value = "告警处理", notes = "传入AlarmHandleEntity") |
|
|
|
|
public R execute(@RequestBody AlarmHandleVo param) { |
|
|
|
|
return R.status(service.execute(param)); |
|
|
|
|
@ApiOperation(value = "告警通知人", notes = "告警通知人") |
|
|
|
|
public R<List<User>> handleUser() { |
|
|
|
|
return R.data(service.handleUser()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 删除 |
|
|
|
|
*/ |
|
|
|
|
@PostMapping("/remove") |
|
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
|
return R.status(service.deleteLogic(Func.toLongList(ids))); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|