From 80bee26f6187d5c9a9df28fde14fe40ab8170566 Mon Sep 17 00:00:00 2001
From: Administrator <ard@qq.com>
Date: 星期四, 26 十月 2023 09:51:29 +0800
Subject: [PATCH] 修改报错
---
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
index 7fd9962..c359393 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
@@ -16,6 +16,8 @@
import com.ruoyi.sy.domain.ArdAccessFence;
import com.ruoyi.sy.domain.ArdOilWall;
import com.ruoyi.sy.domain.ArdSyCarLock;
+import com.ruoyi.sy.service.ArdAccessFenceService;
+import com.ruoyi.sy.service.ArdOilWallService;
import com.ruoyi.sy.service.impl.*;
import com.ruoyi.utils.gps.GeoTools;
import org.apache.commons.logging.Log;
@@ -80,21 +82,21 @@
Map<String,Object> result = ((ArdSyCarServiceImpl)SpringUtils.getBean("ardSyCarServiceImpl")).getArdSyCarAndDeptByCarId(carId);//鏌ヨ杞﹁締鍙婇儴闂�
if(result != null){
//娓呮筏鍏ユ爮寮�濮�----------
- String lng = (String) gpsMap.get("lng");//鑾峰彇缁忓害
- String lat = (String) gpsMap.get("lat");//鑾峰彇绾害
+ String lng = (String) gpsMap.get("lng").toString();//鑾峰彇缁忓害
+ String lat = (String) gpsMap.get("lat").toString();//鑾峰彇绾害
String carName = (String) gpsMap.get("carName");//鑾峰彇杞︾墝鍙�
String time = (String) gpsMap.get("result");//瀹氫綅鏃堕棿
- String deptNum = (String) result.get("deptId");//鑾峰彇閮ㄩ棬ID
+ String deptNum = (String) result.get("deptId").toString();//鑾峰彇閮ㄩ棬ID
String deptName = (String) result.get("deptName");//鑾峰彇閮ㄩ棬鍚嶇О
//瀹氫箟2缁寸┖闂�
Point2D.Double point = new Point2D.Double(Double.parseDouble(lng), Double.parseDouble(lat));
List<Point2D.Double> pts = new ArrayList<Point2D.Double>();
//鏌ヨ瀹氫綅娌硅溅琛ㄤ腑鏄惁鏈夎杞﹁締
- ArdAccessFence ardAccessFence = ((ArdAccessFenceServiceImpl)SpringUtils.getBean("ArdAccessFenceServiceImpl")).queryAccess(carId);
+ ArdAccessFence ardAccessFence = SpringUtils.getBean(ArdAccessFenceService.class).queryAccess(carId);
//濡傛灉娌℃湁璇存槑杞﹁締鏈繘鍏ヨ娌圭偣锛岄渶瑕佸尮閰嶆墍鏈夎娌圭偣鍥存爮
if(ardAccessFence==null){
//杞﹁締鏈繘鍏ヨ娌圭偣
- List<ArdOilWall> ardOilWalls = ((ArdOilWallServiceImpl)SpringUtils.getBean("ArdOilWallServiceImpl")).accessAll();
+ List<ArdOilWall> ardOilWalls = SpringUtils.getBean(ArdOilWallService.class).accessAll();
for (int i = 0; i < ardOilWalls.size(); i++) {
pts.clear();
ArdOilWall ardOilWall = ardOilWalls.get(i);
--
Gitblit v1.9.3