| | |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plc/productProgressRealTime": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "生产数量" |
| | | ], |
| | | "summary": "实时获取生产进度", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.ProductProgress" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plc/setProductNumber": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/v1/task/sendProcessParams/{id}": { |
| | | "/v1/task/get/unStarted": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Task" |
| | | ], |
| | | "summary": "获取未开始的任务", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.TaskData" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/task/sendProcessParams": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | |
| | | "type": "string", |
| | | "enum": [ |
| | | "modbusTCP", |
| | | "serial" |
| | | "serial", |
| | | "网络", |
| | | "串口" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcMethodModbusTCP", |
| | | "PlcMethodSerial" |
| | | "PlcMethodSerial", |
| | | "PlcMethodModbusTCPChinese", |
| | | "PlcMethodSerialChinese" |
| | | ] |
| | | }, |
| | | "constvar.PlcStartAddressType": { |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "address": { |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | |
| | | }, |
| | | "length": { |
| | | "description": "数据长度", |
| | | "type": "integer" |
| | | }, |
| | | "position": { |
| | | "description": "数据起始地址", |
| | | "type": "integer" |
| | | }, |
| | | "startAddress": { |
| | |
| | | "type": "object", |
| | | "properties": { |
| | | "address": { |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"type:int(11);comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | |
| | | "finishNumber": { |
| | | "type": "integer" |
| | | }, |
| | | "plcStatus": { |
| | | "type": "integer" |
| | | }, |
| | | "totalNumber": { |
| | | "type": "integer" |
| | | } |
| | |
| | | "type": "string" |
| | | } |
| | | }, |
| | | "canStarted": { |
| | | "description": "是否可以开始生产", |
| | | "type": "boolean" |
| | | }, |
| | | "currentProcedureIndex": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | }, |
| | | "procedure": { |
| | | "$ref": "#/definitions/model.Procedures" |
| | | }, |
| | | "workers": { |
| | | "description": "人员列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/common.ProcedureWorker" |
| | | } |
| | | } |
| | | } |
| | | } |