From 1c31947fd6902b570e3b9ac9eaab8ad9de58ee19 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 02 九月 2023 15:23:41 +0800
Subject: [PATCH] 获取任务逻辑调整,只获取本设备的工序,由工序反推订单

---
 model/device_plc.go |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/model/device_plc.go b/model/device_plc.go
index 785ab8e..e02d2a7 100644
--- a/model/device_plc.go
+++ b/model/device_plc.go
@@ -26,13 +26,17 @@
 		Detail     string `gorm:"type:varchar(2048);comment:鏁版嵁璇︽儏" json:"-"`
 
 		Details []*DevicePlcAddress `gorm:"-" json:"details"`
+
+		MaxTryTimes     int   `gorm:"-" json:"-"` //鏈�澶у啓鍏ラ噸璇曟鏁�
+		CurrentTryTimes int   `gorm:"-" json:"-"` //褰撳墠鍐欏叆閲嶈瘯娆℃暟
+		CurrentErr      error `gorm:"-" json:"-"` //褰撳墠鎶ラ敊
 	}
 
 	DevicePlcAddress struct {
-		StartAddress int    `json:"startAddress"` // 鏁版嵁璧峰鍦板潃
-		Length       int    `json:"length"`       // 鏁版嵁闀垮害
-		Type         string `json:"type"`         // 鏁版嵁绫诲瀷
-		FieldName    int    `json:"fieldName"`    // 瀵瑰簲绯荤粺瀛楁
+		StartAddress int                               `json:"startAddress"` // 鏁版嵁璧峰鍦板潃
+		Length       int                               `json:"length"`       // 鏁版嵁闀垮害
+		Type         constvar.PlcStartAddressValueType `json:"type"`         // 鏁版嵁绫诲瀷
+		FieldName    constvar.PlcStartAddressType      `json:"fieldName"`    // 瀵瑰簲绯荤粺瀛楁
 	}
 
 	DevicePlcSearch struct {

--
Gitblit v1.8.0