|
|
@@ -552,11 +552,20 @@ public class OffSiteTransportationController extends BaseRESTfulController {
|
|
|
}
|
|
|
@GetMapping("/getCurrentLocation")
|
|
|
public RESTfulResult getCurrentLocation(@RequestParam("capcityNumber") String capcityNumber) throws Exception {
|
|
|
- CurrentLocationResult currentLocationResult = routeService.getCurrentLocation(capcityNumber);
|
|
|
- if(currentLocationResult!=null && currentLocationResult.getStatus() != null){
|
|
|
- currentLocationResult.setStatusStr();
|
|
|
- }
|
|
|
- return success(currentLocationResult);
|
|
|
+ CurrentLocationResult currentLocationResult;
|
|
|
+ try {
|
|
|
+ System.out.println("获取车辆"+ capcityNumber +"定位");
|
|
|
+ currentLocationResult = routeService.getCurrentLocation(capcityNumber);
|
|
|
+ if(currentLocationResult!=null && currentLocationResult.getStatus() != null){
|
|
|
+ currentLocationResult.setStatusStr();
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ currentLocationResult = new CurrentLocationResult();
|
|
|
+ currentLocationResult.setStatus(1002);
|
|
|
+ currentLocationResult.setStatusStr();
|
|
|
+ System.out.println("获取车辆"+ capcityNumber +"定位失败:"+e.getMessage());
|
|
|
+ }
|
|
|
+ return success(currentLocationResult);
|
|
|
}
|
|
|
//在途订单列表
|
|
|
@PostMapping("/transportationPerformance")
|