11.10采集规则+日志

dev
xiaohuo 8 months ago
parent e676262542
commit 4aedf1dc27
  1. 8
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquBaseController.java
  2. 3
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/ScheduleRulesController.java
  3. 6
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlertMessageController.java
  4. 10
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/AlertRuleController.java
  5. 2
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/exceptionController/equAssessment.java
  6. 2
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/message/messageController.java
  7. 1
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/job/GatherJob.java

@ -50,6 +50,7 @@ public class EquBaseController extends BaseController
@PreAuthorize("@ss.hasPermi('device:files:list')") @PreAuthorize("@ss.hasPermi('device:files:list')")
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("查询多个设备信息") @ApiOperation("查询多个设备信息")
@Log(title = "设备档案查询", businessType = BusinessType.OTHER)
public TableDataInfo list( EquBaseQueryDto equBase) public TableDataInfo list( EquBaseQueryDto equBase)
{ {
startPage(); startPage();
@ -147,6 +148,7 @@ public class EquBaseController extends BaseController
@PreAuthorize("@ss.hasPermi('device:files:query1')") @PreAuthorize("@ss.hasPermi('device:files:query1')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
@ApiOperation("查询单个设备信息") @ApiOperation("查询单个设备信息")
@Log(title = "单个设备查询", businessType = BusinessType.OTHER)
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return success(equBaseService.selectEquBaseById(id)); return success(equBaseService.selectEquBaseById(id));
@ -221,7 +223,7 @@ public class EquBaseController extends BaseController
* MultipartFile file * MultipartFile file
*/ */
@PreAuthorize("@ss.hasPermi('device:files:add')") @PreAuthorize("@ss.hasPermi('device:files:add')")
@Log(title = "设备基本信息", businessType = BusinessType.INSERT) @Log(title = "增加设备档案信息", businessType = BusinessType.INSERT)
@PostMapping(value = "/add") @PostMapping(value = "/add")
@ApiOperation("增加设备档案信息") @ApiOperation("增加设备档案信息")
public AjaxResult add(@RequestBody EquBase equBase) { public AjaxResult add(@RequestBody EquBase equBase) {
@ -244,7 +246,7 @@ public class EquBaseController extends BaseController
* 修改设备基本信息 * 修改设备基本信息
*/ */
@PreAuthorize("@ss.hasPermi('device:files:edit')") @PreAuthorize("@ss.hasPermi('device:files:edit')")
@Log(title = "设备基本信息", businessType = BusinessType.UPDATE) @Log(title = "更新设备档案基本信息", businessType = BusinessType.UPDATE)
@PutMapping("/modify") @PutMapping("/modify")
@ApiOperation("修改设备档案信息") @ApiOperation("修改设备档案信息")
public AjaxResult edit(@RequestBody EquBase equBase){ public AjaxResult edit(@RequestBody EquBase equBase){
@ -263,7 +265,7 @@ public class EquBaseController extends BaseController
* 删除设备基本信息 * 删除设备基本信息
*/ */
@PreAuthorize("@ss.hasPermi('device:files:remove')") @PreAuthorize("@ss.hasPermi('device:files:remove')")
@Log(title = "设备基本信息", businessType = BusinessType.DELETE) @Log(title = "删除设备档案基本信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
@ApiOperation("删除设备档案信息") @ApiOperation("删除设备档案信息")
public AjaxResult remove(@PathVariable String[] ids) public AjaxResult remove(@PathVariable String[] ids)

@ -61,7 +61,7 @@ public class ScheduleRulesController extends BaseController
@PreAuthorize("@ss.hasPermi('device:deviceInformation:protoCollect')") @PreAuthorize("@ss.hasPermi('device:deviceInformation:protoCollect')")
@PostMapping("/addRule") @PostMapping("/addRule")
@ApiOperation("立即确定") @ApiOperation("立即确定")
@Log(title = "设备信息采集", businessType = BusinessType.OTHER)
public AjaxResult run(@RequestBody ScheduleRules newRule) throws SchedulerException, ExecutionException, InterruptedException { public AjaxResult run(@RequestBody ScheduleRules newRule) throws SchedulerException, ExecutionException, InterruptedException {
// 先检查是否有任务正在执行 // 先检查是否有任务正在执行
@ -99,6 +99,7 @@ public class ScheduleRulesController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('equipment:rules:list')") @PreAuthorize("@ss.hasPermi('equipment:rules:list')")
@GetMapping("/list") @GetMapping("/list")
@Log(title = "设备信息采集基本信息", businessType = BusinessType.OTHER)
public TableDataInfo list(ScheduleRules scheduleRules) public TableDataInfo list(ScheduleRules scheduleRules)
{ {
startPage(); startPage();

@ -80,7 +80,7 @@ public class AlertMessageController extends BaseController
@PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:statistic:list')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:statistic:list')")
@GetMapping ("/statistic/list") @GetMapping ("/statistic/list")
@ApiOperation("首页查询预警信息") @ApiOperation("首页查询预警信息")
@Log(title = "查询预警信息", businessType = BusinessType.UPDATE) @Log(title = "查询预警信息", businessType = BusinessType.OTHER)
public TableDataInfo homeList() public TableDataInfo homeList()
{ {
startPage(); startPage();
@ -95,7 +95,7 @@ public class AlertMessageController extends BaseController
@PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:list')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:list')")
@GetMapping ("/list") @GetMapping ("/list")
@ApiOperation("查询预警信息") @ApiOperation("查询预警信息")
@Log(title = "查询预警信息", businessType = BusinessType.UPDATE) @Log(title = "查询预警信息", businessType = BusinessType.OTHER)
public TableDataInfo list( AlertDto alertMessage) public TableDataInfo list( AlertDto alertMessage)
{ {
startPage(); startPage();
@ -134,7 +134,7 @@ public class AlertMessageController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:remove')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertMessage:remove')")
@ApiOperation("删除预警信息") @ApiOperation("删除预警信息")
@Log(title = "删除预警信息", businessType = BusinessType.UPDATE) @Log(title = "删除预警信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {

@ -50,7 +50,7 @@ public class AlertRuleController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:add')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:add')")
@ApiOperation("增加预警规则") @ApiOperation("增加预警规则")
@Log(title = "【增加预警规则】", businessType = BusinessType.DELETE) @Log(title = "【增加预警规则】", businessType = BusinessType.INSERT)
@PostMapping("/addRule") @PostMapping("/addRule")
public AjaxResult addRule(@RequestBody AlertRuleAddDto dto) { public AjaxResult addRule(@RequestBody AlertRuleAddDto dto) {
try { try {
@ -69,7 +69,7 @@ public class AlertRuleController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:edit')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:edit')")
@ApiOperation("修改预警规则") @ApiOperation("修改预警规则")
@Log(title = "【修改预警规则】", businessType = BusinessType.DELETE) @Log(title = "【修改预警规则】", businessType = BusinessType.UPDATE)
@PutMapping("/editRule") @PutMapping("/editRule")
public AjaxResult editRule(@RequestBody AlertRuleAddDto dto) { public AjaxResult editRule(@RequestBody AlertRuleAddDto dto) {
try { try {
@ -86,7 +86,7 @@ public class AlertRuleController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:list')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:list')")
@GetMapping("/list") @GetMapping("/list")
@Log(title = "【查询预警规则】", businessType = BusinessType.DELETE) @Log(title = "【查询预警规则】", businessType = BusinessType.OTHER)
@ApiOperation("查询预警规则") @ApiOperation("查询预警规则")
public TableDataInfo list(AlertRule alertRule) { public TableDataInfo list(AlertRule alertRule) {
startPage(); startPage();
@ -102,7 +102,7 @@ public class AlertRuleController extends BaseController {
@PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:query')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
@ApiOperation("查询预警详细规则") @ApiOperation("查询预警详细规则")
@Log(title = "【查询预警详细规则】", businessType = BusinessType.DELETE) @Log(title = "【查询预警详细规则】", businessType = BusinessType.OTHER)
public AjaxResult getInfo(@PathVariable("id") Long id) { public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(alertRuleService.selectDetailAlertRuleById(id)); return success(alertRuleService.selectDetailAlertRuleById(id));
} }
@ -139,7 +139,7 @@ public class AlertRuleController extends BaseController {
@ApiOperation("获取预警参数") @ApiOperation("获取预警参数")
@PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:byTable')") @PreAuthorize("@ss.hasPermi('inMonitoring:alertRule:byTable')")
@GetMapping("/byTable") @GetMapping("/byTable")
@Log(title = "【获取预警参数】", businessType = BusinessType.EXPORT) @Log(title = "【获取预警参数】", businessType = BusinessType.OTHER)
public AjaxResult getParamsByTableName() { public AjaxResult getParamsByTableName() {
return AjaxResult.success("获取预警参数成功",dictAlarmParamService.getParamsByTableName()); return AjaxResult.success("获取预警参数成功",dictAlarmParamService.getParamsByTableName());
} }

@ -30,7 +30,7 @@ public class equAssessment extends BaseController {
@PreAuthorize("@ss.hasPermi('inMonitoring:equAssessment:list')") @PreAuthorize("@ss.hasPermi('inMonitoring:equAssessment:list')")
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("设备评估信息") @ApiOperation("设备评估信息")
@Log(title = "设备评估与预测", businessType = BusinessType.UPDATE) @Log(title = "设备评估与预测", businessType = BusinessType.OTHER)
public TableDataInfo homeList() public TableDataInfo homeList()
{ {
startPage(); startPage();

@ -64,7 +64,7 @@ public class messageController extends BaseController {
@PreAuthorize("@ss.hasPermi('message:view')") @PreAuthorize("@ss.hasPermi('message:view')")
@ApiOperation("获取用户消息列表") @ApiOperation("获取用户消息列表")
@Log(title = "消息列表") @Log(title = "消息列表", businessType = BusinessType.OTHER)
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo getMessageList() { public TableDataInfo getMessageList() {
startPage(); startPage();

@ -43,6 +43,7 @@ public class GatherJob implements Job {
// 1.状态为5时取消调度任务 // 1.状态为5时取消调度任务
if (rule.getStatus() == 5) { if (rule.getStatus() == 5) {
rule.setStatus(4); rule.setStatus(4);
scheduleRulesMapper.updateScheduleRules(rule);
Scheduler scheduler = context.getScheduler(); Scheduler scheduler = context.getScheduler();
JobKey jobKey = context.getJobDetail().getKey(); JobKey jobKey = context.getJobDetail().getKey();
// scheduler.deleteJob(jobKey); // scheduler.deleteJob(jobKey);

Loading…
Cancel
Save