zhibing.pu
2024-08-27 7ae343fc7761a3b5535716ff07a82e5d571d60e8
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -245,9 +245,11 @@
        Integer oldState = 0;
        Long startServiceTime = null;
        Double servedMileage = null;
        String tripId = "";
        switch (orderType){
            case 1:
                OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId);
                tripId = redisUtil.getValue("trip" + orderPrivateCar.getUserId());
                if(orderPrivateCar == null){
                    this.removeTask(orderId, orderType);
                }else{
@@ -262,6 +264,7 @@
                break;
            case 2:
                OrderTaxi orderTaxi = orderTaxiService.selectById(orderId);
                tripId = redisUtil.getValue("trip" + orderTaxi.getUserId());
                if(orderTaxi == null){
                    this.removeTask(orderId, orderType);
                }else{
@@ -276,6 +279,7 @@
                break;
            case 3:
                OrderCrossCity orderCrossCity = orderCrossCityService.selectById(orderId);
                tripId = redisUtil.getValue("trip" + orderCrossCity.getUserId());
                if(orderCrossCity == null){
                    this.removeTask(orderId, orderType);
                }else{
@@ -289,6 +293,7 @@
                break;
            case 4:
                OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId);
                tripId = redisUtil.getValue("trip" + orderLogistics.getUserId());
                if(orderLogistics == null){
                    this.removeTask(orderId, orderType);
                }else{
@@ -302,6 +307,7 @@
                break;
            case 5:
                OrderLogistics orderLogistics1 = orderLogisticsService.selectById(orderId);
                tripId = redisUtil.getValue("trip" + orderLogistics1.getUserId());
                if(orderLogistics1 == null){
                    this.removeTask(orderId, orderType);
                }else{
@@ -340,7 +346,7 @@
            if(ToolUtil.isNotEmpty(value) && ToolUtil.isNotEmpty(startLonLat)){
                String[] split = value.split(",");
                String[] split1 = startLonLat.split(",");
                DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]));
                DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]), tripId);
                if(null == distancematrix){
                    System.err.println("地图获取距离出错");
                }else{
@@ -369,7 +375,7 @@
            if(ToolUtil.isNotEmpty(value) && ToolUtil.isNotEmpty(endLonLat)){
                String[] split = value.split(",");
                String[] split1 = endLonLat.split(",");
                DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]));
                DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]), tripId);
                if(null == distancematrix){
                    System.err.println("地图获取距离出错");
                }else{