package com.zc.business.controller; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.zc.business.domain.DcWarning; import com.zc.business.service.IDCPerceivedEventsWarningService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author 王思祥 * @ClassName DCPerceivedEventsWarningController */ @RestController @RequestMapping("/perceivedEvents/warning") public class DCPerceivedEventsWarningController extends BaseController { @Autowired private IDCPerceivedEventsWarningService perceivedEventsWarningService; //查询预警表与历史表所有感知事件的数量 @PostMapping("/warningTotal") public AjaxResult getPerceivedEventsWarning(){ return AjaxResult.success(perceivedEventsWarningService.perceivedEventsWarningNum()); } //感知事件类型 @PostMapping("/evenType") public AjaxResult getEvenTypeList(){ return AjaxResult.success(perceivedEventsWarningService.selectEventTypeList()); } //查询预警感知事件类型 @PostMapping("/warningType") public AjaxResult getWarningTypeList(){ return AjaxResult.success(perceivedEventsWarningService.selectWarningTypeList()); } //根据类型查询预计事件 @PostMapping("/perceivedEventsList") public AjaxResult getPerceivedEventsList(@RequestBody DcWarning dcWarning){ return AjaxResult.success(perceivedEventsWarningService.selectPerceivedEventsList(dcWarning)); } }