From 296cead8add8a66a00aa1ea07c19c1039d098c3b Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期三, 10 九月 2025 16:15:30 +0800
Subject: [PATCH] 1.将CListCtrlEx功能移到CExpandableListCtrl。

---
 SourceCode/Bond/Servo/Model.cpp |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/SourceCode/Bond/Servo/Model.cpp b/SourceCode/Bond/Servo/Model.cpp
index d7fa9d9..6f2111e 100644
--- a/SourceCode/Bond/Servo/Model.cpp
+++ b/SourceCode/Bond/Servo/Model.cpp
@@ -8,6 +8,7 @@
 #include "CGlassPool.h"
 #include "TransferManager.h"
 #include "RecipeManager.h"
+#include "GlassLogDb.h"
 
 
 CModel::CModel()
@@ -427,13 +428,15 @@
 		m_hsmsPassive.setVariableValue("PJEndID", ((SERVO::CProcessJob*)pj)->id().c_str());
 		m_hsmsPassive.requestEventReportSend_PJ_End();
 	};
-	masterListener.onPanelStart = [&](void* pMaster, void* pj) {
-		m_hsmsPassive.setVariableValue("PanelStartID", ((SERVO::CGlass*)pj)->getID().c_str());
+	masterListener.onPanelStart = [&](void* pMaster, void* pPanel) {
+		m_hsmsPassive.setVariableValue("PanelStartID", ((SERVO::CGlass*)pPanel)->getID().c_str());
 		m_hsmsPassive.requestEventReportSend_Panel_Start();
 	};
-	masterListener.onPanelEnd = [&](void* pMaster, void* pj) {
-		m_hsmsPassive.setVariableValue("PanelEndID", ((SERVO::CGlass*)pj)->getID().c_str());
+	masterListener.onPanelEnd = [&](void* pMaster, void* pPanel) {
+		m_hsmsPassive.setVariableValue("PanelEndID", ((SERVO::CGlass*)pPanel)->getID().c_str());
 		m_hsmsPassive.requestEventReportSend_Panel_End();
+		auto& db = GlassLogDb::Instance();
+		db.insertFromCGlass((*(SERVO::CGlass*)pPanel));
 	};
 	m_master.setListener(masterListener);
 	m_master.setContinuousTransferCount(m_configuration.getContinuousTransferCount());
@@ -461,6 +464,11 @@
 	alarmManager.readAlarmFile(szBuffer);
 
 
+	// Glass数据库
+	strLogDir.Format(_T("%s\\db\\process.db"), (LPTSTR)(LPCTSTR)m_strWorkDir);
+	std::string path((LPTSTR)(LPCTSTR)strLogDir);
+	GlassLogDb::Init(path);
+
 
 	return 0;
 }

--
Gitblit v1.9.3