| | |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "获取动态数据" |
| | | "生产数量" |
| | | ], |
| | | "summary": "获取生产进度", |
| | | "responses": { |
| | |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plc/setProductNumber": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "生产数量" |
| | | ], |
| | | "summary": "设置生产总量", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/task/countdown": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Task" |
| | | ], |
| | | "summary": "新任务倒计时", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.TaskCountdown" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "constvar.PlcMethod": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "modbusTCP", |
| | | "serial" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcMethodModbusTCP", |
| | | "PlcMethodSerial" |
| | | ] |
| | | }, |
| | | "constvar.PlcStartAddressType": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2 |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcStartAddressTypeFinishNumber", |
| | | "PlcStartAddressTypeTotalNumber" |
| | | ] |
| | | }, |
| | | "constvar.PlcStartAddressValueType": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "string", |
| | | "int" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcStartAddressValueTypeString", |
| | | "PlcStartAddressValueTypeInt" |
| | | ] |
| | | }, |
| | | "contextx.Response": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | "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\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | | "description": "串口波特率, method = serial时 用", |
| | | "type": "integer" |
| | | }, |
| | | "brand": { |
| | | "type": "string" |
| | |
| | | "$ref": "#/definitions/model.DevicePlcAddress" |
| | | } |
| | | }, |
| | | "frequency": { |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "method": { |
| | | "type": "string" |
| | | "$ref": "#/definitions/constvar.PlcMethod" |
| | | }, |
| | | "port": { |
| | | "description": "plc 端口号, method = modbusTCP用", |
| | | "type": "integer" |
| | | }, |
| | | "portName": { |
| | | "serialName": { |
| | | "description": "串口名称,method = serial时 用", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "properties": { |
| | | "fieldName": { |
| | | "description": "对应系统字段", |
| | | "type": "string" |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.PlcStartAddressType" |
| | | } |
| | | ] |
| | | }, |
| | | "length": { |
| | | "description": "数据长度", |
| | |
| | | }, |
| | | "type": { |
| | | "description": "数据类型", |
| | | "type": "string" |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.PlcStartAddressValueType" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | "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\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | | "description": "串口波特率, method = serial时 用", |
| | | "type": "integer" |
| | | }, |
| | | "brand": { |
| | | "type": "string" |
| | |
| | | "$ref": "#/definitions/model.DevicePlcAddress" |
| | | } |
| | | }, |
| | | "frequency": { |
| | | "type": "integer" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | "type": "boolean" |
| | | }, |
| | | "method": { |
| | | "type": "string" |
| | | "$ref": "#/definitions/constvar.PlcMethod" |
| | | }, |
| | | "port": { |
| | | "description": "plc 端口号, method = modbusTCP用", |
| | | "type": "integer" |
| | | }, |
| | | "portName": { |
| | | "serialName": { |
| | | "description": "串口名称,method = serial时 用", |
| | | "type": "string" |
| | | } |
| | | } |
| | |
| | | "properties": { |
| | | "finishNumber": { |
| | | "type": "integer" |
| | | }, |
| | | "totalNumber": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "response.TaskCountdown": { |
| | | "type": "object", |
| | | "properties": { |
| | | "countDownHour": { |
| | | "description": "倒计时 时", |
| | | "type": "integer" |
| | | }, |
| | | "countDownMinute": { |
| | | "description": "倒计时 分", |
| | | "type": "integer" |
| | | }, |
| | | "showCountDown": { |
| | | "description": "是否展示倒计时", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |