From bdf0dc4cb183d3fec40e1d51b3bb94b7e53d0a55 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期日, 04 一月 2026 10:45:07 +0800
Subject: [PATCH] 1.修复报文字段差异风险: S1F3:项目用 getSubItemU4(0) 取 SVID;日志里有 U2 的情况,可能导致解析失败后回退成 SV=0。 S6F11:项目发送 DATAID(U4) + CEID(U4);日志样例里第一个字段是 U2,可能存在类型/字段定义不一致。

---
 SourceCode/Bond/Servo/CMaster.cpp |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 610ec95..348c561 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -1483,6 +1483,7 @@
 							this->saveState();
 							LOGE("<Master>ProcessJob(%s)瀹屾垚.",
 								pJob->id().c_str());
+							processJobFromInPorcessToComplete(pJob);
 							if (m_listener.onPjEnd != nullptr) {
 								m_listener.onPjEnd(this, pJob);
 							}
@@ -2600,15 +2601,31 @@
 		}
 		m_processJobs = temp;
 
+		// 閲嶇疆鍚勭鍙� DownloadMap锛圚ost/鏈湴鍕鹃�夌殑鏈熸湜鍔犲伐妲戒綅锛�
+		for (int i = 0; i < 4; i++) {
+			auto* pPort = (CLoadPort*)getEquipment(EQ_ID_LOADPORT1 + i);
+			if (pPort != nullptr) {
+				pPort->setDownloadCassetteMap(0);
+			}
+		}
+
 
 		// 鏇存柊context
-		std::vector<uint8_t> newSlots;
-		std::vector<void*> newContexts;
 		for (auto pj : m_processJobs) {
 			for (auto& c : pj->carriers()) {
 				auto pPort = getPortWithCarrierId(c.carrierId);
 				if (pPort == nullptr) continue;
 
+				short downloadMap = 0;
+				for (auto s : c.slots) {
+					if (s >= 1 && s <= 8) {
+						downloadMap |= (short)(1 << (s - 1));
+					}
+				}
+				pPort->setDownloadCassetteMap((short)(pPort->getDownloadCassetteMap() | downloadMap));
+
+				std::vector<uint8_t> newSlots;
+				std::vector<void*> newContexts;
 				for (auto s : c.slots) {
 					auto pGlass = pPort->getGlassFromSlot(s);
 					if (pGlass == nullptr) continue;

--
Gitblit v1.9.3