| | |
| | | private BattalarmDataService battalarmDataService; |
| | | |
| | | @Autowired |
| | | private PwrdevAlarmService pwrdevAlarmService; |
| | | |
| | | @Autowired |
| | | private BattRealdataIdService battRealdataIdService; |
| | | |
| | | |
| | |
| | | return battRealdataIdService.getBattHisRealInAlm(battgroupId,startTime,almId); |
| | | } |
| | | |
| | | @PostMapping("getPwrtAlmAnalyse") |
| | | @ApiOperation("预警分析管理-电源告警") |
| | | public Response getPwrtAlmAnalyse(@RequestBody AlmAnalyseDto dto){ |
| | | Integer uid=ActionUtil.getUser().getId(); |
| | | dto.setUid(uid); |
| | | return pwrdevAlarmService.getPwrtAlmAnalyse(dto); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.dto.AlarmDto; |
| | | import com.whyc.dto.Param.AlmAnalyseDto; |
| | | import com.whyc.dto.Real.AlmDto; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarm; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParam; |
| | | import com.whyc.pojo.web_site.AlarmInspection; |
| | | |
| | | import java.util.List; |
| | |
| | | List<AlarmInspection> getListGreatThan(Long id); |
| | | |
| | | List<AlarmDto> getListByUserId(Integer userId, Integer alarmLevel); |
| | | |
| | | //预警分析管理-电源告警 |
| | | List<PwrdevAlarm> getPwrtAlmAnalyse(AlmAnalyseDto dto); |
| | | } |
| | |
| | | //查询机房所在的班组 |
| | | public String getGroupName(Integer powerId) { |
| | | String groupName = powerInfMapper.getGroupName(powerId); |
| | | if(groupName==null||groupName.length()<0){ |
| | | groupName="none"; |
| | | } |
| | | return groupName; |
| | | } |
| | | //查询所有的包机组名集合(班组) |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.constant.BattSingalIdEnum; |
| | | import com.whyc.constant.PowerAlarmEnum; |
| | | import com.whyc.dto.AlarmParam; |
| | | import com.whyc.dto.Param.AlmAnalyseDto; |
| | | import com.whyc.dto.Param.ParamAlmDto; |
| | | import com.whyc.dto.Real.AlmDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.PwrdevAlarmParamMapper; |
| | | import com.whyc.pojo.db_alarm.BattalarmData; |
| | | import com.whyc.pojo.db_param.BattAlmparam; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParam; |
| | | import com.whyc.pojo.db_station.PowerInf; |
| | |
| | | } |
| | | return new Response().set(1,true,"修改电源告警参数"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.whyc.constant.DevAlarmEnum; |
| | | import com.whyc.constant.PowerAlarmEnum; |
| | | import com.whyc.dto.AlarmDto; |
| | | import com.whyc.dto.Param.AlmAnalyseDto; |
| | | import com.whyc.dto.Real.AlmDto; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.PwrdevAlarmMapper; |
| | | import com.whyc.pojo.db_alarm.DevalarmData; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarm; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmParam; |
| | | import com.whyc.pojo.web_site.AlarmInspection; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public List<AlarmDto> getListByUserId(Integer userId,Integer alarmLevel) { |
| | | return mapper.getListByUserId(userId,alarmLevel); |
| | | } |
| | | |
| | | //预警分析管理-电源告警 |
| | | public Response getPwrtAlmAnalyse(AlmAnalyseDto dto) { |
| | | PageHelper .startPage(dto.getPageNum(),dto.getPageSize()); |
| | | List<PwrdevAlarm> list=mapper.getPwrtAlmAnalyse(dto); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list!=null,pageInfo,"电源告警分析"); |
| | | } |
| | | } |
| | |
| | | <if test="stationId!=null"> |
| | | and tb_station_inf.station_id=#{stationId} |
| | | </if> |
| | | <if test="stationId!=null"> |
| | | and tb_station_inf.station_id=#{stationId} |
| | | </if> |
| | | <if test="battgroupId!=null"> |
| | | and tb_battalarm_data.battgroup_id=#{battgroupId} |
| | | </if> |
| | |
| | | and tb_baojigroup_usr.uid=#{uid} |
| | | ) |
| | | </if> |
| | | |
| | | order by alm_start_time desc |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | and bu.uid = #{userId} |
| | | ) |
| | | </select> |
| | | <select id="getPwrtAlmAnalyse" resultType="com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarm"> |
| | | select tb_pwrdev_alarm.*,tb_power_inf.power_name,tb_station_inf.station_name,tb_station_inf.provice,tb_station_inf.city,tb_station_inf.country,tb_station_inf.full_name |
| | | from db_pwrdev_alarm.tb_pwrdev_alarm,db_station.tb_power_inf,db_station.tb_station_inf |
| | | <where> |
| | | tb_pwrdev_alarm.power_id=tb_power_inf.power_id |
| | | and tb_power_inf.station_id=tb_station_inf.station_id |
| | | <if test="provice!=null"> |
| | | and tb_station_inf.provice=#{provice} |
| | | </if> |
| | | <if test="city!=null"> |
| | | and tb_station_inf.city=#{city} |
| | | </if> |
| | | <if test="country!=null"> |
| | | and tb_station_inf.country=#{country} |
| | | </if> |
| | | <if test="stationId!=null"> |
| | | and tb_station_inf.station_id=#{stationId} |
| | | </if> |
| | | <if test="powerId!=null"> |
| | | and tb_pwrdev_alarm.power_id=#{powerId} |
| | | </if> |
| | | <if test="uid>100"> |
| | | and tb_pwrdev_alarm.power_id in( |
| | | select distinct power_id from db_user.tb_baojigroup_power,db_user.tb_baojigroup_usr |
| | | where tb_baojigroup_power.baoji_group_id=tb_baojigroup_usr.baoji_group_id |
| | | and tb_baojigroup_usr.uid=#{uid} |
| | | ) |
| | | </if> |
| | | </where> |
| | | order by alm_start_time desc |
| | | </select> |
| | | </mapper> |