From c073c915b23db5a3bde659ceed21849b5d0e484c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期日, 08 十月 2023 10:34:31 +0800
Subject: [PATCH] 获取任务去掉时间限制
---
docs/docs.go | 1222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 1,136 insertions(+), 86 deletions(-)
diff --git a/docs/docs.go b/docs/docs.go
index 40f438e..1ad485b 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -16,23 +16,55 @@
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
- "/v1/notice/task/start": {
+ "/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"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
"post": {
"produces": [
"application/json"
],
"tags": [
- "Base"
+ "Config"
],
- "summary": "浠诲姟寮�鍚�氱煡",
+ "summary": "璁剧疆缃戠粶閰嶇疆",
"parameters": [
{
- "description": "鏌ヨ鍙傛暟",
+ "description": "鍙傛暟",
"name": "object",
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/request.TaskInfo"
+ "$ref": "#/definitions/model.NetConfig"
}
}
],
@@ -48,7 +80,536 @@
"type": "object",
"properties": {
"data": {
- "$ref": "#/definitions/response.LoginResponse"
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/response.ProcessParams"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/v1/config/plc": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Config"
+ ],
+ "summary": "鑾峰彇plc閰嶇疆",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/contextx.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/model.DevicePlc"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Config"
+ ],
+ "summary": "鏇存柊plc閰嶇疆",
+ "parameters": [
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.UpdatePlc"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
+ "/v1/plc/productProgress": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鐢熶骇鏁伴噺"
+ ],
+ "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": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/contextx.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/response.ProductProgress"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/v1/plc/setProductNumber": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鐢熶骇鏁伴噺"
+ ],
+ "summary": "璁剧疆鐢熶骇鎬婚噺",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/contextx.Response"
+ }
+ }
+ }
+ }
+ },
+ "/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/processModel/list": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "宸ヨ壓妯″瀷"
+ ],
+ "summary": "鑾峰彇宸ヨ壓妯″瀷鍒楄〃",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "褰撳墠姝e湪浣跨敤鐨勫伐鑹哄弬鏁扮紪鍙�",
+ "name": "number",
+ "in": "query",
+ "required": true
+ },
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "褰撳墠鐨勫伐搴廼d",
+ "name": "procedureId",
+ "in": "query",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/contextx.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/response.TaskCountdown"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/v1/task/countdown": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Task"
+ ],
+ "summary": "鏂颁换鍔″�掕鏃�",
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/contextx.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/response.TaskCountdown"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/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": "鑾峰彇浠诲姟",
+ "parameters": [
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ },
+ {
+ "enum": [
+ 1,
+ 2,
+ 3
+ ],
+ "type": "integer",
+ "x-enum-comments": {
+ "TaskModeCurrent": "鏈紑濮嬬殑鍜岃繘琛屼腑鐨�",
+ "TaskModeLastFinished": "涓婁竴涓粨鏉熺殑",
+ "TaskModeUnStarted": "鏈紑濮嬬殑"
+ },
+ "x-enum-varnames": [
+ "TaskModeUnStarted",
+ "TaskModeCurrent",
+ "TaskModeLastFinished"
+ ],
+ "name": "taskMode",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/contextx.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/response.TaskResponse"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ },
+ "/v1/task/sendProcessParams": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "Task"
+ ],
+ "summary": "涓嬪彂宸ヨ壓鍙傛暟锛堝紑濮嬩换鍔★級",
+ "parameters": [
+ {
+ "description": "鏌ヨ鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.SendProcessParams"
+ }
+ }
+ ],
+ "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": {
+ "$ref": "#/definitions/response.ProcessParamsResponse"
}
}
}
@@ -60,7 +621,156 @@
}
},
"definitions": {
- "constvar.UserType": {
+ "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": {
+ "allProcedureNames": {
+ "description": "鎵�灞炲伐鍗曞伐搴忓垪琛�",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "channel": {
+ "description": "閫氶亾搴忓彿",
+ "type": "integer"
+ },
+ "deviceId": {
+ "type": "string"
+ },
+ "deviceName": {
+ "type": "string"
+ },
+ "endTime": {
+ "type": "integer"
+ },
+ "inputMaterials": {
+ "description": "杈撳叆鐗╂枡鍒楄〃",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/common.ProcedureMaterial"
+ }
+ },
+ "nextProcedureId": {
+ "type": "string"
+ },
+ "nextProcedureName": {
+ "type": "string"
+ },
+ "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"
+ }
+ }
+ }
+ },
+ "conf.Prompt": {
+ "type": "object",
+ "properties": {
+ "plcNotConnected": {
+ "type": "string"
+ },
+ "safeProduce": {
+ "type": "string"
+ }
+ }
+ },
+ "constvar.PlcMethod": {
+ "type": "string",
+ "enum": [
+ "modbusTCP",
+ "serial",
+ "缃戠粶",
+ "涓插彛"
+ ],
+ "x-enum-varnames": [
+ "PlcMethodModbusTCP",
+ "PlcMethodSerial",
+ "PlcMethodModbusTCPChinese",
+ "PlcMethodSerialChinese"
+ ]
+ },
+ "constvar.PlcStartAddressType": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2
+ ],
+ "x-enum-varnames": [
+ "PlcStartAddressTypeFinishNumber",
+ "PlcStartAddressTypeTotalNumber"
+ ]
+ },
+ "constvar.PlcStartAddressValueType": {
+ "type": "string",
+ "enum": [
+ "string",
+ "int"
+ ],
+ "x-enum-varnames": [
+ "PlcStartAddressValueTypeString",
+ "PlcStartAddressValueTypeInt"
+ ]
+ },
+ "constvar.TaskMode": {
"type": "integer",
"enum": [
1,
@@ -68,14 +778,14 @@
3
],
"x-enum-comments": {
- "UserTypePrimary": "涓昏处鎴�",
- "UserTypeSub": "瀛愯处鎴�",
- "UserTypeSuper": "瓒呯骇绠$悊鍛�"
+ "TaskModeCurrent": "鏈紑濮嬬殑鍜岃繘琛屼腑鐨�",
+ "TaskModeLastFinished": "涓婁竴涓粨鏉熺殑",
+ "TaskModeUnStarted": "鏈紑濮嬬殑"
},
"x-enum-varnames": [
- "UserTypeSuper",
- "UserTypePrimary",
- "UserTypeSub"
+ "TaskModeUnStarted",
+ "TaskModeCurrent",
+ "TaskModeLastFinished"
]
},
"contextx.Response": {
@@ -90,125 +800,465 @@
}
}
},
- "model.User": {
+ "model.DevicePlc": {
"type": "object",
"properties": {
- "companyCity": {
+ "address": {
+ "description": "PortName string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency int ` + "`" + `gorm:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `",
"type": "string"
},
- "companyContact": {
+ "baudRate": {
+ "description": "涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢�",
+ "type": "integer"
+ },
+ "brand": {
"type": "string"
},
- "companyEmail": {
- "type": "string"
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/model.DevicePlcAddress"
+ }
},
- "companyLogo": {
- "type": "string"
+ "id": {
+ "type": "integer"
},
- "companyName": {
- "type": "string"
- },
- "companyProvince": {
- "type": "string"
- },
- "companyTrade": {
- "type": "string"
- },
- "createAt": {
- "description": "鍒涘缓鏃堕棿",
- "type": "string"
- },
- "enable": {
+ "isOpen": {
"type": "boolean"
},
- "headerImage": {
+ "method": {
+ "$ref": "#/definitions/constvar.PlcMethod"
+ },
+ "port": {
+ "description": "plc 绔彛鍙凤紝 method = modbusTCP鐢�",
+ "type": "integer"
+ },
+ "serialName": {
+ "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�",
+ "type": "string"
+ }
+ }
+ },
+ "model.DevicePlcAddress": {
+ "type": "object",
+ "properties": {
+ "channel": {
+ "description": "鏁版嵁璧峰鍦板潃",
+ "type": "integer"
+ },
+ "fieldName": {
+ "description": "瀵瑰簲绯荤粺瀛楁",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.PlcStartAddressType"
+ }
+ ]
+ },
+ "length": {
+ "description": "鏁版嵁闀垮害",
+ "type": "integer"
+ },
+ "startAddress": {
+ "description": "鏁版嵁璧峰鍦板潃",
+ "type": "integer"
+ },
+ "type": {
+ "description": "鏁版嵁绫诲瀷",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.PlcStartAddressValueType"
+ }
+ ]
+ }
+ }
+ },
+ "model.NetConfig": {
+ "type": "object",
+ "required": [
+ "gateway",
+ "ip",
+ "mask",
+ "networkCard"
+ ],
+ "properties": {
+ "dns": {
+ "description": "dns",
+ "type": "string"
+ },
+ "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": {
- "type": "integer"
- },
- "systemName": {
- "type": "string"
- },
- "updateAt": {
- "description": "鏇存柊鏃堕棿",
- "type": "string"
- },
- "userType": {
- "$ref": "#/definitions/constvar.UserType"
- },
- "username": {
- "type": "string"
+ "description": "鐘舵�侊紙1鍚敤2绂佺敤锛�",
+ "allOf": [
+ {
+ "$ref": "#/definitions/model.NetConfigStatus"
+ }
+ ]
}
}
},
- "request.TaskInfo": {
+ "model.NetConfigStatus": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2
+ ],
+ "x-enum-comments": {
+ "NetConfigStatusDisabled": "鍏抽棴",
+ "NetConfigStatusEnabled": "寮�鍚�"
+ },
+ "x-enum-varnames": [
+ "NetConfigStatusEnabled",
+ "NetConfigStatusDisabled"
+ ]
+ },
+ "model.Order": {
"type": "object",
"properties": {
- "device": {
- "description": "璁惧",
+ "amount": {
+ "type": "number"
+ },
+ "customer": {
+ "type": "string"
+ },
+ "deliverDate": {
+ "type": "string"
+ },
+ "endTime": {
+ "type": "integer"
+ },
+ "orderAttr": {
+ "description": "璁㈠崟灞炴�ф嫾鎺ョ殑瀛楃涓诧紝鍗宠揣鐗╂弿杩�",
"type": "string"
},
"orderId": {
- "description": "璁㈠崟鍙�",
"type": "string"
},
- "password": {
- "description": "浜у搧",
+ "parameter": {
"type": "string"
},
- "procedure": {
- "description": "宸ュ簭",
+ "productId": {
"type": "string"
},
- "workOrder": {
- "description": "宸ュ崟",
+ "productName": {
+ "type": "string"
+ },
+ "startTime": {
+ "type": "integer"
+ },
+ "status": {
+ "$ref": "#/definitions/model.OrderStatus"
+ },
+ "unit": {
+ "type": "string"
+ },
+ "workOrderId": {
"type": "string"
}
}
},
- "response.LoginResponse": {
+ "model.OrderStatus": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2,
+ 3
+ ],
+ "x-enum-varnames": [
+ "OrderStatusWaitProcess",
+ "OrderStatusProcessing",
+ "OrderStatusFinished"
+ ]
+ },
+ "model.PlcBrand": {
"type": "object",
"properties": {
- "expiresAt": {
+ "id": {
"type": "integer"
},
- "token": {
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "model.ProcedureStatus": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2,
+ 3
+ ],
+ "x-enum-varnames": [
+ "ProcedureStatusWaitProcess",
+ "ProcedureStatusProcessing",
+ "ProcedureStatusFinished"
+ ]
+ },
+ "model.Procedures": {
+ "type": "object",
+ "properties": {
+ "channel": {
+ "description": "閫氶亾",
+ "type": "integer"
+ },
+ "deviceId": {
"type": "string"
},
- "user": {
- "$ref": "#/definitions/model.User"
+ "endTime": {
+ "type": "integer"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "procedure": {
+ "description": "common.ProductProcedure 瀵硅薄",
+ "allOf": [
+ {
+ "$ref": "#/definitions/common.ProductProcedure"
+ }
+ ]
+ },
+ "procedureId": {
+ "type": "string"
+ },
+ "startTime": {
+ "type": "integer"
+ },
+ "status": {
+ "$ref": "#/definitions/model.ProcedureStatus"
+ }
+ }
+ },
+ "request.AddPlcBrand": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "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:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `",
+ "type": "string"
+ },
+ "baudRate": {
+ "description": "涓插彛娉㈢壒鐜囷紝 method = serial鏃� 鐢�",
+ "type": "integer"
+ },
+ "brand": {
+ "type": "string"
+ },
+ "details": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/model.DevicePlcAddress"
+ }
+ },
+ "id": {
+ "type": "integer"
+ },
+ "isOpen": {
+ "type": "boolean"
+ },
+ "method": {
+ "$ref": "#/definitions/constvar.PlcMethod"
+ },
+ "port": {
+ "description": "plc 绔彛鍙凤紝 method = modbusTCP鐢�",
+ "type": "integer"
+ },
+ "serialName": {
+ "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�",
+ "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.Message": {
+ "type": "object",
+ "properties": {
+ "data": {},
+ "event": {
+ "type": "string"
+ }
+ }
+ },
+ "response.ProcessParams": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "value": {}
+ }
+ },
+ "response.ProcessParamsResponse": {
+ "type": "object",
+ "properties": {
+ "number": {
+ "type": "string"
+ },
+ "params": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/response.ProcessParams"
+ }
+ }
+ }
+ },
+ "response.ProductProgress": {
+ "type": "object",
+ "properties": {
+ "finishNumber": {
+ "type": "integer"
+ },
+ "plcStatus": {
+ "type": "integer"
+ },
+ "totalNumber": {
+ "type": "integer"
+ }
+ }
+ },
+ "response.TaskCountdown": {
+ "type": "object",
+ "properties": {
+ "countDownHour": {
+ "description": "鍊掕鏃� 鏃�",
+ "type": "integer"
+ },
+ "countDownMinute": {
+ "description": "鍊掕鏃� 鍒�",
+ "type": "integer"
+ },
+ "showCountDown": {
+ "description": "鏄惁灞曠ず鍊掕鏃�",
+ "type": "boolean"
+ }
+ }
+ },
+ "response.TaskData": {
+ "type": "object",
+ "properties": {
+ "allProcedures": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "canStarted": {
+ "description": "鏄惁鍙互寮�濮嬬敓浜�",
+ "type": "boolean"
+ },
+ "channel": {
+ "description": "褰撳墠浠诲姟鍦ㄨ澶囩鍑犱釜閫氶亾",
+ "type": "integer"
+ },
+ "currentProcedureIndex": {
+ "type": "integer"
+ },
+ "order": {
+ "$ref": "#/definitions/model.Order"
+ },
+ "procedure": {
+ "$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