wanglizhong
2025-05-04 e0a80a06b5d782a2114642bd655b50def705de5a
fix:CMS车辆定位
2个文件已修改
10 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/VehicleGpsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CmsVehicleSyncTask.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/VehicleGpsController.java
@@ -1,6 +1,7 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -11,6 +12,8 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -29,6 +32,7 @@
    @Autowired
    private IVehicleGpsService vehicleGpsService;
    @Anonymous
    /**
     * 查询车辆GPS坐标列表
     */
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CmsVehicleSyncTask.java
@@ -138,12 +138,16 @@
                        if(f==null){
                            continue;
                        }
                    if(vehicle.getJd()==null||vehicle.getWd()==null){
                        continue;
                    }
                    // 创建GPS记录
                    VehicleGps gps = new VehicleGps();
                    gps.setVehicleId(f.getVehicleId());
                    gps.setDeviceId(null);
                    gps.setLongitude(vehicle.getJd()/1000000);
                    gps.setLatitude(vehicle.getWd()/1000000);
                    gps.setSpeed(defaultZero);
                    gps.setVehicleNo(plateNo);