Pu Zhibing
9 天以前 6209aee60fd4a4a0253a701659c411e4dc35063b
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -15,7 +15,6 @@
import com.stylefeng.guns.modular.system.dao.UserInfoMapper;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.*;
import com.stylefeng.guns.modular.system.service.impl.OpenCityServiceImpl;
import com.stylefeng.guns.modular.system.util.*;
import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.CreateTravelItineraryRequest;
@@ -107,8 +106,11 @@
    
    @Resource
    private RedisTemplate<String, Object> redisTemplate;
    @Autowired
    private OpenCityServiceImpl openCityServiceImpl;
    @Resource
    private IOpenCityService openCityService;
    /**
@@ -375,9 +377,9 @@
    private Integer isPromotion(Integer userId){
        UserInfo userInfo = userInfoMapper.selectById(userId);
        if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){
        if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()>System.currentTimeMillis()){
            String registAreaCode = userInfo.getRegistAreaCode();
            TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 1 + ", bizType) limit 1"));
            TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("state",1).eq("districtCode", registAreaCode).last(" and between now() startTime and endTime AND FIND_IN_SET(" + 1 + ", bizType) limit 1"));
            if(tDriverPromotionActivity!=null){
                return userInfo.getBindDriverId();
            }
@@ -406,7 +408,7 @@
            if(order!=null){
                orders.addAll(order);
            }
            String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
            String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
            order = this.baseMapper.queryOrderInfo(orderId,5,value.split(",")[0],value.split(",")[1]);
            if(order!=null){
                orders.addAll(order);
@@ -421,7 +423,7 @@
            if(order!=null){
                orders.addAll(order);
            }
            String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
            String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
            order = this.baseMapper.queryOrderInfo(orderPrivateCar.getPid(),5,value.split(",")[0],value.split(",")[1]);
            if(order!=null){
                orders.addAll(order);
@@ -455,7 +457,7 @@
            orders.addAll(order);
        }
        OrderPrivateCar orderPrivateCar = this.baseMapper.selectById(orderId);
        String value = redisUtil.getValue("DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
        String value = redisUtil.getValue("dache:DRIVER" + String.valueOf(orderPrivateCar.getDriverId()));
        order = this.baseMapper.queryOrderInfo(orderId,5,value.split(",")[0],value.split(",")[1]);
        if(order!=null){
            orders.addAll(order);
@@ -475,7 +477,9 @@
        map.put("emergencyCall",  "110");
        map.put("orders", JSON.toJSONString(orders));
        return map;*/
        Map<String,Object> map = orderPrivateCarMapper.queryOrderInfo2(orderId);
        OrderPrivateCar orderPrivateCar1 = orderPrivateCarMapper.selectById(orderId);
        OpenCity openCity = openCityService.openCity1(orderPrivateCar1.getStartLon().toString(), orderPrivateCar1.getStartLat().toString());
        Map<String,Object> map = orderPrivateCarMapper.queryOrderInfo2(orderId, openCity.getId());
        OrderPrivateCar orderPrivateCar = this.baseMapper.selectById(orderId);
        Integer canOperation=1;
        if(orderPrivateCar.getState()<5){