zhangqian
2023-09-23 14fc2f577e2c0b7b146c1a430e9438f317ad5b0c
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"` //每个设备可能有多个机位同时生产,用position表示位置
      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