whycxzp
2025-03-14 2e8866ba2c1dbbe8aab3bb40f3788a53bf831d6a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.whyc.controller;
 
import com.whyc.dto.DalmDto;
import com.whyc.dto.Response;
import com.whyc.pojo.db_user.UserInf;
import com.whyc.service.DevalarmDataService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.text.ParseException;
 
@RestController
@Api(tags = "历史告警管理")
@RequestMapping("tinf")
public class DevalarmDataHisController {
    @Autowired
    private DevalarmDataService dataService;
 
    @ApiOperation(value = "测试实时告警")
    @PostMapping("getDAlmInf")
    public Response getDAlmInf(@RequestParam int uid, @RequestBody DalmDto dto){
        return dataService.getDAlmInf(uid,dto);
    }
    @ApiOperation(value = "弹窗告警")
    @GetMapping("getDAlmPopUp")
    public Response getDAlmPopUp(){
        UserInf uinf= ActionUtil.getUser();
        return dataService.getDAlmPopUp(uinf.getUid());
    }
 
    @ApiOperation(value = "获取历史告警")
    @PostMapping("getDAlmHis")
    public Response getDAlmHis( @RequestBody DalmDto dto) throws ParseException {
        return dataService.getDAlmHis(dto);
    }
 
    @ApiOperation(value = "确认实时告警")
    @GetMapping("confiirmAlm")
    public Response confiirmAlm(@RequestParam int num){
        return dataService.confiirmAlm(num);
    }
 
    @ApiOperation(value = "获取所有的告警类型")
    @GetMapping("getAllAlmName")
    public Response getAllAlmName(){
        return dataService.getAllAlmName();
    }
}