From 20bbbcc1d14536ddaa498ac84a6008828df8dc1c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 13 十二月 2023 20:23:11 +0800 Subject: [PATCH] 往plc写目标数时,优先往写入地址写,没有写入地址再往读取地址写 --- model/report_work.go | 35 +++++++++++++++-------------------- 1 files changed, 15 insertions(+), 20 deletions(-) diff --git a/model/report_work.go b/model/report_work.go index 379c664..67785df 100644 --- a/model/report_work.go +++ b/model/report_work.go @@ -8,21 +8,21 @@ type ( ReportWork struct { - gorm.Model - ProceduresID uint `gorm:"index;type:varchar(191)" json:"proceduresId"` //procedures琛ㄧ殑id - WorkOrderID string `gorm:"index;type:varchar(191);not null" json:"workOrderId"` - DeviceID string `gorm:"index;type:varchar(191)" json:"deviceId"` - DeviceName string `gorm:"index;type:varchar(191)" json:"deviceName"` - ProcedureID string `gorm:"index;type:varchar(191)" json:"procedureId"` - Channel int32 `gorm:"index;" json:"channel"` //閫氶亾 - StartTime int64 `json:"startTime"` - EndTime int64 `json:"endTime"` - ReportAmount int `json:"reportAmount"` //鎶ュ伐鏁伴噺 - FinishAmount int `json:"finishAmount"` //鏈鎶ュ伐 - 涓婃鎶ュ伐 - WorkerID string `json:"workerID"` //鎶ュ伐浜篿d - WorkerName string `json:"workerName"` //鎶ュ伐浜哄鍚� - WorkerTime int64 `json:"workerTime"` //宸ユ椂锛屽崟浣嶇 - BarCode string `json:"barCode"` //鏉″舰鐮� + CommonModel + ProceduresID uint `gorm:"index;type:varchar(191)" json:"proceduresId"` //procedures琛ㄧ殑id + ProductProcedureID string `gorm:"index;type:varchar(191);" json:"productProcedureID"` //浜у搧宸ュ簭id + WorkOrderID string `gorm:"index;type:varchar(191);" json:"workOrderId"` + DeviceID string `gorm:"index;type:varchar(191)" json:"deviceId"` + DeviceName string `gorm:"index;type:varchar(191)" json:"deviceName"` + ProcedureID string `gorm:"index;type:varchar(191)" json:"procedureId"` + StartTime int64 `json:"startTime"` + EndTime int64 `json:"endTime"` + ReportAmount int `json:"reportAmount"` //鎶ュ伐鏁伴噺 + FinishAmount int `json:"finishAmount"` //鏈鎶ュ伐 - 涓婃鎶ュ伐 + WorkerID string `json:"workerID"` //鎶ュ伐浜篿d + WorkerName string `json:"workerName"` //鎶ュ伐浜哄鍚� + WorkerTime int64 `json:"workerTime"` //宸ユ椂锛屽崟浣嶇 + BarCode string `json:"barCode"` //鏉″舰鐮� } ReportWorkSearch struct { @@ -102,11 +102,6 @@ func (slf *ReportWorkSearch) SetChannels(channels []int32) *ReportWorkSearch { slf.Channels = channels - return slf -} - -func (slf *ReportWorkSearch) SetChannel(channel int32) *ReportWorkSearch { - slf.Channel = channel return slf } -- Gitblit v1.8.0