| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | |
| | | import com.stylefeng.guns.modular.system.service.IOrderPositionService; |
| | | import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; |
| | | import com.stylefeng.guns.modular.system.util.GeodesyUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderStatusWarpper; |
| | | 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.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | |
| | | |
| | | @Resource |
| | | private PushAuxiliaryMapper pushAuxiliaryMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @Autowired |
| | | private IOrderTaxiService orderTaxiService; |
| | |
| | | */ |
| | | @Override |
| | | public ResultUtil positionSocket(OrderPosition orderPosition, Integer uid) throws Exception { |
| | | redisUtil.setStrValue(String.valueOf(uid), orderPosition.getLon() + "," + orderPosition.getLat()); |
| | | redisTemplate.opsForValue().set(String.valueOf(uid), orderPosition.getLon() + "," + orderPosition.getLat()); |
| | | if(ToolUtil.isNotEmpty(orderPosition.getOrderId()) && ToolUtil.isNotEmpty(orderPosition.getOrderType())){ |
| | | orderPositionService.saveData(orderPosition); |
| | | } |
| | |
| | | } |
| | | |
| | | //查看是否有可接单的数据 |
| | | String value = redisUtil.getValue("DRIVER" + String.valueOf(uid)); |
| | | String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(uid)); |
| | | if(ToolUtil.isNotEmpty(value)){ |
| | | String[] split = value.split(","); |
| | | List<OrderStatusWarpper> list1 = this.searchOrder(split[0], split[1], uid); |