From cf96f6bc1fb484fde16bd5ed6d49534c96958022 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期一, 25 九月 2023 15:43:12 +0800 Subject: [PATCH] fix --- docs/docs.go | 202 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 191 insertions(+), 11 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index d76cf46..1ce5044 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -153,7 +153,7 @@ } }, "/v1/plc/productProgress": { - "get": { + "post": { "produces": [ "application/json" ], @@ -161,6 +161,48 @@ "鐢熶骇鏁伴噺" ], "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": "鎴愬姛", @@ -418,6 +460,51 @@ "type": "object", "properties": { "data": { + "$ref": "#/definitions/response.TaskResponse" + } + } + } + ] + } + } + } + } + }, + "/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" } } @@ -428,7 +515,7 @@ } } }, - "/v1/task/sendProcessParams/{id}": { + "/v1/task/sendProcessParams": { "post": { "produces": [ "application/json" @@ -439,11 +526,13 @@ "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": { @@ -538,6 +627,17 @@ "common.ProductProcedure": { "type": "object", "properties": { + "allProcedureNames": { + "description": "鎵�灞炲伐鍗曞伐搴忓垪琛�", + "type": "array", + "items": { + "type": "string" + } + }, + "channel": { + "description": "閫氶亾搴忓彿", + "type": "integer" + }, "deviceId": { "type": "string" }, @@ -588,15 +688,27 @@ } } }, + "conf.Prompt": { + "type": "object", + "properties": { + "safeProduce": { + "type": "string" + } + } + }, "constvar.PlcMethod": { "type": "string", "enum": [ "modbusTCP", - "serial" + "serial", + "缃戠粶", + "涓插彛" ], "x-enum-varnames": [ "PlcMethodModbusTCP", - "PlcMethodSerial" + "PlcMethodSerial", + "PlcMethodModbusTCPChinese", + "PlcMethodSerialChinese" ] }, "constvar.PlcStartAddressType": { @@ -637,7 +749,7 @@ "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\"` + "`" + `", + "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `", "type": "string" }, "baudRate": { @@ -675,6 +787,10 @@ "model.DevicePlcAddress": { "type": "object", "properties": { + "channel": { + "description": "鏁版嵁璧峰鍦板潃", + "type": "integer" + }, "fieldName": { "description": "瀵瑰簲绯荤粺瀛楁", "allOf": [ @@ -843,6 +959,10 @@ "model.Procedures": { "type": "object", "properties": { + "channel": { + "description": "閫氶亾", + "type": "integer" + }, "deviceId": { "type": "string" }, @@ -882,11 +1002,25 @@ } } }, + "request.SendProcessParams": { + "type": "object", + "required": [ + "procedureId" + ], + "properties": { + "channel": { + "type": "integer" + }, + "procedureId": { + "type": "integer" + } + } + }, "request.UpdatePlc": { "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\"` + "`" + `", + "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `", "type": "string" }, "baudRate": { @@ -976,6 +1110,9 @@ "finishNumber": { "type": "integer" }, + "plcStatus": { + "type": "integer" + }, "totalNumber": { "type": "integer" } @@ -1007,6 +1144,14 @@ "type": "string" } }, + "canStarted": { + "description": "鏄惁鍙互寮�濮嬬敓浜�", + "type": "boolean" + }, + "channel": { + "description": "褰撳墠浠诲姟鍦ㄨ澶囩鍑犱釜閫氶亾", + "type": "integer" + }, "currentProcedureIndex": { "type": "integer" }, @@ -1017,6 +1162,41 @@ "$ref": "#/definitions/model.Procedures" } } + }, + "response.TaskResponse": { + "type": "object", + "properties": { + "channelAmount": { + "description": "閫氶亾鏁伴噺", + "type": "integer" + }, + "prompt": { + "description": "鎻愮ず璇�", + "allOf": [ + { + "$ref": "#/definitions/conf.Prompt" + } + ] + }, + "taskCount": { + "description": "浠诲姟鏁伴噺", + "type": "integer" + }, + "tasks": { + "description": "浠诲姟鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/response.TaskData" + } + }, + "workers": { + "description": "浜哄憳鍒楄〃", + "type": "array", + "items": { + "$ref": "#/definitions/common.ProcedureWorker" + } + } + } } } }` -- Gitblit v1.8.0