From 14fc2f577e2c0b7b146c1a430e9438f317ad5b0c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 23 九月 2023 14:14:27 +0800 Subject: [PATCH] 任务接收增加channel字段,postion字段改为channel --- model/production_progress.go | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/model/production_progress.go b/model/production_progress.go index 898b186..4a159af 100644 --- a/model/production_progress.go +++ b/model/production_progress.go @@ -15,7 +15,7 @@ ProcedureID string `gorm:"type:varchar(191);comment:宸ュ簭ID" json:"procedureId"` DeviceID string `gorm:"type:varchar(191);not null;comment:璁惧ID" json:"deviceId"` FinishedQuantity int64 `gorm:"type:int;not null;comment:瀹屾垚鏁伴噺" json:"finishedQuantity"` - Position int `gorm:"type:int;comment:宸ヤ綔浣嶇疆" json:"position"` //姣忎釜璁惧鍙兘鏈夊涓満浣嶅悓鏃剁敓浜э紝鐢╬osition琛ㄧず浣嶇疆 + Channel int32 `gorm:"type:int;comment:宸ヤ綔閫氶亾" json:"channel"` //閫氶亾 TotalQuantity int64 `gorm:"type:int;not null;comment:鎬婚噺" json:"totalQuantity"` } @@ -74,8 +74,8 @@ return slf } -func (slf *ProductionProgressSearch) SetPosition(position int) *ProductionProgressSearch { - slf.Position = position +func (slf *ProductionProgressSearch) SetChannel(channel int32) *ProductionProgressSearch { + slf.Channel = channel return slf } @@ -106,8 +106,8 @@ db = db.Where("device_id = ?", slf.DeviceID) } - if slf.Position != 0 { - db = db.Where("position = ?", slf.Position) + if slf.Channel != 0 { + db = db.Where("channel = ?", slf.Channel) } return db -- Gitblit v1.8.0