From 98d0a71132915ab20f6d4ade6164a21aa16001ba Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期三, 13 十二月 2023 17:33:36 +0800
Subject: [PATCH] 飞机
---
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java | 10 ++++++----
ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/EmqClient.java | 4 ----
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 4 ++--
3 files changed, 8 insertions(+), 10 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 cb1de71..5f39186 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
@@ -78,7 +78,7 @@
/*String carName = MapUtil.getStrVal(gpsMap, "carName","");//鑾峰彇杞︾墝鍙�
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(sdf.format(new Date()));*/
- log.info(String.format(" ---->鏀跺埌瀹氫綅鏁版嵁:%s",JSON.toJSONString(gpsMap)));
+// log.info(String.format(" ---->鏀跺埌瀹氫綅鏁版嵁:%s",JSON.toJSONString(gpsMap)));
String carId = (String)gpsMap.get("carId");
((ArdSyCarDayServiceImpl)SpringUtils.getBean("ardSyCarDayServiceImpl")).insertArdSyCarDay(carId);//鏂板杞﹁締涓婃姤鏃堕棿
@@ -95,7 +95,7 @@
String carModel = (String) result.get("carModel");//鑾峰彇杞﹁締妯″瀷
Integer drct = (Integer) gpsMap.get("drct");//鑾峰彇杞﹁締妯″瀷
Integer speed = (Integer) gpsMap.get("speed");
- log.info("carId:"+carId+"lng:"+lng+"lat:"+lat);
+// log.info("carId:"+carId+"lng:"+lng+"lat:"+lat);
//瀹氫箟2缁寸┖闂�
Point2D.Double point = new Point2D.Double(Double.parseDouble(lng), Double.parseDouble(lat));
List<Point2D.Double> pts = new ArrayList<Point2D.Double>();
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
index dca46eb..2eab8d3 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
@@ -69,8 +69,8 @@
ArdSyCarRtu ardSyCarRtu = new ArdSyCarRtu();
ardSyCarRtu.setId(String.valueOf(UUID.randomUUID()));
ardSyCarRtu.setCarId(addRtuParam.getCarId());
- ardSyCarRtu.setTopicPublish("/p"+addRtuParam.getCarId()+"/");
- ardSyCarRtu.setTopicSubscribe("/p"+addRtuParam.getCarId()+"/set/");
+ ardSyCarRtu.setTopicPublish("/p"+addRtuParam.getCarId()+"/set/");
+ ardSyCarRtu.setTopicSubscribe("/p"+addRtuParam.getCarId()+"/");
ardSyCarRtu.setInstallType(addRtuParam.getInstallType());
ardSyCarRtu.setUnloadType(addRtuParam.getUnloadType());
int num = rtuMapper.insert(ardSyCarRtu);
@@ -324,8 +324,10 @@
ArdSyCarRtu ardSyCarRtu = rtuMapper.selectOne(queryWrapper);
ArdSyCarLock ardSyCarLock = lockMapper.selectById(lockTypeParam.getLockId());
Integer relay = ardSyCarLock.getRelayInfo();
- if(relay.equals("1")){
- return AjaxResult.error(0,"璇ラ攣澶勪簬瑙e皝鐘舵��,杩滅▼鏃犳硶鎿嶆帶,璇峰厛鎵ц鏂藉皝鎿嶄綔!");
+ if(relay!=null){
+ if(relay.equals("1")){
+ return AjaxResult.error(0,"璇ラ攣澶勪簬瑙e皝鐘舵��,杩滅▼鏃犳硶鎿嶆帶,璇峰厛鎵ц鏂藉皝鎿嶄綔!");
+ }
}
String key = "";
String currents = ardSyCarLock.getCurrents();
diff --git a/ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/EmqClient.java b/ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/EmqClient.java
index 16452c5..2c0d40c 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/EmqClient.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/EmqClient.java
@@ -27,9 +27,6 @@
this.mqttClient = new MqttClient(mqttUrl,clientId,mempersitence);//璁剧疆杩炴帴broker鐨刪ost鍙奵lientId
this.messageCallback = new MessageCallback();
} catch (MqttException e) {
- System.out.println("鍒濆鍖栧鎴风mqttClient瀵硅薄澶辫触");
- System.out.println("brokerUrl:"+mqttUrl);
- System.out.println("clientId:"+clientId);
e.getMessage();
}
}
@@ -42,7 +39,6 @@
options.setUserName("admin");
options.setPassword("xzx12345".toCharArray());
options.setCleanSession(true);//璁剧疆涓轰复鏃朵細璇�
-
mqttClient.setCallback(messageCallback);//璁剧疆鍥炶皟
try {
--
Gitblit v1.9.3