From ccd29b236bfa01b34042c657c09288a4e2b7f310 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期六, 13 一月 2024 10:53:48 +0800
Subject: [PATCH] 锁
---
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
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 6f7c357..a3411f0 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
@@ -396,8 +396,12 @@
for (int i = 0; i < locks.size(); i++) {
ArdSyCarLock ardSyCarLock = locks.get(i);
double info = ardSyCarLock.getCurrentInfo();
- int d = (int) ((int)(info*150/138.3 - 4)/0.16);
- ardSyCarLock.setCurrentInfo((double) d);
+ if(Double.isNaN(info)){
+ ardSyCarLock.setCurrentInfo(0.0);
+ }else {
+ int d = (int) ((int)(info*150/138.3 - 4)/0.16);
+ ardSyCarLock.setCurrentInfo((double) d);
+ }
}
return AjaxResult.success(locks);
}else {
--
Gitblit v1.9.3