Преглед на файлове

司机修改当前站点同时修改经纬度

zhengqiang преди 4 години
родител
ревизия
3a33077ae0
променени са 1 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 7 6
      web/src/main/java/com/jpsoft/bus/modules/driver/controller/DriverApiController.java

+ 7 - 6
web/src/main/java/com/jpsoft/bus/modules/driver/controller/DriverApiController.java

@@ -1075,18 +1075,19 @@ public class DriverApiController {
             ShiftInfo shiftInfo = shiftInfoList.get(0);
             ShiftInfo shiftInfo = shiftInfoList.get(0);
             StationInfo currentStation = stationInfoService.get(currentStationId);
             StationInfo currentStation = stationInfoService.get(currentStationId);
 
 
-            shiftInfo.setCurrentStationId(currentStationId);
-            shiftInfo.setUpdateTime(new Date());
-            shiftInfo.setUpdateBy(subject);
-
-            shiftInfoService.update(shiftInfo);
-
+            //改gps后,会自动修改当前站点,只能往后改
             if(currentStation.getLongitude()!=null && currentStation.getLatitude()!=null) {
             if(currentStation.getLongitude()!=null && currentStation.getLatitude()!=null) {
                 gpsDataCallback.receive(vehicleInfo.getGpsDeviceNo(),
                 gpsDataCallback.receive(vehicleInfo.getGpsDeviceNo(),
                         String.valueOf(currentStation.getLongitude()),
                         String.valueOf(currentStation.getLongitude()),
                         String.valueOf(currentStation.getLatitude()));
                         String.valueOf(currentStation.getLatitude()));
             }
             }
 
 
+            shiftInfo.setCurrentStationId(currentStationId);
+            shiftInfo.setUpdateTime(new Date());
+            shiftInfo.setUpdateBy(subject);
+
+            shiftInfoService.update(shiftInfo);
+
             //todo 填写具体代码
             //todo 填写具体代码
             messageResult.setData(currentStationId);
             messageResult.setData(currentStationId);
             messageResult.setResult(true);
             messageResult.setResult(true);