| | |
| | | Number string `json:"number"` //编号 |
| | | CreateTime string `json:"createTime"` //创建时间 |
| | | MarketId uint `json:"marketId"` //庄口id |
| | | WorkshopId uint `json:"workshopId"` //车间id |
| | | WorkshopNumber string `json:"workshopNumber"` //车间编码 |
| | | GroupNumber int `json:"groupNumber"` //组别 |
| | | Spec string `json:"spec"` //规格 |
| | | JieZhuang string `json:"jieZhuang"` //是否结庄 |
| | |
| | | } |
| | | |
| | | type ChangeYieldRegister struct { |
| | | CreateTime string `json:"createTime"` //创建时间 |
| | | MarketId uint `json:"marketId"` //庄口id |
| | | WorkshopId uint `json:"workshopId"` //车间id |
| | | GroupNumber int `json:"groupNumber"` //组别 |
| | | Spec string `json:"spec"` //规格 |
| | | CreateTime string `json:"createTime"` //创建时间 |
| | | MarketId uint `json:"marketId"` //庄口id |
| | | WorkshopNumber string `json:"workshopNumber"` //车间编码 |
| | | GroupNumber int `json:"groupNumber"` //组别 |
| | | Spec string `json:"spec"` //规格 |
| | | } |
| | |
| | | for _, dict := range all { |
| | | if register.MarketId == dict.ID { |
| | | register.MarketName = dict.Name |
| | | break |
| | | } |
| | | if register.WorkshopNumber == dict.Number { |
| | | register.WorkshopName = dict.Name |
| | | } |
| | | } |
| | | } |
| | |
| | | return |
| | | } |
| | | first, err := models.NewYieldRegisterSearch().SetGroupNumber(params.GroupNumber).SetCreateTime(params.CreateTime). |
| | | SetMarketId(params.MarketId).SetWorkshopId(params.WorkshopId).SetSpec(params.Spec).SetPreload(true).First() |
| | | SetMarketId(params.MarketId).SetWorkshopNumber(params.WorkshopNumber).SetSpec(params.Spec).SetPreload(true).First() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "查询失败") |
| | | return |
| | |
| | | "vehicleSpeed": { |
| | | "type": "number" |
| | | }, |
| | | "workshopId": { |
| | | "type": "integer" |
| | | }, |
| | | "workshopName": { |
| | | "description": "车间名", |
| | | "type": "string" |
| | | }, |
| | | "workshopNumber": { |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "description": "规格", |
| | | "type": "string" |
| | | }, |
| | | "workshopId": { |
| | | "description": "车间id", |
| | | "type": "integer" |
| | | "workshopNumber": { |
| | | "description": "车间编码", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "description": "实时车速", |
| | | "type": "number" |
| | | }, |
| | | "workshopId": { |
| | | "description": "车间id", |
| | | "type": "integer" |
| | | "workshopNumber": { |
| | | "description": "车间编码", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "vehicleSpeed": { |
| | | "type": "number" |
| | | }, |
| | | "workshopId": { |
| | | "type": "integer" |
| | | }, |
| | | "workshopName": { |
| | | "description": "车间名", |
| | | "type": "string" |
| | | }, |
| | | "workshopNumber": { |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "description": "规格", |
| | | "type": "string" |
| | | }, |
| | | "workshopId": { |
| | | "description": "车间id", |
| | | "type": "integer" |
| | | "workshopNumber": { |
| | | "description": "车间编码", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | "description": "实时车速", |
| | | "type": "number" |
| | | }, |
| | | "workshopId": { |
| | | "description": "车间id", |
| | | "type": "integer" |
| | | "workshopNumber": { |
| | | "description": "车间编码", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | type: string |
| | | vehicleSpeed: |
| | | type: number |
| | | workshopId: |
| | | type: integer |
| | | workshopName: |
| | | description: 车间名 |
| | | type: string |
| | | workshopNumber: |
| | | type: string |
| | | type: object |
| | | models.YieldRegisterCircle: |
| | |
| | | spec: |
| | | description: 规格 |
| | | type: string |
| | | workshopId: |
| | | description: 车间id |
| | | type: integer |
| | | workshopNumber: |
| | | description: 车间编码 |
| | | type: string |
| | | type: object |
| | | request.DynamicsRank: |
| | | properties: |
| | |
| | | vehicleSpeed: |
| | | description: 实时车速 |
| | | type: number |
| | | workshopId: |
| | | description: 车间id |
| | | type: integer |
| | | workshopNumber: |
| | | description: 车间编码 |
| | | type: string |
| | | type: object |
| | | request.YieldRegisterItemInfo: |
| | | properties: |
| | |
| | | Number string `json:"number" gorm:"type:varchar(255);not null;comment:编号"` |
| | | CreateTime string `json:"createTime" gorm:"type:varchar(255);comment:创建时间"` |
| | | MarketId uint `json:"marketId" gorm:"type:int(11);comment:庄口id"` |
| | | WorkshopId uint `json:"workshopId" gorm:"type:int(11);comment:车间id"` |
| | | WorkshopNumber string `json:"workshopNumber" gorm:"type:varchar(255);comment:车间编码"` |
| | | GroupNumber int `json:"groupNumber" gorm:"type:int(11);comment:组别"` |
| | | Spec string `json:"spec" gorm:"type:varchar(255);comment:规格"` |
| | | JieZhuang string `json:"jieZhuang" gorm:"type:varchar(255);comment:是否结庄"` |
| | |
| | | return slf |
| | | } |
| | | |
| | | func (slf *YieldRegisterSearch) SetWorkshopId(workshopId uint) *YieldRegisterSearch { |
| | | slf.WorkshopId = workshopId |
| | | func (slf *YieldRegisterSearch) SetWorkshopNumber(workshopNumber string) *YieldRegisterSearch { |
| | | slf.WorkshopNumber = workshopNumber |
| | | return slf |
| | | } |
| | | |
| | |
| | | db = db.Where("create_time = ?", slf.CreateTime) |
| | | } |
| | | |
| | | if slf.WorkshopId > 0 { |
| | | db = db.Where("workshop_id = ?", slf.WorkshopId) |
| | | if slf.WorkshopNumber != "" { |
| | | db = db.Where("workshop_number = ?", slf.WorkshopNumber) |
| | | } |
| | | |
| | | if slf.MarketId > 0 { |