From 02a84fb6fb2a39bfe7fc5cf6c0137bbf231b17fe Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 09 十一月 2023 14:14:17 +0800
Subject: [PATCH] 设备列表返回是否设置工艺参数字段

---
 main.go |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/main.go b/main.go
index b1a14d7..2247522 100644
--- a/main.go
+++ b/main.go
@@ -11,7 +11,6 @@
 	"apsClient/router"
 	"apsClient/serf"
 	"apsClient/service"
-	"apsClient/service/plc_address"
 	"fmt"
 	"log"
 	"net/http"
@@ -29,7 +28,7 @@
 	}
 
 	//鍔犺浇plc鍐欏叆鍦板潃
-	plc_address.LoadAddressFromFile()
+	//plc_address.LoadAddressFromFile()
 
 	// 鍚姩鏁版嵁鍚屾
 	var serfStartChan = make(chan bool)
@@ -43,6 +42,8 @@
 		"task_status_sync",
 		"device",
 		"device_plc",
+		"system_status",
+		"process_model_plc_address",
 	}
 
 	agent := serf.InitAgent("apsClient", syncTables, sqlitex.GetDB())
@@ -54,10 +55,11 @@
 		return
 	}
 
-	//浠庢枃浠堕噷璇诲彇褰撳墠鐢熶骇璁惧id
-	conf.Conf.CurrentDeviceID = service.ReadDeviceIDFromFile()
-	if conf.Conf.CurrentDeviceID == "" {
-		conf.Conf.CurrentDeviceID = conf.Conf.System.DeviceId
+	//浠庢枃浠堕噷璇诲彇褰撳墠鐢熶骇璁惧id鑾峰彇璁惧鍒楄〃绗竴涓�
+	err := service.InitCurrentDeviceID()
+	if err != nil {
+		logx.Errorf("InitCurrentDeviceID error: %v, exit", err)
+		return
 	}
 
 	// 鍒ゆ柇褰撳墠闆嗙兢鐘舵��

--
Gitblit v1.8.0