| | |
| | | if(m.getLongitude()!=0){ |
| | | bike.setLongitude(new BigDecimal(m.getLongitude()).divide(new BigDecimal(1000000),8,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | updateMapLocation(bike); |
| | | bike.setHeartDate(DateUtil.getDateFromLocalDateTime(m.getDeviceTime())); |
| | | if(m.getAttributes()!=null ){ |
| | | Battery battery= (Battery) m.getAttributes().get(AttributeKey.Battery); |
| | |
| | | } |
| | | } |
| | | |
| | | private void updateMapLocation(Bikes bike) { |
| | | if(bike.getLatitude() == null || bike.getLongitude() == null){ |
| | | return; |
| | | } |
| | | PositionUtil.AMap aMap =PositionUtil.transform(bike.getLongitude().doubleValue() ,bike.getLatitude().doubleValue()); |
| | | bike.setLatitude(new BigDecimal(aMap.getLatitude())); |
| | | bike.setLongitude(new BigDecimal(aMap.getLongitude())); |
| | | } |
| | | |
| | | public ConcurrentMap<String,Integer> cacheOpenLock = new ConcurrentReferenceHashMap<>(); |
| | | |
| | | |