From e370d743235b6c182a62e15fb3efe764103ad8ef Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 07 六月 2025 11:53:33 +0800
Subject: [PATCH] 1.流程中断后,物料的人工搬出机制,用于恢复流程,保证数据同步;

---
 SourceCode/Bond/Servo/CEquipment.cpp |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index f5cfa15..35c81b8 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -47,7 +47,6 @@
 		for (int i = 0; i < SLOT_MAX; i++) {
 			CContext* pContext = m_slot[i].getContext();
 			if (pContext != nullptr) {
-				pContext->release();
 				m_slot[i].setContext(nullptr);
 			}
 		}
@@ -1237,6 +1236,21 @@
 		return TRUE;
 	}
 
+	int CEquipment::removeGlass(int slotNo)
+	{
+		CSlot* pSlot = nullptr;
+		for (int i = 0; i < SLOT_MAX; i++) {
+			if (!m_slot[i].isEnable()) continue;
+			if (m_slot[i].getNo() != slotNo) continue;
+			pSlot = &m_slot[i];
+			break;
+		}
+
+		if (pSlot == nullptr) return -1;
+		pSlot->setContext(nullptr);
+		return 0;
+	}
+
 	short CEquipment::decodeRecipeListReport(const char* pszData, size_t size)
 	{
 		return m_recipesManager.decodeRecipeListReport(pszData, size);

--
Gitblit v1.9.3