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