From 6ab9c7858c234f51719acc3e514a1af769da578b Mon Sep 17 00:00:00 2001 From: DELL <1525436766@qq.com> Date: 星期四, 19 十二月 2024 10:26:10 +0800 Subject: [PATCH] 更新实时数据同时更新锁具inf表 --- ElectLock_Monitor/src/com/dev/lock/data/ElectLock_Array.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ElectLock_Monitor/src/com/dev/lock/data/ElectLock_Array.java b/ElectLock_Monitor/src/com/dev/lock/data/ElectLock_Array.java index 64db09f..efbef88 100644 --- a/ElectLock_Monitor/src/com/dev/lock/data/ElectLock_Array.java +++ b/ElectLock_Monitor/src/com/dev/lock/data/ElectLock_Array.java @@ -29,7 +29,7 @@ try { res = sql.sqlMysqlQuery(sql_str); while(res.next()) { - int lock_id = res.getInt("id"); + int lock_id = res.getInt("lock_id"); int area_id = res.getInt("area_id"); //鍖哄煙ID String lock_name = res.getString("lock_name"); //閿佸悕绉� String lock_type = res.getString("lock_type"); //閿佺被鍨�(鏃犳簮,钃濈墮) @@ -41,7 +41,7 @@ boolean isexist = false; for(int k = 0 ;k<mInfs.size();k++) { ElectLock_Inf tmp_lock = getIteam(k); - if(lock_id == tmp_lock.getId()) { + if(lock_id == tmp_lock.getLock_id()) { if(!lock_ip.equals(tmp_lock.getLock_ip())) { tmp_lock.setLock_ip(lock_ip); isChange = true; @@ -54,7 +54,7 @@ continue; } else { ElectLock_Inf tmp_lock = new ElectLock_Inf(); - tmp_lock.setId(lock_id); + tmp_lock.setLock_id(lock_id); tmp_lock.setArea_id(area_id); //'鍖哄煙id', tmp_lock.setLock_name(lock_name); //'閿佸悕绉�', tmp_lock.setLock_type(lock_type); //'閿佺被鍨�(鏃犳簮,钃濈墮)', -- Gitblit v1.9.1