|
@@ -1081,7 +1081,7 @@ public class DriverApiController {
|
|
|
|
|
|
@PostMapping("updateCurrentStation")
|
|
@PostMapping("updateCurrentStation")
|
|
@ApiOperation(value="更新当前站点")
|
|
@ApiOperation(value="更新当前站点")
|
|
- public MessageResult<String> updateCurrentStation(String currentStationId,@RequestAttribute String subject){
|
|
|
|
|
|
+ public MessageResult<String> updateCurrentStation(String currentStationId,@RequestAttribute String subject,HttpServletRequest request){
|
|
MessageResult<String> messageResult = new MessageResult<>();
|
|
MessageResult<String> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -1098,6 +1098,17 @@ public class DriverApiController {
|
|
ShiftInfo shiftInfo = shiftInfoList.get(0);
|
|
ShiftInfo shiftInfo = shiftInfoList.get(0);
|
|
StationInfo currentStation = stationInfoService.get(currentStationId);
|
|
StationInfo currentStation = stationInfoService.get(currentStationId);
|
|
|
|
|
|
|
|
+ //记录当前站点的校正记录,以便用来记录站点定位
|
|
|
|
+ if(currentStation!=null){
|
|
|
|
+ SysLog sysLog = new SysLog();
|
|
|
|
+ sysLog.setPointcut("站点校正");
|
|
|
|
+ sysLog.setData("车牌号:" + vehicleInfo.getLicensePlateNumber() + ",经纬度:" + vehicleInfo.getLongitude() + "." + vehicleInfo.getLatitude());
|
|
|
|
+ sysLog.setRemark("当前站点:" + currentStation.getName() + ",id=" + currentStationId);
|
|
|
|
+ sysLog.setRemoteIp(HttpUtil.getIpAddress(request));
|
|
|
|
+ sysLog.setCreateTime(new Date());
|
|
|
|
+ logService.insert(sysLog);
|
|
|
|
+ }
|
|
|
|
+
|
|
//改gps后,会自动修改当前站点,只能往后改
|
|
//改gps后,会自动修改当前站点,只能往后改
|
|
if(currentStation.getLongitude()!=null && currentStation.getLatitude()!=null) {
|
|
if(currentStation.getLongitude()!=null && currentStation.getLatitude()!=null) {
|
|
gpsDataCallback.receive(vehicleInfo.getGpsDeviceNo(),
|
|
gpsDataCallback.receive(vehicleInfo.getGpsDeviceNo(),
|