liyg 2 år sedan
förälder
incheckning
8dc67ace93

+ 3 - 1
src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java

@@ -529,7 +529,9 @@ public class OffSiteTransportationController extends BaseRESTfulController {
     @GetMapping("/getCurrentLocation")
     public RESTfulResult getCurrentLocation(@RequestParam("capcityNumber") String capcityNumber) throws Exception {
            CurrentLocationResult currentLocationResult = routeService.getCurrentLocation(capcityNumber);
-           currentLocationResult.setStatusStr();
+           if(currentLocationResult!=null){
+               currentLocationResult.setStatusStr();
+           }
            return success(currentLocationResult);
     }
     //在途订单列表

+ 1 - 1
src/main/java/com/steerinfo/route/service/impl/RouteServiceImpl.java

@@ -942,7 +942,7 @@ public class RouteServiceImpl implements RouteService {
     @Override
     public CurrentLocationResult getCurrentLocation(String capcityNumber) throws Exception {
         String json = zhongJiaoXingLu.vLastLocationV3(capcityNumber);
-        CurrentLocationResult currentLocationResult = (CurrentLocationResult) DataConversionTool.jsonToBean(json, CurrentLocationResult.class);
+        CurrentLocationResult currentLocationResult = JSONObject.parseObject(json,CurrentLocationResult.class);
         try{
             if(currentLocationResult.getResult().getLat()!=null&&currentLocationResult.getResult().getLon()!=null){
                 Double[] lngLon = LngLonUtil.gps84_To_Gcj02((Double.valueOf(currentLocationResult.getResult().getLat()) / 600000), (Double.valueOf(currentLocationResult.getResult().getLon()) / 600000));