From 54596b451997789a1407a7063ea07bdb78ad8ddc Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 14 十一月 2023 13:43:58 +0800
Subject: [PATCH] 车辆锁
---
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java | 8 ++++++++
ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttOnce.java | 2 +-
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java | 6 ++++++
ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java | 2 ++
4 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
index 87887bc..2b6f049 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
@@ -197,6 +197,12 @@
return AjaxResult.success(ardSyCarLockService.seal(lockTypeParam));
}
+ @GetMapping("/lockIng")
+ @ApiOperation("瀹炴椂閿佺姸鎬�")
+ public AjaxResult lockIng(String carId) {
+ return AjaxResult.success(ardSyCarLockService.lockIng(carId));
+ }
+
//鑾峰彇31杞﹁締杞︾墝鍙烽┚椹跺憳鍜岀數璇�
public List<CarVo> analysis(List<CarVo> list){
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java b/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
index c6d5243..cf0d0b5 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
@@ -50,4 +50,6 @@
AjaxResult onOff(LockTypeParam lockTypeParam);
+ List<ArdSyCarLock> lockIng(String carId);
+
}
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 0a39c98..6f80f7c 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
@@ -335,6 +335,14 @@
return AjaxResult.success();
}
+ @Override
+ public List<ArdSyCarLock> lockIng(String carId) {
+ QueryWrapper<ArdSyCarRtu> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("car_id",carId);
+ ArdSyCarRtu ardSyCarRtu = rtuMapper.selectOne(queryWrapper);
+ return lockMapper.lockList(ardSyCarRtu.getId());
+ }
+
//杞﹁締鍒楄〃灏佽
public List<CarVo> carAnalysis(List<ArdSyCar> ardSyCars){
diff --git a/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttOnce.java b/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttOnce.java
index 70d9196..d71f5d7 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttOnce.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttOnce.java
@@ -29,7 +29,7 @@
@Autowired
private ISysConfigService sysConfigService;
-// @PostConstruct
+ @PostConstruct
public void init() {
List<ArdSyCarRtu> rtus = ardSyCarRtuService.allCarTopicList();
for (int i = 0; i < rtus.size(); i++) {
--
Gitblit v1.9.3