| | |
| | | package com.fgkj.mapper.impl; |
| | | |
| | | import com.fgkj.dto.BattInf; |
| | | import com.fgkj.dto.BattMap_information; |
| | | import com.fgkj.dto.Battalarm_data; |
| | | import com.fgkj.dto.*; |
| | | import com.fgkj.mapper.AlarmDaoFactory; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | // 3.1电池告警实时查询(确认告警) |
| | | public boolean update(Object obj); |
| | | |
| | | |
| | | // 3.1电池告警实时查询(确认告警)(多条记录) |
| | | public String updatePro(Object obj) ; |
| | | @Update("update db_alarm.tb_battalarm_data set alm_is_confirmed=#{alm_is_confirmed},alm_confirmed_time=#{alm_confirmed_time} where num=#{num}") |
| | | public int updatePro(Battalarm_data obj) ; |
| | | |
| | | //3.1/3.2电池告警查询(删除记录) |
| | | public boolean del(Object obj); |
| | | |
| | | //3.1/3.2电池告警查询(删除记录)<多条记录删除> |
| | | public String delPro(Object obj); |
| | | @Delete("delete from db_alarm.tb_battalarm_data where num=#{num}") |
| | | public int delPro(Battalarm_data obj); |
| | | |
| | | //当进程重启时,将实时数据修改为历史记录 |
| | | public boolean NowToHistory(); |
| | |
| | | * 当前告警 num: 选中为0 未选中100 |
| | | * 历史告警 monnum:选中为1 未选中100 |
| | | */ |
| | | public List serchByCondition(Object obj); |
| | | public List serchByCondition(Batt_Maint_Dealarm obj); |
| | | |
| | | // 3.2电池告警 |
| | | /* |
| | |
| | | * 全都不选:不选200 |
| | | |
| | | */ |
| | | public List serchByInfo(Object obj); |
| | | public List serchByInfo(Batt_Maint_Dealarm obj); |
| | | |
| | | // 3.2电池告警 |
| | | /* |
| | |
| | | }); |
| | | return list; |
| | | }*/ |
| | | public List serchAlm(Object obj); |
| | | @Select("select count(num) as number,alm_id from db_alarm.tb_battalarm_data " + |
| | | "where alm_cleared_type=0 and tb_battalarm_data.BattGroupId in (select distinct db_battinf.tb_battinf.battgroupid " + |
| | | " from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " + |
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + |
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + |
| | | " and db_user.tb_user_inf.uid=#{uinf.uId} and db_battinf.tb_battinf.stationname like '%${binf.stationName}%') " + |
| | | " GROUP BY (alm_id) ") |
| | | public List<Battalarm_data> serchAlm(Batt_Maint_Dealarm obj); |
| | | |
| | | //0.10实时告警记录总数查询 |
| | | /*public List serchRealTime(){ |
| | |
| | | }); |
| | | return list; |
| | | }*/ |
| | | public List serchRealTime(Object obj); |
| | | |
| | | @Select("select count(num) as num " + |
| | | "from db_alarm.tb_battalarm_data " + |
| | | "where " + |
| | | "alm_cleared_type=0 " + |
| | | "and alm_id not in('${@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapAlarm}','${@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapChange}','${@com.fgkj.mapper.AlarmDaoFactory@Alarm_res_Conn}','${@com.fgkj.mapper.AlarmDaoFactory@ALM_TYPE_DisChargeMonVol_ID}')"+ |
| | | "and db_alarm.tb_battalarm_data.BattGroupId in (select distinct db_battinf.tb_battinf.battgroupid " + |
| | | " from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " + |
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + |
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + |
| | | " and db_user.tb_user_inf.uid=#{uId})") |
| | | public List<Battalarm_data> serchRealTime(User_inf obj); |
| | | |
| | | // 根据battgroupId和阈值查数据 |
| | | public List serchByBatt(Object obj); |
| | |
| | | |
| | | //根据num取消告警 |
| | | public boolean cancelalarm(Object obj); |
| | | |
| | | // "update db_alarm.tb_battalarm_data set record_id="+adata.getRecord_Id()+",alm_end_time='"+DAOHelper.sdf.format(adata.getAlm_end_time())+"',alm_cleared_type="+adata.getAlm_cleared_type()+" where num="+adata.getNum() |
| | | //根据num取消告警(多条记录) |
| | | public String cancelalarmPro(Object obj); |
| | | @Update("update db_alarm.tb_battalarm_data set record_id=#{record_Id},alm_end_time=#{alm_end_time} ,alm_cleared_type=#{alm_cleared_type} where num=#{num}") |
| | | public int cancelalarmPro(Battalarm_data obj); |
| | | |
| | | //7.2增加容量告警的数据 |
| | | public boolean addPro(Object obj); |
| | |
| | | }); |
| | | return list; |
| | | }*/ |
| | | public List serchGood(Object obj); |
| | | |
| | | @Select("SELECT battgroupid,count(DISTINCT MonNum) as nums,alm_id " + |
| | | " FROM db_alarm.tb_battalarm_data " + |
| | | " where BattGroupId in(select distinct db_battinf.tb_battinf.battgroupid " + |
| | | " from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " + |
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + |
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + |
| | | " and db_user.tb_user_inf.uid=#{uId}) " + |
| | | " and alm_id in('&{@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapAlarm}','${@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapChange}') " + |
| | | " and alm_cleared_type=0 " + |
| | | " GROUP BY battgroupid,alm_id ") |
| | | public List<Alarm_param> serchGood(User_inf obj); |
| | | |
| | | //项目下方的滚动,查询最新电池告警(旧版本) |
| | | public List serchTopAlmInBatt(); |
| | |
| | | }); |
| | | return list; |
| | | }*/ |
| | | public List serchTopBattTen(Object obj); |
| | | |
| | | @Select("select distinct db_alarm.tb_battalarm_data.battgroupid,db_battinf.tb_battinf.stationname,db_battinf.tb_battinf.stationid,db_alarm.tb_battalarm_data.monnum,alm_id,alm_start_time,alm_signal_id " + |
| | | " from db_alarm.tb_battalarm_data,db_battinf.tb_battinf " + |
| | | " where alm_cleared_type=0 " + |
| | | " and db_alarm.tb_battalarm_data.battgroupid=db_battinf.tb_battinf.battgroupid " + |
| | | " and db_alarm.tb_battalarm_data.BattGroupId in (select distinct db_battinf.tb_battinf.battgroupid " + |
| | | " from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " + |
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " + |
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " + |
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " + |
| | | " and db_user.tb_user_inf.uid=#{uId} )" + |
| | | " and alm_id not in('${@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapAlarm}','${@com.fgkj.mapper.AlarmDaoFactory@Alarm_CapChange}','%{@com.fgkj.mapper.AlarmDaoFactory@Alarm_res_Conn}','${@com.fgkj.mapper.AlarmDaoFactory@ALM_TYPE_DisChargeMonVol_ID}')"+ |
| | | " order by alm_start_time desc " + |
| | | " limit 0,5") |
| | | public List<Battalarm_data> serchTopBattTen(User_inf obj); |
| | | |
| | | //点击项目下方的滚动,查询该条告警的实时信息 |
| | | public List serchBatt_alarm(Object obj); |
| | | @Select("select distinct db_alarm.tb_battalarm_data.battgroupid,db_battinf.tb_battinf.stationname,db_battinf.tb_battinf.stationid,db_alarm.tb_battalarm_data.monnum,alm_id,alm_start_time,alm_signal_id,alm_cleared_type " + |
| | | " from db_alarm.tb_battalarm_data,db_battinf.tb_battinf " + |
| | | " where db_battinf.tb_battinf.battgroupid=db_alarm.tb_battalarm_data.battgroupid " + |
| | | " and db_alarm.tb_battalarm_data.battgroupid=#{battGroupId} and db_alarm.tb_battalarm_data.monnum=#{monNum} and alm_id=#{alm_id} and alm_start_time=#{alm_start_time} ") |
| | | public List<Battalarm_data> serchBatt_alarm(Battalarm_data obj); |
| | | |
| | | // 3.1电池告警实时查询<***********跨域专用**************> |
| | | public List serchByCondition_ky(Object obj); |
| | | public List serchByCondition_ky(BattInf obj); |
| | | |
| | | //查询电池组最近一次告警等级 |
| | | @Select("select alm_level from db_alarm.tb_battalarm_data where battgroupid=#{battGroupId} order by alm_start_time desc limit 1") |