From 334b16b4abb4cbe3d1d4e4f211efd6f4468ae09f Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 19 九月 2025 15:12:52 +0800
Subject: [PATCH] 1.ControlJob和ProcessJob的中断操作,强制结批增加字符串描述原因,方便生产跟踪。

---
 SourceCode/Bond/Servo/CCjPage2.cpp |   41 +++++++++++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/SourceCode/Bond/Servo/CCjPage2.cpp b/SourceCode/Bond/Servo/CCjPage2.cpp
index 5e79f6a..c156c44 100644
--- a/SourceCode/Bond/Servo/CCjPage2.cpp
+++ b/SourceCode/Bond/Servo/CCjPage2.cpp
@@ -77,15 +77,6 @@
     m_grid.SetPortInfo(3, _T("Port 4"), _T(""));
 
 
-    // 娴嬭瘯鏁版嵁
-    char szBuffer[256];
-    for (int port = 0; port < 4; port++) {
-        for (int slot = 0; slot < 8; slot++) {
-            sprintf_s(szBuffer, 256, "Gls%04d%04d", port + 1, slot + 1);
-            m_grid.SetSlotGlass(port, slot, TRUE, szBuffer, CCarrierSlotGrid::MAT_G1);
-        }
-    }
-
     UpdatePjData();
 
 
@@ -237,11 +228,41 @@
     }
 
 
+    // 璇诲彇鍑虹湡瀹炴暟鎹�
+    auto& master = theApp.m_model.getMaster();
+    int EQID[] = {EQ_ID_LOADPORT1, EQ_ID_LOADPORT2, EQ_ID_LOADPORT3, EQ_ID_LOADPORT4};
+    for (int p = 0; p < 4; p++) {
+        SERVO::CLoadPort* pPort = (SERVO::CLoadPort*)master.getEquipment(EQID[p]);
+        m_grid.SetPortInfo(p, 
+            (std::string("Port ") + std::to_string(p+1)).c_str(),
+            pPort->getCassetteId().c_str()
+        );
+        for (int i = 0; i < SLOT_MAX; ++i) {
+            SERVO::CSlot* pSlot = pPort->getSlot(i);
+            if (!pSlot) {
+                continue;
+            }
+
+            // 璁剧疆 Panel ID 
+            SERVO::CGlass* pGlass = dynamic_cast<SERVO::CGlass*>(pSlot->getContext());
+            SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
+            if (pGlass != nullptr && pJobDataS != nullptr) {
+                m_grid.SetSlotGlass(p, i, TRUE, 
+                    pGlass->getID().c_str(), 
+                    m_pjWarps[p].material[i]);
+            }
+            else {
+                m_grid.SetSlotGlass(p, i, FALSE, nullptr, CCarrierSlotGrid::MAT_G1);
+            }
+        }
+    }
+
+
     // 璁剧疆鍕鹃�夋暟鎹�
     if (portIndex != -1) {
         for (int i = 0; i < 8; i++) {
             m_grid.SetSlotChecked(portIndex, i, ((PJWarp*)m_pContext)->checkSlot[i]);
-            m_grid.SetSlotMaterialType(portIndex, i, ((PJWarp*)m_pContext)->material[i]);
+            // m_grid.SetSlotMaterialType(portIndex, i, ((PJWarp*)m_pContext)->material[i]);
         }
     }
 

--
Gitblit v1.9.3