| | |
| | | } |
| | | |
| | | ProductProcedure struct { |
| | | ProcedureID string `gorm:"uniqueIndex:idx_product_procedure;type:varchar(191);comment:工序ID" json:"procedureId"` |
| | | ProcedureName string `gorm:"type:varchar(191);comment:工序名称,仅查询用" json:"procedureName"` |
| | | NextProcedureID string `json:"nextProcedureId"` |
| | | NextProcedureName string `json:"nextProcedureName"` |
| | | DeviceID string `gorm:"type:varchar(191);not null;comment:设备ID" json:"deviceId"` |
| | | DeviceName string `json:"deviceName"` |
| | | StartTime int64 `gorm:"comment:计划开始时间" json:"startTime"` |
| | | EndTime int64 `gorm:"comment:计划结束时间" json:"endTime"` |
| | | WorkHours decimal.Decimal `gorm:"type:decimal(35,18);comment:工时" json:"workHours"` |
| | | InputMaterials []*ProcedureMaterial `json:"inputMaterials"` // 输入物料列表 |
| | | OutputMaterials []*ProcedureMaterial `json:"outputMaterials"` // 输出物料列表 |
| | | Workers []*ProcedureWorker `json:"workers"` // 人员列表 |
| | | AllProcedureNames []string `json:"allProcedureNames"` // 所属工单工序列表 |
| | | Channel int32 `json:"channel"` //通道序号 |
| | | ProductProcedureID string `gorm:"index;type:varchar(191);not null;comment:产品工序ID" json:"productProcedureID"` |
| | | ProcedureID string `gorm:"uniqueIndex:idx_product_procedure;type:varchar(191);comment:工序ID" json:"procedureId"` |
| | | ProcedureName string `gorm:"type:varchar(191);comment:工序名称,仅查询用" json:"procedureName"` |
| | | NextProcedureID string `json:"nextProcedureId"` |
| | | NextProcedureName string `json:"nextProcedureName"` |
| | | DeviceID string `gorm:"type:varchar(191);not null;comment:设备ID" json:"deviceId"` |
| | | DeviceName string `json:"deviceName"` |
| | | StartTime int64 `gorm:"comment:计划开始时间" json:"startTime"` |
| | | EndTime int64 `gorm:"comment:计划结束时间" json:"endTime"` |
| | | WorkHours decimal.Decimal `gorm:"type:decimal(35,18);comment:工时" json:"workHours"` |
| | | InputMaterials []*ProcedureMaterial `json:"inputMaterials"` // 输入物料列表 |
| | | OutputMaterials []*ProcedureMaterial `json:"outputMaterials"` // 输出物料列表 |
| | | Workers []*ProcedureWorker `json:"workers"` // 人员列表 |
| | | AllProcedureNames []string `json:"allProcedureNames"` // 所属工单工序列表 |
| | | Channel int32 `json:"channel"` //通道序号 |
| | | } |
| | | |
| | | DeliverScheduleTask struct { |
| | |
| | | |
| | | // MsgTaskStatusUpdate 任务状态改变 |
| | | type MsgTaskStatusUpdate struct { |
| | | WorkOrderId string `json:"workOrderId"` //工单编号 |
| | | ProcedureID string `json:"procedureId"` // 工序 |
| | | DeviceId string `json:"deviceId"` //用于过滤获取nsq消息 |
| | | IsProcessing bool //是否处理中 |
| | | IsFinish bool //是否完成 |
| | | WorkOrderId string `json:"workOrderId"` //工单编号 |
| | | ProcedureID string `json:"procedureId"` // 工序 |
| | | DeviceId string `json:"deviceId"` //用于过滤获取nsq消息 |
| | | IsProcessing bool //是否处理中 |
| | | IsFinish bool //是否完成 |
| | | FinishAmount int `json:"finishAmount"` //isFinish = true时取工序最终加工数传上去 |
| | | ProductProcedureID string `json:"productProcedureID"` //产品工序id |
| | | StartTs int64 `json:"start_ts"` //开始时间 |
| | | FinishTs int64 `json:"finish_ts"` //结束时间 |
| | | } |
| | | |
| | | // DeviceMsg 下发到终端的设备信息 |