From 066a30751bdc20f9e83b34539de71ae392783e1b Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 19 八月 2023 15:58:09 +0800 Subject: [PATCH] 网络配置获取和删除,品牌增删改查 --- docs/docs.go | 564 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 494 insertions(+), 70 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index c7aeffc..4b11609 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -16,6 +16,282 @@ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/v1/cc/nn": { + "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" + } + } + } + } + ] + } + } + } + }, + "put": { + "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/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" + } + } + } + } + ] + } + } + } + }, + "put": { + "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/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/finish/{id}": { "put": { "produces": [ @@ -148,6 +424,90 @@ } }, "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": { + "deviceId": { + "type": "string" + }, + "deviceName": { + "type": "string" + }, + "endTime": { + "type": "integer" + }, + "inputMaterials": { + "description": "杈撳叆鐗╂枡鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/common.ProcedureMaterial" + } + }, + "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" + } + } + } + }, "contextx.Response": { "type": "object", "properties": { @@ -159,6 +519,63 @@ "type": "string" } } + }, + "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", @@ -194,6 +611,9 @@ "startTime": { "type": "integer" }, + "status": { + "$ref": "#/definitions/model.OrderStatus" + }, "unit": { "type": "string" }, @@ -202,103 +622,98 @@ } } }, - "model.Procedures": { + "model.OrderStatus": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-varnames": [ + "OrderStatusUnFinished", + "OrderStatusFinished" + ] + }, + "model.PlcBrand": { "type": "object", "properties": { "id": { "type": "integer" }, + "name": { + "type": "string" + } + } + }, + "model.ProcedureStatus": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-varnames": [ + "ProcedureStatusUnFinished", + "ProcedureStatusFinished" + ] + }, + "model.Procedures": { + "type": "object", + "properties": { + "endTime": { + "type": "integer" + }, + "id": { + "type": "integer" + }, "procedure": { - "description": "request.ProductProcedure 瀵硅薄", + "description": "common.ProductProcedure 瀵硅薄", "allOf": [ { - "$ref": "#/definitions/request.ProductProcedure" + "$ref": "#/definitions/common.ProductProcedure" } ] - } - } - }, - "request.ProcedureMaterial": { - "type": "object", - "properties": { - "amount": { - "type": "number" - }, - "materialId": { - "type": "string" - }, - "materialName": { - "type": "string" - }, - "unit": { - "type": "string" - } - } - }, - "request.ProcedureWorker": { - "type": "object", - "properties": { - "endTime": { - "type": "integer" - }, - "phoneNum": { - "type": "string" }, "startTime": { "type": "integer" }, - "workerId": { - "type": "string" + "status": { + "$ref": "#/definitions/model.ProcedureStatus" + } + } + }, + "request.AddPlcBrand": { + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "workerName": { + "name": { "type": "string" } } }, - "request.ProductProcedure": { + "request.UpdatePlcBrand": { "type": "object", "properties": { - "deviceId": { - "type": "string" - }, - "deviceName": { - "type": "string" - }, - "endTime": { + "id": { "type": "integer" }, - "inputMaterials": { - "description": "杈撳叆鐗╂枡鍒楄〃", - "type": "array", - "items": { - "$ref": "#/definitions/request.ProcedureMaterial" - } - }, - "outputMaterials": { - "description": "杈撳嚭鐗╂枡鍒楄〃", - "type": "array", - "items": { - "$ref": "#/definitions/request.ProcedureMaterial" - } - }, - "procedureId": { + "name": { "type": "string" - }, - "procedureName": { - "type": "string" - }, - "startTime": { + } + } + }, + "response.ListResponse": { + "type": "object", + "properties": { + "code": { "type": "integer" }, - "workHours": { - "type": "number" + "count": { + "type": "integer" }, - "workers": { - "description": "浜哄憳鍒楄〃", - "type": "array", - "items": { - "$ref": "#/definitions/request.ProcedureWorker" - } + "data": {}, + "msg": { + "type": "string" } } }, @@ -314,6 +729,15 @@ "response.TaskData": { "type": "object", "properties": { + "deviceName": { + "type": "string" + }, + "deviceStatus": { + "type": "string" + }, + "nextProcedure": { + "$ref": "#/definitions/model.Procedures" + }, "order": { "$ref": "#/definitions/model.Order" }, -- Gitblit v1.8.0