From 9aac460a313ac8284e0fd633183c93815f95e0de Mon Sep 17 00:00:00 2001
From: zhangnaisong <2434969829@qq.com>
Date: 星期三, 24 七月 2024 17:21:57 +0800
Subject: [PATCH] 实时状态预提交修改提交

---
 ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdTankLockServiceImpl.java |   47 +++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdTankLockServiceImpl.java b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdTankLockServiceImpl.java
index 6ac1b8b..f3eeefd 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdTankLockServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdTankLockServiceImpl.java
@@ -5,11 +5,10 @@
 import com.github.pagehelper.PageHelper;
 import com.ruoyi.common.core.domain.entity.SysConfig;
 import com.ruoyi.common.utils.uuid.IdUtils;
+import com.ruoyi.sy.domain.ArdSyCar;
 import com.ruoyi.sy.domain.ArdSyUser;
 import com.ruoyi.sy.domain.ArdTankLockState;
-import com.ruoyi.sy.mapper.ArdSyUserMapper;
-import com.ruoyi.sy.mapper.ArdTankWallLockMapper;
-import com.ruoyi.sy.mapper.ArdTankWallLockTemporaryMapper;
+import com.ruoyi.sy.mapper.*;
 import com.ruoyi.system.mapper.SysConfigMapper;
 import com.ruoyi.utils.forest.SYClient;
 import org.apache.commons.codec.digest.DigestUtils;
@@ -17,7 +16,6 @@
 
 import java.util.stream.Collectors;
 
-import com.ruoyi.sy.mapper.ArdTankLockMapper;
 import com.ruoyi.sy.domain.ArdTankLock;
 import com.ruoyi.sy.service.IArdTankLockService;
 
@@ -45,6 +43,12 @@
 
     @Resource
     private SysConfigMapper sysConfigMapper;
+
+    @Resource
+    private ArdSyCarMapper ardSyCarMapper;
+
+    @Resource
+    private ArdTankLockStateMapper ardTankLockStateMapper;
 
     @Resource
     private SYClient sYClient;
@@ -458,4 +462,39 @@
         List<ArdTankLock> result = ardTankLockMapper.getAll();
         return result;
     }
+
+    @Override
+    public void sendLockState(String userId, String syUserId, String syPassword) {
+        /*List<SysConfig> syURLResult = sysConfigMapper.selectByType("syCarPT");
+        String syURL = "";
+        if(syURLResult.size() != 0){
+            syURL = syURLResult.get(0).getConfigValue();
+        }else{
+            return;
+        }
+        String passwordMd5 = DigestUtils.md5Hex(syPassword);
+        Map<String, Object> LogInResult = sYClient.logIn(syURL, passwordMd5, syUserId);
+        String sessionId = (String) LogInResult.get("sessionId");
+        Map<String,Object> syResult = sYClient.getCarNearPositionByCarId(syURL, carId, syUserId, sessionId);
+
+        List<Map<String,Object>> result = new ArrayList();
+        List<ArdSyCar> ardSyCarResult = ardSyCarMapper.selectArdSyCarAndTankLockByUserId(userId);
+        for(ArdSyCar ardSyCar : ardSyCarResult){
+            Map<String,Object> map = new HashMap();
+            map.put("id",ardSyCar.getId());
+            map.put("carId",ardSyCar.getCarId());
+            map.put("carModel",ardSyCar.getCarModel());
+            map.put("carType",ardSyCar.getCarType());
+            map.put("carBrand",ardSyCar.getCarBrand());
+            map.put("deptId",ardSyCar.getDeptId());
+
+
+
+
+            List<ArdTankLock> ardTankLockList = ardSyCar.getArdTankLockList();
+            for(ArdTankLock ardTankLock : ardTankLockList){
+                ArdTankLockState ardTankLockStateResult = ardTankLockStateMapper.selectArdTankLockStateByLockIdLimitOne(ardTankLock.getId());
+            }
+        }*/
+    }
 }

--
Gitblit v1.9.3