| | |
| | | "host": "{{.Host}}", |
| | | "basePath": "{{.BasePath}}", |
| | | "paths": { |
| | | "/v1/config/net": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Config" |
| | | ], |
| | | "summary": "获取网络配置", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.NetConfig" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Config" |
| | | ], |
| | | "summary": "设置网络配置", |
| | | "parameters": [ |
| | | { |
| | | "description": "参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/model.NetConfig" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.ProcessParams" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/config/plc": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Config" |
| | | ], |
| | | "summary": "获取plc配置", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/model.DevicePlc" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Config" |
| | | ], |
| | | "summary": "更新plc配置", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdatePlc" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plc/productProgress": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "生产数量" |
| | | ], |
| | | "summary": "获取生产进度", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.SendProcessParams" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.ProductProgress" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/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": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "生产数量" |
| | | ], |
| | | "summary": "设置生产总量", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plcBrand/add": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "plc品牌" |
| | | ], |
| | | "summary": "添加plc品牌", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.AddPlcBrand" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plcBrand/delete/{id}": { |
| | | "delete": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "plc品牌" |
| | | ], |
| | | "summary": "删除plc品牌", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "查询参数", |
| | | "name": "id", |
| | | "in": "path", |
| | | "required": true |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plcBrand/list": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "plc品牌" |
| | | ], |
| | | "summary": "获取plc品牌列表", |
| | | "responses": { |
| | | "200": { |
| | | "description": "OK", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/response.ListResponse" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.PlcBrand" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/plcBrand/update": { |
| | | "put": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "plc品牌" |
| | | ], |
| | | "summary": "更新plc品牌", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.UpdatePlcBrand" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "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" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/task/finish/{id}": { |
| | | "put": { |
| | | "produces": [ |
| | |
| | | "Task" |
| | | ], |
| | | "summary": "获取任务", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "每页大小", |
| | | "name": "pageSize", |
| | | "in": "query" |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/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" |
| | |
| | | "tags": [ |
| | | "Task" |
| | | ], |
| | | "summary": "下发工艺参数", |
| | | "summary": "下发工艺参数(开始任务)", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | | "description": "工序id", |
| | | "name": "id", |
| | | "in": "path", |
| | | "required": true |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.SendProcessParams" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | |
| | | "tags": [ |
| | | "Task" |
| | | ], |
| | | "summary": "任务开始", |
| | | "summary": "任务开始(获取工艺参数)", |
| | | "parameters": [ |
| | | { |
| | | "type": "integer", |
| | |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "$ref": "#/definitions/response.ProcessParamsResponse" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | "definitions": { |
| | | "common.ProcedureMaterial": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "type": "number" |
| | | }, |
| | | "materialId": { |
| | | "type": "string" |
| | | }, |
| | | "materialName": { |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "common.ProcedureWorker": { |
| | | "type": "object", |
| | | "properties": { |
| | | "endTime": { |
| | | "type": "integer" |
| | | }, |
| | | "phoneNum": { |
| | | "type": "string" |
| | | }, |
| | | "startTime": { |
| | | "type": "integer" |
| | | }, |
| | | "workerId": { |
| | | "type": "string" |
| | | }, |
| | | "workerName": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "common.ProductProcedure": { |
| | | "type": "object", |
| | | "properties": { |
| | | "allProcedureNames": { |
| | | "description": "所属工单工序列表", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "string" |
| | | } |
| | | }, |
| | | "deviceId": { |
| | | "type": "string" |
| | | }, |
| | | "deviceName": { |
| | | "type": "string" |
| | | }, |
| | | "endTime": { |
| | | "type": "integer" |
| | | }, |
| | | "inputMaterials": { |
| | | "description": "输入物料列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/common.ProcedureMaterial" |
| | | } |
| | | }, |
| | | "nextProcedureId": { |
| | | "type": "string" |
| | | }, |
| | | "nextProcedureName": { |
| | | "type": "string" |
| | | }, |
| | | "outputMaterials": { |
| | | "description": "输出物料列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/common.ProcedureMaterial" |
| | | } |
| | | }, |
| | | "procedureId": { |
| | | "type": "string" |
| | | }, |
| | | "procedureName": { |
| | | "type": "string" |
| | | }, |
| | | "startTime": { |
| | | "type": "integer" |
| | | }, |
| | | "workHours": { |
| | | "type": "number" |
| | | }, |
| | | "workers": { |
| | | "description": "人员列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/common.ProcedureWorker" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "constvar.PlcMethod": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "modbusTCP", |
| | | "serial", |
| | | "网络", |
| | | "串口" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcMethodModbusTCP", |
| | | "PlcMethodSerial", |
| | | "PlcMethodModbusTCPChinese", |
| | | "PlcMethodSerialChinese" |
| | | ] |
| | | }, |
| | | "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": "string" |
| | | } |
| | | } |
| | | }, |
| | | "model.DevicePlc": { |
| | | "type": "object", |
| | | "properties": { |
| | | "address": { |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | | "description": "串口波特率, method = serial时 用", |
| | | "type": "integer" |
| | | }, |
| | | "brand": { |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.DevicePlcAddress" |
| | | } |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "isOpen": { |
| | | "type": "boolean" |
| | | }, |
| | | "method": { |
| | | "$ref": "#/definitions/constvar.PlcMethod" |
| | | }, |
| | | "port": { |
| | | "description": "plc 端口号, method = modbusTCP用", |
| | | "type": "integer" |
| | | }, |
| | | "serialName": { |
| | | "description": "串口名称,method = serial时 用", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "model.DevicePlcAddress": { |
| | | "type": "object", |
| | | "properties": { |
| | | "fieldName": { |
| | | "description": "对应系统字段", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.PlcStartAddressType" |
| | | } |
| | | ] |
| | | }, |
| | | "length": { |
| | | "description": "数据长度", |
| | | "type": "integer" |
| | | }, |
| | | "position": { |
| | | "description": "数据起始地址", |
| | | "type": "integer" |
| | | }, |
| | | "startAddress": { |
| | | "description": "数据起始地址", |
| | | "type": "integer" |
| | | }, |
| | | "type": { |
| | | "description": "数据类型", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.PlcStartAddressValueType" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | "model.NetConfig": { |
| | | "type": "object", |
| | | "required": [ |
| | | "gateway", |
| | | "ip", |
| | | "mask", |
| | | "networkCard" |
| | | ], |
| | | "properties": { |
| | | "dns": { |
| | | "description": "dns", |
| | | "type": "string" |
| | | }, |
| | | "gateway": { |
| | | "description": "网关", |
| | | "type": "string" |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "ip": { |
| | | "description": "本机ip", |
| | | "type": "string" |
| | | }, |
| | | "mask": { |
| | | "description": "子网掩码", |
| | | "type": "string" |
| | | }, |
| | | "networkCard": { |
| | | "description": "网卡", |
| | | "type": "string" |
| | | }, |
| | | "status": { |
| | | "description": "状态(1启用2禁用)", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/model.NetConfigStatus" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | "model.NetConfigStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2 |
| | | ], |
| | | "x-enum-comments": { |
| | | "NetConfigStatusDisabled": "关闭", |
| | | "NetConfigStatusEnabled": "开启" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "NetConfigStatusEnabled", |
| | | "NetConfigStatusDisabled" |
| | | ] |
| | | }, |
| | | "model.Order": { |
| | | "type": "object", |
| | |
| | | "startTime": { |
| | | "type": "integer" |
| | | }, |
| | | "status": { |
| | | "$ref": "#/definitions/model.OrderStatus" |
| | | }, |
| | | "unit": { |
| | | "type": "string" |
| | | }, |
| | | "workOrderId": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "model.Procedures": { |
| | | "model.OrderStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2, |
| | | 3 |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "OrderStatusWaitProcess", |
| | | "OrderStatusProcessing", |
| | | "OrderStatusFinished" |
| | | ] |
| | | }, |
| | | "model.PlcBrand": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "procedure": { |
| | | "description": "request.ProductProcedure 对象", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/request.ProductProcedure" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | "request.ProcedureMaterial": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "type": "number" |
| | | }, |
| | | "materialId": { |
| | | "type": "string" |
| | | }, |
| | | "materialName": { |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.ProcedureWorker": { |
| | | "type": "object", |
| | | "properties": { |
| | | "phoneNum": { |
| | | "type": "string" |
| | | }, |
| | | "workerId": { |
| | | "type": "string" |
| | | }, |
| | | "workerName": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | "model.ProcedureStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2, |
| | | 3 |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "ProcedureStatusWaitProcess", |
| | | "ProcedureStatusProcessing", |
| | | "ProcedureStatusFinished" |
| | | ] |
| | | }, |
| | | "request.ProductProcedure": { |
| | | "model.Procedures": { |
| | | "type": "object", |
| | | "properties": { |
| | | "deviceId": { |
| | |
| | | "endTime": { |
| | | "type": "integer" |
| | | }, |
| | | "inputMaterials": { |
| | | "description": "输入物料列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.ProcedureMaterial" |
| | | } |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "outputMaterials": { |
| | | "description": "输出物料列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.ProcedureMaterial" |
| | | } |
| | | "position": { |
| | | "description": "每个设备可能有多个机位同时生产,用position表示位置", |
| | | "type": "integer" |
| | | }, |
| | | "procedure": { |
| | | "description": "common.ProductProcedure 对象", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/common.ProductProcedure" |
| | | } |
| | | ] |
| | | }, |
| | | "procedureId": { |
| | | "type": "string" |
| | | }, |
| | | "procedureName": { |
| | | "type": "string" |
| | | }, |
| | | "startTime": { |
| | | "type": "integer" |
| | | }, |
| | | "workHours": { |
| | | "type": "number" |
| | | "status": { |
| | | "$ref": "#/definitions/model.ProcedureStatus" |
| | | } |
| | | } |
| | | }, |
| | | "request.AddPlcBrand": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "workers": { |
| | | "description": "人员列表", |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.SendProcessParams": { |
| | | "type": "object", |
| | | "required": [ |
| | | "procedureId" |
| | | ], |
| | | "properties": { |
| | | "position": { |
| | | "type": "integer" |
| | | }, |
| | | "procedureId": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdatePlc": { |
| | | "type": "object", |
| | | "properties": { |
| | | "address": { |
| | | "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:端口名称\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:数据更新频率 0-实时更新 1-1次/秒\" json:\"frequency\"` + "`" + `", |
| | | "type": "string" |
| | | }, |
| | | "baudRate": { |
| | | "description": "串口波特率, method = serial时 用", |
| | | "type": "integer" |
| | | }, |
| | | "brand": { |
| | | "type": "string" |
| | | }, |
| | | "details": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/request.ProcedureWorker" |
| | | "$ref": "#/definitions/model.DevicePlcAddress" |
| | | } |
| | | }, |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "isOpen": { |
| | | "type": "boolean" |
| | | }, |
| | | "method": { |
| | | "$ref": "#/definitions/constvar.PlcMethod" |
| | | }, |
| | | "port": { |
| | | "description": "plc 端口号, method = modbusTCP用", |
| | | "type": "integer" |
| | | }, |
| | | "serialName": { |
| | | "description": "串口名称,method = serial时 用", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.UpdatePlcBrand": { |
| | | "type": "object", |
| | | "properties": { |
| | | "id": { |
| | | "type": "integer" |
| | | }, |
| | | "name": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "response.ListResponse": { |
| | | "type": "object", |
| | | "properties": { |
| | | "code": { |
| | | "type": "integer" |
| | | }, |
| | | "count": { |
| | | "type": "integer" |
| | | }, |
| | | "data": {}, |
| | | "msg": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "response.ProcessParams": { |
| | | "type": "object", |
| | | "properties": { |
| | | "key": { |
| | | "type": "string" |
| | | }, |
| | | "value": {} |
| | | } |
| | | }, |
| | | "response.ProcessParamsResponse": { |
| | | "type": "object", |
| | | "properties": { |
| | | "number": { |
| | | "type": "string" |
| | | }, |
| | | "params": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.ProcessParams" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "response.ProductProgress": { |
| | | "type": "object", |
| | | "properties": { |
| | | "finishNumber": { |
| | | "type": "integer" |
| | | }, |
| | | "plcStatus": { |
| | | "type": "integer" |
| | | }, |
| | | "totalNumber": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "response.TaskCountdown": { |
| | | "type": "object", |
| | | "properties": { |
| | | "countDownHour": { |
| | | "description": "倒计时 时", |
| | | "type": "integer" |
| | | }, |
| | | "countDownMinute": { |
| | | "description": "倒计时 分", |
| | | "type": "integer" |
| | | }, |
| | | "showCountDown": { |
| | | "description": "是否展示倒计时", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |
| | | "response.TaskData": { |
| | | "type": "object", |
| | | "properties": { |
| | | "allProcedures": { |
| | | "type": "array", |
| | | "items": { |
| | | "type": "string" |
| | | } |
| | | }, |
| | | "canStarted": { |
| | | "description": "是否可以开始生产", |
| | | "type": "boolean" |
| | | }, |
| | | "currentProcedureIndex": { |
| | | "type": "integer" |
| | | }, |
| | | "order": { |
| | | "$ref": "#/definitions/model.Order" |
| | | }, |
| | | "position": { |
| | | "description": "当前任务在设备第几个位置", |
| | | "type": "integer" |
| | | }, |
| | | "procedure": { |
| | | "$ref": "#/definitions/model.Procedures" |
| | | } |