| | |
| | | Map<String,Integer> allTypemap=new HashMap<>(); |
| | | //setDefalut(map); |
| | | try { |
| | | //查询电池状态 |
| | | //查询电池状态(去除未知) |
| | | List<BattRtstate> list=battRtstateMapper.getAllBattStateInSz2(userId); |
| | | Map<String, List<BattRtstate>> ListMap = list.stream().collect(Collectors.groupingBy(BattRtstate::getStationName9)); |
| | | for (String stationName9 : ListMap.keySet()) { |
| | | Map<String, Object> battInfoMap = new HashMap<>(); |
| | | battInfoMap.put("未知",0); |
| | | //battInfoMap.put("未知",0); |
| | | battInfoMap.put("浮充",0); |
| | | battInfoMap.put("充电",0); |
| | | battInfoMap.put("放电",0); |
| | |
| | | Map<Integer,Integer> allLevelmap=new HashMap<>(); |
| | | Map<String,Integer> allTypemap=new HashMap<>(); |
| | | Map<String,List<BattalarmData>> listmap=new HashMap<>(); |
| | | Map<String,List<BattalarmData>> allListmap=new HashMap<>(); |
| | | //setDefalut(map); |
| | | try { |
| | | //查询b所有实时电池告警信息 |
| | | List<BattalarmData> list=mapper.getAllBattAlarmInSz2(userId); |
| | | allListmap.put("allList",list.stream().limit(10).collect(Collectors.toList())); |
| | | listmap.put("allList",list.stream().limit(10).collect(Collectors.toList())); |
| | | Map<String, List<BattalarmData>> ListMap = list.stream().collect(Collectors.groupingBy(BattalarmData::getStationName9)); |
| | | Map<String,Object> levelMap=new HashMap<>(); |
| | | Map<String,Object> typelMap=new HashMap<>(); |
| | |
| | | map.put("allLevel",allLevelmap); |
| | | map.put("allType",allTypemap); |
| | | map.put("list",listmap); |
| | | map.put("alllist",allListmap); |
| | | return new Response<>().setII(1,true,map,""); |
| | | } catch (Exception e) { |
| | | return new Response<>().set(1,false,""); |
| | |
| | | <select id="getAllBattStateInSz2" resultType="com.whyc.pojo.BattRtstate"> |
| | | select tb_batt_rtstate.*,StationName9 as stationName9 |
| | | from db_ram_db.tb_batt_rtstate,db_battinf.tb_battinf |
| | | where tb_batt_rtstate.BattGroupId |
| | | where tb_batt_rtstate.batt_state!=0 |
| | | and 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 |