From 478a6e251361cf00ea18c08a453b0c8caaa9ef6f Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期六, 12 七月 2025 17:24:15 +0800
Subject: [PATCH] 修改SNMP导出OID表格,增加设备类型列

---
 local/bin/export.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/local/bin/export.sh b/local/bin/export.sh
index 51fe1e6..f3104f9 100755
--- a/local/bin/export.sh
+++ b/local/bin/export.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 
-sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞  from device d left join accuracy a on d.id=a.id   where uploadFlag=0" > /tmp/oid_list.csv
-sqlite3 /work/iot_cfg.db "SELECT     name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||id||'.3' as OID, id as 璁惧ID, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞   FROM ioDevice ;" >> /tmp/oid_list.csv
+sqlite3 /work/iot_cfg.db ".headers on " "select d.name as 璁惧鍚嶇О,'1.3.6.1.4.1.27116.'||d.id||'.'||a.passcode as OID, d.id as 璁惧ID, d.type as 璁惧绫诲瀷, a.passcode as 閫氶亾鍙�, a.name as 鏁版嵁鍚嶇О,a.note as 澶囨敞  from device d left join accuracy a on d.id=a.id   where uploadFlag=0" > /tmp/oid_list.csv
+sqlite3 /work/iot_cfg.db "SELECT     name as 璁惧鍚嶇О, '1.3.6.1.4.1.27116.'||id||'.3' as OID, id as 璁惧ID, type as 璁惧绫诲瀷, 3 as 閫氶亾鍙� , '鐘舵��' as 鏁版嵁鍚嶇О, '0-姝e父;1-鍛婅' as 澶囨敞  FROM ioDevice ;" >> /tmp/oid_list.csv
 
 sed -i 's/|/,/g' /tmp/oid_list.csv
 

--
Gitblit v1.9.3