From d78ab86af696b7b762823db10ba0f126e697ae2d Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期一, 01 九月 2025 17:30:44 +0800
Subject: [PATCH] 1. 添加手动输入配方名称

---
 SourceCode/Bond/Servo/RecipeManager.h |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/SourceCode/Bond/Servo/RecipeManager.h b/SourceCode/Bond/Servo/RecipeManager.h
index b27b026..3ada9c2 100644
--- a/SourceCode/Bond/Servo/RecipeManager.h
+++ b/SourceCode/Bond/Servo/RecipeManager.h
@@ -11,8 +11,8 @@
 struct DeviceRecipe {
     int nDeviceID;               // 设备ID
     int nRecipeID;               // 子配方ID
-	std::string strRecipeName;   // 子配方名称
     std::string strDeviceName;   // 设备名称 
+	std::string strRecipeName;   // 子配方名称
 };
 
 // 配方信息
@@ -91,6 +91,12 @@
 	// 更新设备配方ID(通过 PPID 和设备名称)
     bool updateDeviceRecipeIDByName(const std::string& ppid, const std::string& strDeviceName, int nNewRecipeID);
 
+    bool addDeviceRecipe(const std::string& deviceName, int nRecipeID, const std::string& strRecipeName);
+    bool updateDeviceRecipe(const std::string& deviceName, int nRecipeID, const std::string& newName);
+    std::string getDeviceRecipeName(const std::string& deviceName, int nRecipeID);
+    bool deleteDeviceRecipe(const std::string& deviceName, int nRecipeID);
+    std::vector<std::pair<int, std::string>> getDeviceRecipes(const std::string& deviceName);
+
     // 模拟插入数据(测试用)
     void insertMockData();
 

--
Gitblit v1.9.3