luodangjia
2024-07-24 3b56d93c50c2cde9738c8081a08cb657cbe6f087
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
@@ -8,6 +8,7 @@
import com.stylefeng.guns.modular.system.model.TDriver;
import com.stylefeng.guns.modular.system.model.TOrderPrivateCar;
import com.stylefeng.guns.modular.system.service.ITDriverService;
import com.stylefeng.guns.modular.system.util.GoogleMap.FleetEngineUtil;
import com.stylefeng.guns.modular.system.util.HttpRequestUtil;
import com.stylefeng.guns.modular.system.util.PushURL;
import org.springframework.stereotype.Controller;
@@ -38,6 +39,9 @@
    @Autowired
    private ITOrderLogisticsService tOrderLogisticsService;
    @Autowired
    private FleetEngineUtil fleetEngineUtil;
    /**
     * 跳转到小件物流订单首页
@@ -105,13 +109,23 @@
        TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId);
        //修改之前司机状态 -- 空闲
        TDriver driver = itDriverService.selectById(tOrderLogistics.getDriverId());
        driver.setState(2);
        itDriverService.updateById(driver);
        if(null != tOrderLogistics.getDriverId()){
            TDriver driver = itDriverService.selectById(tOrderLogistics.getDriverId());
            driver.setState(2);
            itDriverService.updateById(driver);
        }
        tOrderLogistics.setState(10);
        tOrderLogisticsService.updateById(tOrderLogistics);
        //修改行程信息
        try {
            fleetEngineUtil.updateTrip("CANCELED", null, null, tOrderLogistics.getTripId(), null, null, null, null);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        //增加推送
        Map<String,String> map = new HashMap<>();
        map.put("id", tOrderLogistics.getId().toString());