| | |
| | | package com.supersavedriving.driver.modular.system.service.impl; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | |
| | | import java.math.RoundingMode; |
| | | import java.net.InetAddress; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | } |
| | | String value1 = redisUtil.getValue("DRIVER" + s.getDriverId()); |
| | | if(s.getDriverId().compareTo(uid) != 0 && ToolUtil.isNotEmpty(value1)){ |
| | | list.add(s.getLocation().getX() + "," + s.getLocation().getY()+","+i); |
| | | list.add(s.getLocation().getX() + "," + s.getLocation().getY()+","+i+","+driver.getName()); |
| | | } |
| | | }); |
| | | } |
| | |
| | | orders.forEach(e-> blue.add(e.getStartLng()+","+e.getStartLat())); |
| | | |
| | | map.put("orderList",blue); |
| | | List<Order> ordersOne = orderService.selectList(new EntityWrapper<Order>().eq("state",301)); |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTimeInMillis(System.currentTimeMillis()); |
| | | calendar.add(Calendar.HOUR_OF_DAY, -2); |
| | | Date time = calendar.getTime(); |
| | | List<Order> ordersOne = orderService.selectList(new EntityWrapper<Order>().eq("state",301).between("createTime",time,new Date())); |
| | | |
| | | ArrayList<String> red = new ArrayList<>(); |
| | | ordersOne.forEach(e-> red.add(e.getStartLng()+","+e.getStartLat())); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加司机定位 |
| | | * @param driverPositionWarpper |