| | |
| | | Map<String,Map<String,Object>> deptMap = PositionContainer.getDeptPositionMap().get(deptId); |
| | | if(deptMap == null){ |
| | | deptMap = new HashMap(); |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap); |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | }else{ |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap); |
| | | } |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap);//首次加入容器,再次去重 |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | }else{ |
| | | }else{//其他部门 |
| | | //加入本部门容器 |
| | | String deptId = String.valueOf(gpsMap.get("deptId")); |
| | | Map<String,Map<String,Object>> deptMap = PositionContainer.getDeptPositionMap().get(deptId); |
| | | if(deptMap == null){ |
| | | deptMap = new HashMap(); |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap); |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | }else{ |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap); |
| | | } |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap);//首次加入容器,再次去重 |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | //加入父级部门容器 |
| | | for(int i = 1;i <= ancestorsArray.length - 1;i++){ |
| | | String deptIdp = String.valueOf(gpsMap.get(ancestorsArray[i])); |
| | | String deptIdp = ancestorsArray[i]; |
| | | Map<String,Map<String,Object>> deptMapp = PositionContainer.getDeptPositionMap().get(deptIdp); |
| | | if(deptMapp == null){ |
| | | deptMapp = new HashMap(); |
| | | deptMapp.put((String)gpsMap.get("carId"),gpsMap); |
| | | PositionContainer.getDeptPositionMap().put(deptIdp,deptMapp); |
| | | }else{ |
| | | deptMapp.put((String)gpsMap.get("carId"),gpsMap); |
| | | } |
| | | deptMapp.put((String)gpsMap.get("carId"),gpsMap);//首次加入容器,再次去重 |
| | | PositionContainer.getDeptPositionMap().put(deptIdp,deptMap); |
| | | } |
| | | } |
| | | } |
| | |
| | | public void sendMassage() { |
| | | try { |
| | | PushClientImplPosition client = new PushClientImplPosition(); |
| | | client.setLog(false);//是否打印明文 |
| | | client.setLog(true);//是否打印明文 |
| | | client.setHost(this.ip);//服务器IP |
| | | client.setPort(10100);//服务器端口 |
| | | client.setUserName(this.userId);//系统用户名 |