瀏覽代碼

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

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);
             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) {
                 gpsDataCallback.receive(vehicleInfo.getGpsDeviceNo(),
                         String.valueOf(currentStation.getLongitude()),
                         String.valueOf(currentStation.getLatitude()));
             }
 
+            shiftInfo.setCurrentStationId(currentStationId);
+            shiftInfo.setUpdateTime(new Date());
+            shiftInfo.setUpdateBy(subject);
+
+            shiftInfoService.update(shiftInfo);
+
             //todo 填写具体代码
             messageResult.setData(currentStationId);
             messageResult.setResult(true);