| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.scheduling.domian.SchedulingParam; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.utils.gis.GisUtil; |
| | | import com.ruoyi.utils.gis.Point; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.utils.websocket.util.WebSocketUtils.ONLINE_USER_SESSIONS; |
| | | |
| | | |
| | | /** |
| | |
| | | ArdWallMapper ardWallMapper; |
| | | @Resource |
| | | IArdAlarmWallService ardAlarmWallService; |
| | | @Resource |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | Map<String, String> firstAlarmMap = new HashMap<>();//首次报警缓存key:用户id_围栏id value: 报警id |
| | | /** |
| | |
| | | } |
| | | return ardAlarmWalls; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<SysUser>> getOnlinePCOrCommander(String usersId) { |
| | | Map<String, List<SysUser>> result = new HashMap(); |
| | | List<SysUser> commanderList = sysUserMapper.getOnlineCommander(usersId); |
| | | result.put("commander",commanderList); |
| | | 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; |
| | | } |
| | | } |