| | |
| | | package com.ruoyi.app.position.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ruoyi.alarm.wall.domain.ArdAlarmWall; |
| | | import com.ruoyi.alarm.wall.mapper.ArdAlarmWallMapper; |
| | | import com.ruoyi.alarm.wall.service.IArdAlarmWallService; |
| | |
| | | Map<String, List<SysUser>> result = new HashMap(); |
| | | List<SysUser> commanderList = sysUserMapper.getOnlineCommander(usersId); |
| | | result.put("commander",commanderList); |
| | | List<String> onLinePCIdList = new ArrayList(); |
| | | onLinePCIdList.addAll(ONLINE_USER_SESSIONS.keySet()); |
| | | List<SysUser> pcList = sysUserMapper.getOnlinePC(usersId,onLinePCIdList); |
| | | result.put("pc",pcList); |
| | | try{ |
| | | List<String> onLinePCIdList = new ArrayList(); |
| | | //onLinePCIdList.addAll(ONLINE_USER_SESSIONS.keySet()); |
| | | for(String id : ONLINE_USER_SESSIONS.keySet()){ |
| | | onLinePCIdList.add(id.split("_")[0]); |
| | | } |
| | | List<SysUser> pcList = sysUserMapper.getOnlinePC(usersId,onLinePCIdList); |
| | | result.put("pc",pcList); |
| | | }catch(Exception e){ |
| | | result.put("pc",new ArrayList()); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public void sendCheckCommandersPosition(String usersId,Map<String, Object> para) { |
| | | String reason = (String) para.get("reason"); |
| | | List<String> usersIdList = (List<String>) para.get("usersIdList"); |
| | | for(String commanderId : usersIdList){ |
| | | //设置key为checkCommanderPosition_指挥端主键_单兵端主键 |
| | | String key = "checkCommanderPosition_" + commanderId + "_" + usersId; |
| | | Map<String,Object> value = new HashMap(); |
| | | value.put("reason",reason); |
| | | value.put("state","0"); |
| | | value.put("begin",""); |
| | | redisCache.setCacheObject(key, JSON.toJSONString(value)); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void sendCheckSYCarsPosition(String usersId, Map<String, Object> para) { |
| | | String reason = (String) para.get("reason"); |
| | | List<String> usersIdList = (List<String>) para.get("usersIdList"); |
| | | for(String commanderId : usersIdList){ |
| | | //设置key为checkCommanderPosition_指挥端主键/PC端主键_单兵端主键 |
| | | String key = "checkSYCarsPosition_" + commanderId + "_" + usersId; |
| | | Map<String,Object> value = new HashMap(); |
| | | value.put("reason",reason); |
| | | value.put("state","0"); |
| | | value.put("begin",""); |
| | | redisCache.setCacheObject(key, JSON.toJSONString(value)); |
| | | } |
| | | } |
| | | } |