Pu Zhibing
2024-12-12 822ed15aacf175cba141c3a423e17f044d569768
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
@@ -7,6 +7,7 @@
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.dao.OrderCancelMapper;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.ITCarService;
import com.stylefeng.guns.modular.system.service.ITDriverService;
import com.stylefeng.guns.modular.system.service.ITUserService;
import com.stylefeng.guns.modular.system.util.GoogleMap.FleetEngineUtil;
@@ -50,6 +51,12 @@
    
    @Resource
    private OrderCancelMapper orderCancelMapper;
    @Resource
    private ITCarService carService;
    /**
     * 跳转到小件物流订单首页
@@ -139,17 +146,19 @@
        orderCancelMapper.insert(orderCancel);
        
        //修改行程信息
        boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
        TCar car = carService.selectById(tOrderLogistics.getCarId());
        //修改行程信息
        boolean updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null);
        if(!updateTrip){
            for (int i = 0; i < 5; i++) {
                updateTrip = fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
                updateTrip = fleetEngineUtil.updateTrip("CANCELED", (null != car ? car.getVehicleId() : null), null, tOrderLogistics.getTripId(), null, null, null, null);
                if(updateTrip){
                    break;
                }
                try {
                    Thread.sleep(3000L);
                }catch (Exception e){
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        }