From ef7d02ce56e98e8cbc5ed6ec746ea39bf0b8c9e2 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 16 九月 2023 22:44:58 +0800 Subject: [PATCH] 增加实时获取生产进度接口 --- docs/docs.go | 68 ++++++++++++++++++++++++++++++++-- 1 files changed, 64 insertions(+), 4 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 307d0b1..02797c6 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": "瀹炴椂鑾峰彇鐢熶骇杩涘害", "parameters": [ { "description": "鏌ヨ鍙傛暟", @@ -439,7 +481,7 @@ } } }, - "/v1/task/sendProcessParams/{id}": { + "/v1/task/sendProcessParams": { "post": { "produces": [ "application/json" @@ -551,6 +593,13 @@ "common.ProductProcedure": { "type": "object", "properties": { + "allProcedureNames": { + "description": "鎵�灞炲伐鍗曞伐搴忓垪琛�", + "type": "array", + "items": { + "type": "string" + } + }, "deviceId": { "type": "string" }, @@ -605,11 +654,15 @@ "type": "string", "enum": [ "modbusTCP", - "serial" + "serial", + "缃戠粶", + "涓插彛" ], "x-enum-varnames": [ "PlcMethodModbusTCP", - "PlcMethodSerial" + "PlcMethodSerial", + "PlcMethodModbusTCPChinese", + "PlcMethodSerialChinese" ] }, "constvar.PlcStartAddressType": { @@ -698,6 +751,10 @@ }, "length": { "description": "鏁版嵁闀垮害", + "type": "integer" + }, + "position": { + "description": "鏁版嵁璧峰鍦板潃", "type": "integer" }, "startAddress": { @@ -1007,6 +1064,9 @@ "finishNumber": { "type": "integer" }, + "plcStatus": { + "type": "integer" + }, "totalNumber": { "type": "integer" } -- Gitblit v1.8.0