From c8303f55819e2d8b5a56e6316f79c2250d9b659c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期日, 08 十月 2023 21:16:09 +0800
Subject: [PATCH] 工序更新时保存使用的工艺参数编号

---
 model/common/common.go |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/model/common/common.go b/model/common/common.go
index 5eafc0d..2b3e2c9 100644
--- a/model/common/common.go
+++ b/model/common/common.go
@@ -51,6 +51,7 @@
 		OutputMaterials   []*ProcedureMaterial `json:"outputMaterials"`   // 杈撳嚭鐗╂枡鍒楄〃
 		Workers           []*ProcedureWorker   `json:"workers"`           // 浜哄憳鍒楄〃
 		AllProcedureNames []string             `json:"allProcedureNames"` // 鎵�灞炲伐鍗曞伐搴忓垪琛�
+		Channel           int32                `json:"channel"`           //閫氶亾搴忓彿
 	}
 
 	DeliverScheduleTask struct {
@@ -68,8 +69,8 @@
 		KeyData        []byte
 		AddressData    []byte
 		DeviceId       string
-		PlcAddressList []*PlcAddress
-		PlcConfig      PlcConfig
+		PlcAddressList []*PlcAddress //plc 瀹屾垚閲忥紝鎬婚噺锛� 璇诲啓鍦板潃
+		PlcConfig      PlcConfig     //鐢ㄧ綉鍙h繕鏄鍙d互鍙婄綉鍙p port
 	}
 
 	PlcConfig struct {
@@ -86,7 +87,7 @@
 
 	PlcAddress struct {
 		DeviceID     string                       `json:"deviceID"`     // 璁惧id
-		Position     int                          `json:"position"`     // 鐢熶骇浣嶇疆锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃
+		Channel      int                          `json:"channel"`      // 鐢熶骇閫氶亾on锛屼竴涓満鍣ㄥ彲鑳芥湁澶氫釜鏈轰綅锛岄渶瑕佸垎鍒厤缃畃lc鍦板潃
 		StartAddress int                          `json:"startAddress"` // 鏁版嵁璧峰鍦板潃
 		Length       int                          `json:"length"`       // 鏁版嵁闀垮害
 		Type         string                       `json:"type"`         // 鏁版嵁绫诲瀷
@@ -125,3 +126,14 @@
 	IsProcessing bool   //鏄惁澶勭悊涓�
 	IsFinish     bool   //鏄惁瀹屾垚
 }
+
+type Device struct {
+	ID                  string                 `gorm:"comment:涓婚敭ID;primaryKey;type:varchar(191);" json:"id"`
+	DeviceProcedureAttr []*DeviceProcedureAttr `json:"deviceProcedureAttr"` // 璁惧宸ュ簭灞炴�у垪琛�
+	ExtChannelAmount    int                    `gorm:"type:tinyint;comment:棰濆鐨勯�氶亾鏁伴噺;default:0;" json:"extChannelAmount"`
+}
+type DeviceProcedureAttr struct {
+	ProcedureID   string `gorm:"index;type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
+	ProcedureName string `gorm:"type:varchar(191);comment:宸ュ簭鍚嶇О" json:"procedureName"`
+	DeviceID      string `gorm:"index;type:varchar(191);not null;comment:璁惧ID" json:"deviceId"`
+}

--
Gitblit v1.8.0