From 066a30751bdc20f9e83b34539de71ae392783e1b Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 19 八月 2023 15:58:09 +0800 Subject: [PATCH] 网络配置获取和删除,品牌增删改查 --- docs/swagger.json | 736 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 637 insertions(+), 99 deletions(-) diff --git a/docs/swagger.json b/docs/swagger.json index f5af4d2..d175615 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4,23 +4,55 @@ "contact": {} }, "paths": { - "/api/base/login": { - "post": { + "/v1/cc/nn": { + "get": { "produces": [ "application/json" ], "tags": [ - "Base" + "Config" ], - "summary": "鐢ㄦ埛鐧诲綍", + "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": "鏌ヨ鍙傛暟", + "description": "鍙傛暟", "name": "object", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.Login" + "$ref": "#/definitions/model.NetConfig" } } ], @@ -36,7 +68,339 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/response.LoginResponse" + "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": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "浠诲姟缁撴潫", + "parameters": [ + { + "type": "integer", + "description": "宸ュ簭id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/v1/task/get": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "鑾峰彇浠诲姟", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/response.TaskData" + } + } + } + ] + } + } + } + } + }, + "/v1/task/sendProcessParams/{id}": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "涓嬪彂宸ヨ壓鍙傛暟", + "parameters": [ + { + "type": "integer", + "description": "宸ュ簭id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/contextx.Response" + } + } + } + } + }, + "/v1/task/start/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Task" + ], + "summary": "浠诲姟寮�濮�", + "parameters": [ + { + "type": "integer", + "description": "宸ュ簭id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/response.ProcessParams" + } } } } @@ -48,23 +412,89 @@ } }, "definitions": { - "constvar.UserType": { - "type": "integer", - "enum": [ - 1, - 2, - 3 - ], - "x-enum-comments": { - "UserTypePrimary": "涓昏处鎴�", - "UserTypeSub": "瀛愯处鎴�", - "UserTypeSuper": "瓒呯骇绠$悊鍛�" - }, - "x-enum-varnames": [ - "UserTypeSuper", - "UserTypePrimary", - "UserTypeSub" - ] + "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", @@ -78,121 +508,229 @@ } } }, - "model.User": { + "model.NetConfig": { "type": "object", + "required": [ + "gateway", + "ip", + "mask", + "networkCard" + ], "properties": { - "companyCity": { + "dns": { + "description": "dns", "type": "string" }, - "companyContact": { - "type": "string" - }, - "companyEmail": { - "type": "string" - }, - "companyLogo": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "companyProvince": { - "type": "string" - }, - "companyTrade": { - "type": "string" - }, - "createAt": { - "description": "鍒涘缓鏃堕棿", - "type": "string" - }, - "enable": { - "type": "boolean" - }, - "headerImage": { + "gateway": { + "description": "缃戝叧", "type": "string" }, "id": { - "type": "string" + "type": "integer" }, "ip": { + "description": "鏈満ip", "type": "string" }, - "menuIds": { - "description": "鑿滃崟ID鍒楄〃", - "type": "array", - "items": { - "type": "integer" - } - }, - "nickName": { + "mask": { + "description": "瀛愮綉鎺╃爜", "type": "string" }, - "parentId": { - "type": "string" - }, - "parentName": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "port": { - "type": "string" - }, - "pos": { + "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", + "properties": { + "amount": { + "type": "number" + }, + "customer": { + "type": "string" + }, + "deliverDate": { + "type": "string" + }, + "endTime": { "type": "integer" }, - "systemName": { + "orderAttr": { + "description": "璁㈠崟灞炴�ф嫾鎺ョ殑瀛楃涓诧紝鍗宠揣鐗╂弿杩�", "type": "string" }, - "updateAt": { - "description": "鏇存柊鏃堕棿", + "orderId": { "type": "string" }, - "userType": { - "$ref": "#/definitions/constvar.UserType" + "parameter": { + "type": "string" }, - "username": { + "productId": { + "type": "string" + }, + "productName": { + "type": "string" + }, + "startTime": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/model.OrderStatus" + }, + "unit": { + "type": "string" + }, + "workOrderId": { "type": "string" } } }, - "request.Login": { + "model.OrderStatus": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-varnames": [ + "OrderStatusUnFinished", + "OrderStatusFinished" + ] + }, + "model.PlcBrand": { "type": "object", "properties": { - "captcha": { - "description": "楠岃瘉鐮�", - "type": "string" + "id": { + "type": "integer" }, - "captchaId": { - "description": "楠岃瘉鐮両D", - "type": "string" - }, - "password": { - "description": "瀵嗙爜", - "type": "string" - }, - "username": { - "description": "鐢ㄦ埛鍚�", + "name": { "type": "string" } } }, - "response.LoginResponse": { + "model.ProcedureStatus": { + "type": "integer", + "enum": [ + 1, + 2 + ], + "x-enum-varnames": [ + "ProcedureStatusUnFinished", + "ProcedureStatusFinished" + ] + }, + "model.Procedures": { "type": "object", "properties": { - "expiresAt": { + "endTime": { "type": "integer" }, - "token": { + "id": { + "type": "integer" + }, + "procedure": { + "description": "common.ProductProcedure 瀵硅薄", + "allOf": [ + { + "$ref": "#/definitions/common.ProductProcedure" + } + ] + }, + "startTime": { + "type": "integer" + }, + "status": { + "$ref": "#/definitions/model.ProcedureStatus" + } + } + }, + "request.AddPlcBrand": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "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" }, - "user": { - "$ref": "#/definitions/model.User" + "value": {} + } + }, + "response.TaskData": { + "type": "object", + "properties": { + "deviceName": { + "type": "string" + }, + "deviceStatus": { + "type": "string" + }, + "nextProcedure": { + "$ref": "#/definitions/model.Procedures" + }, + "order": { + "$ref": "#/definitions/model.Order" + }, + "procedure": { + "$ref": "#/definitions/model.Procedures" } } } -- Gitblit v1.8.0