zhibing.pu
2024-05-28 9317fed1cea5372d9997a8273c07f041db94f99c
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -11,10 +11,7 @@
import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService;
import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService;
import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar;
import com.stylefeng.guns.modular.system.dao.CarMapper;
import com.stylefeng.guns.modular.system.dao.RegionMapper;
import com.stylefeng.guns.modular.system.dao.SystemPriceMapper;
import com.stylefeng.guns.modular.system.dao.UserInfoMapper;
import com.stylefeng.guns.modular.system.dao.*;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.service.*;
import com.stylefeng.guns.modular.system.util.*;
@@ -120,6 +117,12 @@
    @Autowired
    private FleetEngineUtil fleetEngineUtil;
    @Resource
    private CarModelMapper carModelMapper;
    @Autowired
    private ICarService carService;
@@ -188,8 +191,20 @@
                    , new Date(packageTimeoutReminderInterval), packageTimeoutReminderInterval, -1);
        }
    
        String trip = fleetEngineUtil.getTrip(1, orderLogistics.getId());
        if(ToolUtil.isEmpty(trip)){
            String vehicles = fleetEngineUtil.getVehicles(orderLogistics.getCarId());
            if(ToolUtil.isEmpty(vehicles)){
                Car car = carService.selectById(orderLogistics.getCarId());
                CarModel carModel = carModelMapper.selectById(car.getCarModelId());
                fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getId());
            }
            fleetEngineUtil.createTrip(orderLogistics.getCarId(), 1, 4, orderLogistics.getId(),
                    orderLogistics.getStartLat().toString(), orderLogistics.getStartLon().toString(),  orderLogistics.getEndLat().toString(), orderLogistics.getEndLon().toString());
        }else{
        //开始修改行程数据
        fleetEngineUtil.updateTrip(null, driver.getCarId(), null, 4, orderLogistics.getId(), null, null, null, null);
        }
        
        //推送相关代码------------------start----------------
        new Thread(new Runnable() {