zhangqian
2023-08-19 94a8c84e8d29300644a689ce2cd6f537f1993224
docs/docs.go
@@ -16,7 +16,7 @@
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/v1/cc/nn": {
        "/v1/config/net": {
            "get": {
                "produces": [
                    "application/json"
@@ -49,7 +49,7 @@
                    }
                }
            },
            "put": {
            "post": {
                "produces": [
                    "application/json"
                ],
@@ -93,7 +93,7 @@
                }
            }
        },
        "/v1/config/net": {
        "/v1/config/plc": {
            "get": {
                "produces": [
                    "application/json"
@@ -101,7 +101,7 @@
                "tags": [
                    "Config"
                ],
                "summary": "获取网络配置",
                "summary": "获取plc配置",
                "responses": {
                    "200": {
                        "description": "成功",
@@ -114,10 +114,7 @@
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/model.NetConfig"
                                            }
                                            "$ref": "#/definitions/model.DevicePlc"
                                        }
                                    }
                                }
@@ -126,45 +123,30 @@
                    }
                }
            },
            "put": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Config"
                ],
                "summary": "设置网络配置",
                "summary": "更新plc配置",
                "parameters": [
                    {
                        "description": "参数",
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/model.NetConfig"
                            "$ref": "#/definitions/request.UpdatePlc"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/contextx.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/response.ProcessParams"
                                            }
                                        }
                                    }
                                }
                            ]
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
@@ -520,6 +502,62 @@
                }
            }
        },
        "model.DevicePlc": {
            "type": "object",
            "properties": {
                "address": {
                    "type": "string"
                },
                "brand": {
                    "type": "string"
                },
                "details": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "isOpen": {
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                },
                "port": {
                    "type": "integer"
                },
                "portName": {
                    "type": "string"
                }
            }
        },
        "model.DevicePlcAddress": {
            "type": "object",
            "properties": {
                "fieldName": {
                    "description": "对应系统字段",
                    "type": "string"
                },
                "length": {
                    "description": "数据长度",
                    "type": "integer"
                },
                "startAddress": {
                    "description": "数据起始地址",
                    "type": "integer"
                },
                "type": {
                    "description": "数据类型",
                    "type": "string"
                }
            }
        },
        "model.NetConfig": {
            "type": "object",
            "required": [
@@ -691,6 +729,41 @@
                }
            }
        },
        "request.UpdatePlc": {
            "type": "object",
            "properties": {
                "address": {
                    "type": "string"
                },
                "brand": {
                    "type": "string"
                },
                "details": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "isOpen": {
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                },
                "port": {
                    "type": "integer"
                },
                "portName": {
                    "type": "string"
                }
            }
        },
        "request.UpdatePlcBrand": {
            "type": "object",
            "properties": {