| | |
| | | } |
| | | } |
| | | }, |
| | | "/v1/device/list": { |
| | | "/v1/device/config": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "Device" |
| | | "设备" |
| | | ], |
| | | "summary": "设置设备一些配置", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.DeviceConfig" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/device/list": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "设备" |
| | | ], |
| | | "summary": "获取当前面板绑定的设备列表", |
| | | "responses": { |
| | |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.SendProcessParams" |
| | | "$ref": "#/definitions/request.GetProductProgress" |
| | | } |
| | | } |
| | | ], |
| | |
| | | "summary": "获取工艺模型列表", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "description": "当前正在使用的工艺参数编号", |
| | | "name": "number", |
| | | "in": "query", |
| | | "required": true |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | | "name": "page", |
| | |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/model.ProcessModel" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/v1/system/problemList": { |
| | | "get": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "系统" |
| | | ], |
| | | "summary": "问题诊断/问题列表", |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/contextx.Response" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/problem.CheckResult" |
| | | } |
| | | } |
| | | } |
| | |
| | | ], |
| | | "summary": "获取任务", |
| | | "parameters": [ |
| | | { |
| | | "type": "string", |
| | | "name": "deviceID", |
| | | "in": "query" |
| | | }, |
| | | { |
| | | "type": "integer", |
| | | "description": "页码", |
| | |
| | | "type": "string", |
| | | "enum": [ |
| | | "string", |
| | | "int" |
| | | "int16", |
| | | "int32" |
| | | ], |
| | | "x-enum-varnames": [ |
| | | "PlcStartAddressValueTypeString", |
| | | "PlcStartAddressValueTypeInt" |
| | | "PlcStartAddressValueTypeInt16", |
| | | "PlcStartAddressValueTypeInt32" |
| | | ] |
| | | }, |
| | | "constvar.ProblemCode": { |
| | | "type": "string", |
| | | "enum": [ |
| | | "service", |
| | | "network", |
| | | "db", |
| | | "serf", |
| | | "cloud", |
| | | "device", |
| | | "process_model", |
| | | "plc_config", |
| | | "plc_address_list", |
| | | "plc_process_model_address_list", |
| | | "plc_connect" |
| | | ], |
| | | "x-enum-comments": { |
| | | "ProblemCodeCloud": "未连接云端", |
| | | "ProblemCodeDB": "数据库连接错误", |
| | | "ProblemCodeDevice": "未绑定设备", |
| | | "ProblemCodeNetwork": "网络错误", |
| | | "ProblemCodePlcAddressList": "plc地址表缺失", |
| | | "ProblemCodePlcConfig": "plc配置缺失", |
| | | "ProblemCodePlcConnect": "plc连接失败", |
| | | "ProblemCodePlcProcessModelAddressList": "plc地址表缺失", |
| | | "ProblemCodeProcessModel": "工艺参数缺失", |
| | | "ProblemCodeSerf": "未加入serf集群", |
| | | "ProblemCodeService": "服务不可用" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "ProblemCodeService", |
| | | "ProblemCodeNetwork", |
| | | "ProblemCodeDB", |
| | | "ProblemCodeSerf", |
| | | "ProblemCodeCloud", |
| | | "ProblemCodeDevice", |
| | | "ProblemCodeProcessModel", |
| | | "ProblemCodePlcConfig", |
| | | "ProblemCodePlcAddressList", |
| | | "ProblemCodePlcProcessModelAddressList", |
| | | "ProblemCodePlcConnect" |
| | | ] |
| | | }, |
| | | "constvar.TaskMode": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "problem.CheckResult": { |
| | | "type": "object", |
| | | "properties": { |
| | | "checkResult": { |
| | | "type": "boolean" |
| | | }, |
| | | "itemCode": { |
| | | "$ref": "#/definitions/constvar.ProblemCode" |
| | | }, |
| | | "itemName": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.AddPlcBrand": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | }, |
| | | "updatedAt": { |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.DeviceConfig": { |
| | | "type": "object", |
| | | "properties": { |
| | | "needSetProcessParams": { |
| | | "description": "是否需要设置工艺参数", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetProductProgress": { |
| | | "type": "object", |
| | | "properties": { |
| | | "channel": { |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | "response.Device": { |
| | | "type": "object", |
| | | "properties": { |
| | | "deviceID": { |
| | | "type": "string" |
| | | }, |
| | | "deviceName": { |
| | | "type": "string" |
| | | }, |
| | | "needSetProcessParams": { |
| | | "description": "是否需要设置工艺参数", |
| | | "type": "boolean" |
| | | } |
| | | } |
| | | }, |
| | | "response.DeviceListResponse": { |
| | | "type": "object", |
| | | "properties": { |
| | | "clusterNodeQuantity": { |
| | | "description": "集群节点数量", |
| | | "type": "integer" |
| | | }, |
| | | "clusterStatus": { |
| | | "description": "集群状态", |
| | | "type": "string" |
| | | }, |
| | | "currentDeviceID": { |
| | | "description": "当前选定的生产设备", |
| | | "type": "string" |
| | | }, |
| | | "deviceIDList": { |
| | | "deviceList": { |
| | | "description": "生产设备id列表", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "string" |
| | | "$ref": "#/definitions/response.Device" |
| | | } |
| | | }, |
| | | "systemDeviceID": { |
| | | "description": "工控机设备ID", |
| | | "type": "string" |
| | | }, |
| | | "systemDeviceRunSince": { |
| | | "description": "系统运行开始时间戳", |
| | | "type": "integer" |
| | | }, |
| | | "systemDeviceStatus": { |
| | | "description": "设备状态", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/response.SystemDeviceStatus" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | "response.ProductProgress": { |
| | | "type": "object", |
| | | "properties": { |
| | | "RealEndTime": { |
| | | "type": "integer" |
| | | }, |
| | | "RealStartTime": { |
| | | "type": "integer" |
| | | }, |
| | | "finishNumber": { |
| | | "type": "integer" |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | "response.SystemDeviceStatus": { |
| | | "type": "integer", |
| | | "enum": [ |
| | | 1, |
| | | 2 |
| | | ], |
| | | "x-enum-comments": { |
| | | "SystemDeviceStatusNormal": "正常", |
| | | "SystemDeviceStatusUnNormal": "异常" |
| | | }, |
| | | "x-enum-varnames": [ |
| | | "SystemDeviceStatusNormal", |
| | | "SystemDeviceStatusUnNormal" |
| | | ] |
| | | }, |
| | | "response.TaskCountdown": { |
| | | "type": "object", |
| | | "properties": { |