From 53d80c839ad2aad0a0482ca43fca1fc3a95b9d1c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 03 十一月 2023 17:30:54 +0800
Subject: [PATCH] 更改路由

---
 docs/docs.go |  570 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 525 insertions(+), 45 deletions(-)

diff --git a/docs/docs.go b/docs/docs.go
index aea2cf6..df8f13f 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -152,6 +152,67 @@
                 }
             }
         },
+        "/v1/device/list": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "璁惧"
+                ],
+                "summary": "鑾峰彇褰撳墠闈㈡澘缁戝畾鐨勮澶囧垪琛�",
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/contextx.Response"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "$ref": "#/definitions/response.DeviceListResponse"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/v1/device/setCurrentDeviceId": {
+            "post": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "璁惧"
+                ],
+                "summary": "璁剧疆褰撳墠璁惧id",
+                "parameters": [
+                    {
+                        "description": "鏌ヨ鍙傛暟",
+                        "name": "object",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.SetCurrentDevice"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "$ref": "#/definitions/contextx.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/v1/plc/productProgress": {
             "post": {
                 "produces": [
@@ -168,41 +229,10 @@
                         "in": "body",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/request.SendProcessParams"
+                            "$ref": "#/definitions/request.GetProductProgress"
                         }
                     }
                 ],
-                "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": "鎴愬姛",
@@ -377,13 +407,6 @@
                 "summary": "鑾峰彇宸ヨ壓妯″瀷鍒楄〃",
                 "parameters": [
                     {
-                        "type": "string",
-                        "description": "褰撳墠姝e湪浣跨敤鐨勫伐鑹哄弬鏁扮紪鍙�",
-                        "name": "number",
-                        "in": "query",
-                        "required": true
-                    },
-                    {
                         "type": "integer",
                         "description": "椤电爜",
                         "name": "page",
@@ -415,7 +438,44 @@
                                     "type": "object",
                                     "properties": {
                                         "data": {
-                                            "$ref": "#/definitions/response.TaskCountdown"
+                                            "type": "array",
+                                            "items": {
+                                                "$ref": "#/definitions/model.ProcessModel"
+                                            }
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/v1/system/problemList": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "绯荤粺"
+                ],
+                "summary": "闂璇婃柇/闂鍒楄〃",
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/contextx.Response"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "type": "array",
+                                            "items": {
+                                                "$ref": "#/definitions/problem.CheckResult"
+                                            }
                                         }
                                     }
                                 }
@@ -495,6 +555,11 @@
                 "summary": "鑾峰彇浠诲姟",
                 "parameters": [
                     {
+                        "type": "string",
+                        "name": "deviceID",
+                        "in": "query"
+                    },
+                    {
                         "type": "integer",
                         "description": "椤电爜",
                         "name": "page",
@@ -540,6 +605,81 @@
                                     "properties": {
                                         "data": {
                                             "$ref": "#/definitions/response.TaskResponse"
+                                        }
+                                    }
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "/v1/task/list": {
+            "get": {
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "Task"
+                ],
+                "summary": "鑾峰彇浠诲姟鍒楄〃2",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "閫氶亾鍙枫�備笉浼犲彇鍏ㄩ儴鐨�",
+                        "name": "channel",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "name": "deviceID",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "榛樿3",
+                        "name": "limit",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "榛樿0",
+                        "name": "offset",
+                        "in": "query"
+                    },
+                    {
+                        "enum": [
+                            1,
+                            2,
+                            3
+                        ],
+                        "type": "integer",
+                        "x-enum-varnames": [
+                            "QueryTypeUnFinish",
+                            "QueryTypeToday",
+                            "QueryTypeFinished"
+                        ],
+                        "description": "1 鏈畬鎴� 2 浠婂ぉ鏈畬鎴� 3 宸插畬鎴�",
+                        "name": "type",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "鎴愬姛",
+                        "schema": {
+                            "allOf": [
+                                {
+                                    "$ref": "#/definitions/contextx.Response"
+                                },
+                                {
+                                    "type": "object",
+                                    "properties": {
+                                        "data": {
+                                            "type": "object",
+                                            "additionalProperties": {
+                                                "$ref": "#/definitions/response.TaskResponse"
+                                            }
                                         }
                                     }
                                 }
@@ -763,16 +903,36 @@
                 }
             }
         },
+        "constvar.Parity": {
+            "type": "integer",
+            "enum": [
+                1,
+                2,
+                3
+            ],
+            "x-enum-comments": {
+                "ParityEven": "濂囨牎楠�",
+                "ParityNull": "鏃犳牎楠�",
+                "ParityOdd": "鍋舵牎楠�"
+            },
+            "x-enum-varnames": [
+                "ParityEven",
+                "ParityOdd",
+                "ParityNull"
+            ]
+        },
         "constvar.PlcMethod": {
             "type": "string",
             "enum": [
                 "modbusTCP",
+                "modbusRTU",
                 "serial",
                 "缃戠粶",
                 "涓插彛"
             ],
             "x-enum-varnames": [
                 "PlcMethodModbusTCP",
+                "PlcMethodModbusRTU",
                 "PlcMethodSerial",
                 "PlcMethodModbusTCPChinese",
                 "PlcMethodSerialChinese"
@@ -798,6 +958,48 @@
             "x-enum-varnames": [
                 "PlcStartAddressValueTypeString",
                 "PlcStartAddressValueTypeInt"
+            ]
+        },
+        "constvar.ProblemCode": {
+            "type": "string",
+            "enum": [
+                "service",
+                "network",
+                "db",
+                "serf",
+                "cloud",
+                "device",
+                "process_model",
+                "plc_config",
+                "plc_address_list",
+                "plc_process_model_address_list",
+                "plc_connect"
+            ],
+            "x-enum-comments": {
+                "ProblemCodeCloud": "鏈繛鎺ヤ簯绔�",
+                "ProblemCodeDB": "鏁版嵁搴撹繛鎺ラ敊璇�",
+                "ProblemCodeDevice": "鏈粦瀹氳澶�",
+                "ProblemCodeNetwork": "缃戠粶閿欒",
+                "ProblemCodePlcAddressList": "plc鍦板潃琛ㄧ己澶�",
+                "ProblemCodePlcConfig": "plc閰嶇疆缂哄け",
+                "ProblemCodePlcConnect": "plc杩炴帴澶辫触",
+                "ProblemCodePlcProcessModelAddressList": "plc鍦板潃琛ㄧ己澶�",
+                "ProblemCodeProcessModel": "宸ヨ壓鍙傛暟缂哄け",
+                "ProblemCodeSerf": "鏈姞鍏erf闆嗙兢",
+                "ProblemCodeService": "鏈嶅姟涓嶅彲鐢�"
+            },
+            "x-enum-varnames": [
+                "ProblemCodeService",
+                "ProblemCodeNetwork",
+                "ProblemCodeDB",
+                "ProblemCodeSerf",
+                "ProblemCodeCloud",
+                "ProblemCodeDevice",
+                "ProblemCodeProcessModel",
+                "ProblemCodePlcConfig",
+                "ProblemCodePlcAddressList",
+                "ProblemCodePlcProcessModelAddressList",
+                "ProblemCodePlcConnect"
             ]
         },
         "constvar.TaskMode": {
@@ -834,7 +1036,7 @@
             "type": "object",
             "properties": {
                 "address": {
-                    "description": "PortName   string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency  int    ` + "`" + `gorm:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `",
+                    "description": "plc ip鍦板潃锛� method = modbusTCP鐢�",
                     "type": "string"
                 },
                 "baudRate": {
@@ -844,11 +1046,25 @@
                 "brand": {
                     "type": "string"
                 },
+                "createdAt": {
+                    "type": "string"
+                },
+                "dataBit": {
+                    "description": "鏁版嵁浣嶏紝method = modbusRTU 鐢�",
+                    "type": "integer"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "details": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/model.DevicePlcAddress"
                     }
+                },
+                "deviceID": {
+                    "description": "璁惧缂栧彿",
+                    "type": "string"
                 },
                 "id": {
                     "type": "integer"
@@ -859,12 +1075,27 @@
                 "method": {
                     "$ref": "#/definitions/constvar.PlcMethod"
                 },
+                "parity": {
+                    "description": "鏍¢獙鏂瑰紡锛宮ethod = modbusRTU 鐢�",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.Parity"
+                        }
+                    ]
+                },
                 "port": {
                     "description": "plc 绔彛鍙凤紝  method =  modbusTCP鐢�",
                     "type": "integer"
                 },
                 "serialName": {
                     "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�",
+                    "type": "string"
+                },
+                "stopBit": {
+                    "description": "鍋滄浣嶏紝method = modbusRTU 鐢�",
+                    "type": "integer"
+                },
+                "updatedAt": {
                     "type": "string"
                 }
             }
@@ -911,6 +1142,12 @@
                 "networkCard"
             ],
             "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "dns": {
                     "description": "dns",
                     "type": "string"
@@ -941,6 +1178,9 @@
                             "$ref": "#/definitions/model.NetConfigStatus"
                         }
                     ]
+                },
+                "updatedAt": {
+                    "type": "string"
                 }
             }
         },
@@ -965,13 +1205,22 @@
                 "amount": {
                     "type": "number"
                 },
+                "createdAt": {
+                    "type": "string"
+                },
                 "customer": {
+                    "type": "string"
+                },
+                "deletedAt": {
                     "type": "string"
                 },
                 "deliverDate": {
                     "type": "string"
                 },
                 "endTime": {
+                    "type": "integer"
+                },
+                "id": {
                     "type": "integer"
                 },
                 "orderAttr": {
@@ -999,6 +1248,9 @@
                 "unit": {
                     "type": "string"
                 },
+                "updatedAt": {
+                    "type": "string"
+                },
                 "workOrderId": {
                     "type": "string"
                 }
@@ -1020,10 +1272,19 @@
         "model.PlcBrand": {
             "type": "object",
             "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "id": {
                     "type": "integer"
                 },
                 "name": {
+                    "type": "string"
+                },
+                "updatedAt": {
                     "type": "string"
                 }
             }
@@ -1048,6 +1309,12 @@
                     "description": "閫氶亾",
                     "type": "integer"
                 },
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "deviceId": {
                     "type": "string"
                 },
@@ -1068,24 +1335,132 @@
                 "procedureId": {
                     "type": "string"
                 },
+                "processModelNumber": {
+                    "description": "宸ヨ壓妯″瀷缂栧彿",
+                    "type": "string"
+                },
+                "realEndTime": {
+                    "type": "integer"
+                },
+                "realStartTime": {
+                    "type": "integer"
+                },
                 "startTime": {
                     "type": "integer"
                 },
                 "status": {
                     "$ref": "#/definitions/model.ProcedureStatus"
+                },
+                "updatedAt": {
+                    "type": "string"
+                }
+            }
+        },
+        "model.ProcessModel": {
+            "type": "object",
+            "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
+                "deviceId": {
+                    "description": "鐢ㄤ簬杩囨护鑾峰彇nsq娑堟伅",
+                    "type": "string"
+                },
+                "id": {
+                    "type": "integer"
+                },
+                "isUpdate": {
+                    "description": "鍓嶇鐢�",
+                    "type": "boolean"
+                },
+                "newNumber": {
+                    "type": "string"
+                },
+                "newParamsMap": {
+                    "type": "object",
+                    "additionalProperties": true
+                },
+                "number": {
+                    "description": "宸ヨ壓妯″瀷缂栧彿",
+                    "type": "string"
+                },
+                "params": {
+                    "type": "string"
+                },
+                "paramsMap": {
+                    "type": "object",
+                    "additionalProperties": true
+                },
+                "procedure": {
+                    "description": "宸ュ簭",
+                    "type": "string"
+                },
+                "product": {
+                    "description": "浜у搧鍚嶇О",
+                    "type": "string"
+                },
+                "updatedAt": {
+                    "type": "string"
+                }
+            }
+        },
+        "problem.CheckResult": {
+            "type": "object",
+            "properties": {
+                "checkResult": {
+                    "type": "boolean"
+                },
+                "itemCode": {
+                    "$ref": "#/definitions/constvar.ProblemCode"
+                },
+                "itemName": {
+                    "type": "string"
                 }
             }
         },
         "request.AddPlcBrand": {
             "type": "object",
             "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "id": {
                     "type": "integer"
                 },
                 "name": {
                     "type": "string"
+                },
+                "updatedAt": {
+                    "type": "string"
                 }
             }
+        },
+        "request.GetProductProgress": {
+            "type": "object",
+            "properties": {
+                "channel": {
+                    "type": "integer"
+                }
+            }
+        },
+        "request.QueryType": {
+            "type": "integer",
+            "enum": [
+                1,
+                2,
+                3
+            ],
+            "x-enum-varnames": [
+                "QueryTypeUnFinish",
+                "QueryTypeToday",
+                "QueryTypeFinished"
+            ]
         },
         "request.SendProcessParams": {
             "type": "object",
@@ -1093,11 +1468,17 @@
                 "procedureId"
             ],
             "properties": {
-                "channel": {
-                    "type": "integer"
-                },
                 "procedureId": {
                     "type": "integer"
+                }
+            }
+        },
+        "request.SetCurrentDevice": {
+            "type": "object",
+            "properties": {
+                "currentDeviceID": {
+                    "description": "褰撳墠閫夊畾鐨勭敓浜ц澶�",
+                    "type": "string"
                 }
             }
         },
@@ -1105,7 +1486,7 @@
             "type": "object",
             "properties": {
                 "address": {
-                    "description": "PortName   string ` + "`" + `gorm:\"type:varchar(191);comment:绔彛鍚嶇О\" json:\"portName\"` + "`" + `\nFrequency  int    ` + "`" + `gorm:\"comment:鏁版嵁鏇存柊棰戠巼 0-瀹炴椂鏇存柊 1-1娆�/绉抃" json:\"frequency\"` + "`" + `",
+                    "description": "plc ip鍦板潃锛� method = modbusTCP鐢�",
                     "type": "string"
                 },
                 "baudRate": {
@@ -1115,11 +1496,25 @@
                 "brand": {
                     "type": "string"
                 },
+                "createdAt": {
+                    "type": "string"
+                },
+                "dataBit": {
+                    "description": "鏁版嵁浣嶏紝method = modbusRTU 鐢�",
+                    "type": "integer"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "details": {
                     "type": "array",
                     "items": {
                         "$ref": "#/definitions/model.DevicePlcAddress"
                     }
+                },
+                "deviceID": {
+                    "description": "璁惧缂栧彿",
+                    "type": "string"
                 },
                 "id": {
                     "type": "integer"
@@ -1130,6 +1525,14 @@
                 "method": {
                     "$ref": "#/definitions/constvar.PlcMethod"
                 },
+                "parity": {
+                    "description": "鏍¢獙鏂瑰紡锛宮ethod = modbusRTU 鐢�",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/constvar.Parity"
+                        }
+                    ]
+                },
                 "port": {
                     "description": "plc 绔彛鍙凤紝  method =  modbusTCP鐢�",
                     "type": "integer"
@@ -1137,17 +1540,73 @@
                 "serialName": {
                     "description": "涓插彛鍚嶇О锛宮ethod = serial鏃� 鐢�",
                     "type": "string"
+                },
+                "stopBit": {
+                    "description": "鍋滄浣嶏紝method = modbusRTU 鐢�",
+                    "type": "integer"
+                },
+                "updatedAt": {
+                    "type": "string"
                 }
             }
         },
         "request.UpdatePlcBrand": {
             "type": "object",
             "properties": {
+                "createdAt": {
+                    "type": "string"
+                },
+                "deletedAt": {
+                    "type": "string"
+                },
                 "id": {
                     "type": "integer"
                 },
                 "name": {
                     "type": "string"
+                },
+                "updatedAt": {
+                    "type": "string"
+                }
+            }
+        },
+        "response.DeviceListResponse": {
+            "type": "object",
+            "properties": {
+                "clusterNodeQuantity": {
+                    "description": "闆嗙兢鑺傜偣鏁伴噺",
+                    "type": "integer"
+                },
+                "clusterStatus": {
+                    "description": "闆嗙兢鐘舵��",
+                    "type": "string"
+                },
+                "currentDeviceID": {
+                    "description": "褰撳墠閫夊畾鐨勭敓浜ц澶�",
+                    "type": "string"
+                },
+                "deviceIDList": {
+                    "description": "鐢熶骇璁惧id鍒楄〃",
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
+                },
+                "systemDeviceID": {
+                    "description": "宸ユ帶鏈鸿澶嘔D",
+                    "type": "string"
+                },
+                "systemDeviceRunSince": {
+                    "description": "绯荤粺杩愯寮�濮嬫椂闂存埑",
+                    "type": "integer"
+                },
+                "systemDeviceStatus": {
+                    "description": "璁惧鐘舵��",
+                    "allOf": [
+                        {
+                            "$ref": "#/definitions/response.SystemDeviceStatus"
+                        }
+                    ]
                 }
             }
         },
@@ -1192,6 +1651,12 @@
         "response.ProductProgress": {
             "type": "object",
             "properties": {
+                "RealEndTime": {
+                    "type": "integer"
+                },
+                "RealStartTime": {
+                    "type": "integer"
+                },
                 "finishNumber": {
                     "type": "integer"
                 },
@@ -1203,6 +1668,21 @@
                 }
             }
         },
+        "response.SystemDeviceStatus": {
+            "type": "integer",
+            "enum": [
+                1,
+                2
+            ],
+            "x-enum-comments": {
+                "SystemDeviceStatusNormal": "姝e父",
+                "SystemDeviceStatusUnNormal": "寮傚父"
+            },
+            "x-enum-varnames": [
+                "SystemDeviceStatusNormal",
+                "SystemDeviceStatusUnNormal"
+            ]
+        },
         "response.TaskCountdown": {
             "type": "object",
             "properties": {

--
Gitblit v1.8.0