| | |
| | | package com.fgkj.mapper.impl; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.fgkj.dto.*; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | public interface Batt_rtstateMapper{ |
| | | |
| | | //实时监测 |
| | | public List serchByCondition(Object obj); |
| | | public List<Batt_rtdata> serchByCondition(Batt_rtstate obj); |
| | | |
| | | //测试数据——实时查询中左下角的充放电统计(旧) |
| | | public List serchDisOrChargr(); |
| | | |
| | | |
| | | // @Select(" SELECT distinct db_ram_db.tb_batt_rtstate.battgroupid " |
| | | // + ",batt_test_type,stationid,fbsdeviceid,stationName,stationName1,stationName2,stationName3,stationName4,stationName5 " + |
| | | // " from db_ram_db.tb_batt_rtstate,db_battinf.tb_battinf ") |
| | | //测试数据——实时查询中左下角的充放电统计(用户管理的机房) |
| | | public List serchDisOrChargrNew(Object obj); |
| | | @Select(" SELECT distinct db_ram_db.tb_batt_rtstate.battgroupid " |
| | | + ",batt_test_type,stationid,fbsdeviceid,stationName,stationName1,stationName2,stationName3,stationName4,stationName5 " + |
| | | " from db_ram_db.tb_batt_rtstate,db_battinf.tb_battinf " + |
| | | " where batt_test_type IN(2,3) " + |
| | | " and db_ram_db.tb_batt_rtstate.battgroupid=db_battinf.tb_battinf.BattGroupId " + |
| | | " and db_ram_db.tb_batt_rtstate.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} ) " + |
| | | " ORDER BY db_ram_db.tb_batt_rtstate.battgroupid") |
| | | public List<Batt_rtstate> serchDisOrChargrNew(User_inf obj); |
| | | |
| | | //根据电池组id查询该电池组(电池续航能力) |
| | | public List serchByInfo(Object obj); |
| | | public List<Batt_State> serchByInfo(BattInf obj); |
| | | |
| | | //查询单体编号实时数据(电池单体实时信息) |
| | | public List serchMons(Object obj); |
| | | public List<Batt_State> serchMons(BattInf obj); |
| | | |
| | | //查询电池组的实时状态(电池状态查询<放电,充电>) |
| | | /* |
| | |
| | | return list; |
| | | |
| | | }*/ |
| | | public List serchBattStateRate(Object obj); |
| | | @Select("SELECT DISTINCT tb_batt_rtstate.BattGroupId,batt_state, " + |
| | | "COUNT(tb_batt_rtstate.BattGroupId) as batt_count " + |
| | | "FROM db_ram_db.tb_batt_rtstate " + |
| | | "GROUP BY tb_batt_rtstate.BattGroupId,batt_state " + |
| | | "having db_ram_db.tb_batt_rtstate.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} ) " + |
| | | "ORDER BY batt_state") |
| | | public List<Batt_rtstate> serchBattStateRate(User_inf obj); |
| | | |
| | | //电池组实时情况+实时电池续航能力查询 |
| | | /*public List serchBattLife(Object obj) { |
| | |
| | | return list; |
| | | }*/ |
| | | //电池组实时情况+实时电池续航能力查询 |
| | | public List serchBattLife(Object obj); |
| | | public List serchBattLife(Batt_Maint_Dealarm obj); |
| | | |
| | | //查询出当前存在内存中最大的电池组id(很重要**********) |
| | | public int searchMaxBattgroupId(); |
| | | |
| | | //实时监测<-------跨域-----------> |
| | | public List serchByCondition_ky(Object obj); |
| | | @Select("select num,BattGroupId,batt_count,rec_datetime,group_vol,online_vol,group_curr,batt_state," + |
| | | "batt_test_type,batt_test_starttime,batt_test_recordtime,batt_test_tlong," + |
| | | "batt_test_cap,batt_real_cap,batt_rest_cap,batt_rest_power1_time,batt_rest_power2_time" + |
| | | " from db_ram_db.tb_batt_rtstate where BattGroupId=#{battGroupId}") |
| | | public List<Batt_rtstate> serchByCondition_ky(Batt_rtstate obj); |
| | | |
| | | |
| | | /*public static void main(String[] args) { |
| | | User_inf uinf=new User_inf(); |
| | | uinf.setUId(1001); |
| | | uinf.setuId(1001); |
| | | Batt_rtstateDAOImpl bimpl=new Batt_rtstateDAOImpl(); |
| | | *//*List<Batt_rtstate> list=bimpl.serchDisOrChargrNew(uinf); |
| | | for (Batt_rtstate b : list) { |