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(); } }