| | |
| | | |
| | | @RequestMapping(value = {"/getRealPositionsan2.do"}, method = {RequestMethod.POST, RequestMethod.GET}) |
| | | @ResponseBody |
| | | public List<tb_realpositoin> getRealPositionsan2(HttpServletRequest request) { |
| | | long timeStart = 0L; |
| | | List<TbPersonAndDepartment> realLocationList = personService.findSanWei(); |
| | | List<tb_realpositoin> finalPositionList = new ArrayList(); |
| | | Iterator var6 = realLocationList.iterator(); |
| | | while(var6.hasNext()) { |
| | | TbPersonAndDepartment node = (TbPersonAndDepartment)var6.next(); |
| | | double jiao = 0.0; |
| | | // if (this.persons.containsKey(node.getPTagid())) { |
| | | // double x1 = Double.valueOf(node.getPX()); |
| | | // double y1 = Double.valueOf(node.getPY()); |
| | | // double x2 = Double.valueOf(((String[])this.persons.get(node.getPTagid()))[0]); |
| | | // double y2 = Double.valueOf(((String[])this.persons.get(node.getPTagid()))[1]); |
| | | // double c = x1 - x2; |
| | | // double a = y1 - y2; |
| | | // if (node.getBaoliu22() != null && node.getBaoliu22() != "") { |
| | | // if (node.getBaoliu22().equals("0")) { |
| | | // jiao = Math.toDegrees(Math.atan2(c, a)); |
| | | // } else { |
| | | // String[] xy = node.getBaoliu23().split(","); |
| | | // jiao = Math.toDegrees(Math.atan2(Double.valueOf(xy[0]), Double.valueOf(xy[1]))); |
| | | // } |
| | | // |
| | | // if (String.valueOf(jiao).equals("0.0")) { |
| | | // jiao = Double.valueOf(((String[])this.persons.get(node.getPTagid()))[2]); |
| | | // } |
| | | // } |
| | | // } |
| | | String tagid = node.getPTagid(); |
| | | tb_realpositoin position = new tb_realpositoin(); |
| | | position.setTagid(tagid); |
| | | position.setPower(node.getPPower()); |
| | | position.setLife(node.getPOnline()); |
| | | position.setName(node.getPName()); |
| | | position.setSex(node.getPSex()); |
| | | position.setMinzu(node.getPMinzu()); |
| | | position.setPhone(node.getPPhone()); |
| | | position.setBumen(node.getPDepartment()); |
| | | position.setPosx(node.getPX()); |
| | | position.setPosy(node.getPY()); |
| | | position.setSos(node.getPSos()); |
| | | position.setTime(node.getPAddtiem()); |
| | | position.setFence(node.getPFence()); |
| | | position.setSousuo(node.getPSousuo()); |
| | | position.setShipin(node.getPShipin()); |
| | | position.setInkaoqing(node.getPKaoqing()); |
| | | position.setJiao(String.valueOf(jiao)); |
| | | position.setBaoliu19(node.getBaoliu19()); |
| | | position.setBaoliu22(node.getBaoliu22()); |
| | | position.setBaoliu23(node.getBaoliu23()); |
| | | position.setBaoliu24(node.getBaoliu24()); |
| | | position.setBaoliu2(node.getBaoliu2()); |
| | | position.setBaoliu3(node.getBaoliu3()); |
| | | position.setImage(node.getPImage()); |
| | | position.setBumencolor(node.getBumencolor()); |
| | | position.setBaoliu35(node.getBaoliu35()); |
| | | String[] bb = new String[]{node.getPX(), node.getPY(), String.valueOf(jiao)}; |
| | | this.persons.put(node.getPTagid(), bb); |
| | | finalPositionList.add(position); |
| | | } |
| | | public List<TbPersonAndDepartment> getRealPositionsan2(HttpServletRequest request) { |
| | | List<TbPersonAndDepartment> realLocationList = personService.findSanWeiOnline(); |
| | | return realLocationList; |
| | | } |
| | | |
| | | return finalPositionList; |
| | | |
| | | |
| | | @RequestMapping(value = {"/getRealPositionsan3.do"}, method = {RequestMethod.POST, RequestMethod.GET}) |
| | | @ResponseBody |
| | | public List<TbPersonAndDepartment> getRealPositionsan3(HttpServletRequest request) { |
| | | List<TbPersonAndDepartment> realLocationList = personService.findSanWeiOffOnline(); |
| | | return realLocationList; |
| | | } |
| | | |
| | | public String gettime(){ |