| | |
| | | } |
| | | |
| | | 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"` |
| | | DeviceID string `gorm:"type:varchar(191);not null;comment:设备ID" json:"deviceId"` |
| | | DeviceName string `gorm:"type:varchar(191);not null;comment:设备名称" 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"` // 人员列表 |
| | | 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"` // 人员列表 |
| | | } |
| | | |
| | | DeliverScheduleTask struct { |
| | |
| | | Procedures []*ProductProcedure `json:"procedures"` // 工序列表 |
| | | } |
| | | ) |
| | | |
| | | // PLC写入地址 |
| | | type ( |
| | | RequestPlcAddress struct { |
| | | DeviceId string |
| | | } |
| | | ResponsePlcAddress struct { |
| | | KeyData []byte |
| | | AddressData []byte |
| | | } |
| | | ) |
| | | |
| | | // 工艺参数 |
| | | type ( |
| | | RequestProcessParams struct { |
| | | WorkOrder string `json:"workOrder,omitempty" form:"workOrder"` //工序编号 |
| | | OrderId string `json:"orderId"` // 订单号 |
| | | Product string `json:"password"` // 产品 |
| | | Procedure string `json:"procedure"` // 工序 |
| | | Device string `json:"device"` // 设备 |
| | | } |
| | | ResponseProcessParams struct { |
| | | Number string `json:"number"` //工艺模型编号 |
| | | OrderId string `json:"orderId"` //订单id |
| | | Product string `json:"product"` //产品名称 |
| | | Procedure string `json:"procedure"` //工序 |
| | | WorkOrder string `json:"workOrder"` //工单 |
| | | Device string `json:"device"` //设备 |
| | | ParamsMap map[string]interface{} `json:"paramsMap"` |
| | | } |
| | | ) |