| | |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.MathContext; |
| | |
| | | */ |
| | | @Component |
| | | public class PushUtil { |
| | | |
| | | @Autowired |
| | | private RestTemplate internalRestTemplate; |
| | | |
| | | @Autowired |
| | | private IOrderTaxiService orderTaxiService; |
| | |
| | | |
| | | private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器 |
| | | |
| | | private final String socket_uri = "http://192.168.110.111:6000"; |
| | | @Value("${qyt.socket_uri}") |
| | | private String socket_uri; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // qyt 改派重新推单 |
| | |
| | | return; |
| | | } |
| | | //计算预计距离和剩余时间 |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(driverId)); |
| | | String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(driverId)); |
| | | if(null == value || "".equals(value)){ |
| | | return; |
| | | } |