| | |
| | | HttpHeaders headers1 = new HttpHeaders(); |
| | | headers1.setContentType(MediaType.valueOf(MediaType.APPLICATION_FORM_URLENCODED_VALUE)); |
| | | HttpEntity<Map<String, Object>> mapHttpEntity1 = new HttpEntity<>(null, headers1); |
| | | String s1 = restTemplate1.postForObject("https://caps.runde.pro/api/index.php?ctl=location&act=get_user_path_web&admin_id=8630&user_id="+helmetDevice.getUserId()+"&stime="+strTime+"&etime="+endTime+"&token="+token, mapHttpEntity1, String.class); |
| | | String s1 = restTemplate1.postForObject("https://caps.runde.pro/api/index.php?ctl=location&act=get_user_path_web&admin_id=8630&user_id="+helmetDevice.getUserId()+"&start="+strTime+"&end="+endTime+"&token="+token, mapHttpEntity1, String.class); |
| | | JSONObject jsonObject11 = JSONObject.parseObject(s1); |
| | | System.out.println("--------------------------轨迹 坐标点----------------------"); |
| | | System.out.println("--------------------------轨迹 坐标点----------------------"); |
| | |
| | | if(data.size()>0){ |
| | | for (Map<String,Object> map :data){ |
| | | String times = helmetService.helmetMotion(helmetDevice.getUserId()); |
| | | if(StringUtil.isEmpty(times) || (!StringUtil.isEmpty(times)&& Integer.valueOf(map.get(time).toString())>Integer.valueOf(times))){ |
| | | if(StringUtil.isEmpty(times) || (!StringUtil.isEmpty(times)&& Integer.valueOf(map.get("time").toString())>Integer.valueOf(times))){ |
| | | THelmetMotion tHelmetMotion = new THelmetMotion(); |
| | | tHelmetMotion.setUserId(helmetDevice.getUserId()); |
| | | tHelmetMotion.setXPoint(map.get("x_point").toString()); |