zhangqian
2023-09-12 b555874608be2e4bb40cceba60b497c04caef842
docs/docs.go
@@ -158,7 +158,7 @@
                    "application/json"
                ],
                "tags": [
                    "获取动态数据"
                    "生产数量"
                ],
                "summary": "获取生产进度",
                "responses": {
@@ -178,6 +178,25 @@
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/v1/plc/setProductNumber": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "生产数量"
                ],
                "summary": "设置生产总量",
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
@@ -300,6 +319,37 @@
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/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"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
@@ -524,6 +574,39 @@
                }
            }
        },
        "constvar.PlcMethod": {
            "type": "string",
            "enum": [
                "modbusTCP",
                "serial"
            ],
            "x-enum-varnames": [
                "PlcMethodModbusTCP",
                "PlcMethodSerial"
            ]
        },
        "constvar.PlcStartAddressType": {
            "type": "integer",
            "enum": [
                1,
                2
            ],
            "x-enum-varnames": [
                "PlcStartAddressTypeFinishNumber",
                "PlcStartAddressTypeTotalNumber"
            ]
        },
        "constvar.PlcStartAddressValueType": {
            "type": "string",
            "enum": [
                "string",
                "int"
            ],
            "x-enum-varnames": [
                "PlcStartAddressValueTypeString",
                "PlcStartAddressValueTypeInt"
            ]
        },
        "contextx.Response": {
            "type": "object",
            "properties": {
@@ -540,7 +623,12 @@
            "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\"` + "`" + `",
                    "type": "string"
                },
                "baudRate": {
                    "description": "串口波特率, method = serial时 用",
                    "type": "integer"
                },
                "brand": {
                    "type": "string"
@@ -551,9 +639,6 @@
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
@@ -561,12 +646,14 @@
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
                },
                "portName": {
                "serialName": {
                    "description": "串口名称,method = serial时 用",
                    "type": "string"
                }
            }
@@ -576,7 +663,11 @@
            "properties": {
                "fieldName": {
                    "description": "对应系统字段",
                    "type": "string"
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.PlcStartAddressType"
                        }
                    ]
                },
                "length": {
                    "description": "数据长度",
@@ -588,7 +679,11 @@
                },
                "type": {
                    "description": "数据类型",
                    "type": "string"
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.PlcStartAddressValueType"
                        }
                    ]
                }
            }
        },
@@ -767,7 +862,12 @@
            "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\"` + "`" + `",
                    "type": "string"
                },
                "baudRate": {
                    "description": "串口波特率, method = serial时 用",
                    "type": "integer"
                },
                "brand": {
                    "type": "string"
@@ -778,9 +878,6 @@
                        "$ref": "#/definitions/model.DevicePlcAddress"
                    }
                },
                "frequency": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
@@ -788,12 +885,14 @@
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
                },
                "portName": {
                "serialName": {
                    "description": "串口名称,method = serial时 用",
                    "type": "string"
                }
            }
@@ -852,6 +951,26 @@
            "properties": {
                "finishNumber": {
                    "type": "integer"
                },
                "totalNumber": {
                    "type": "integer"
                }
            }
        },
        "response.TaskCountdown": {
            "type": "object",
            "properties": {
                "countDownHour": {
                    "description": "倒计时 时",
                    "type": "integer"
                },
                "countDownMinute": {
                    "description": "倒计时 分",
                    "type": "integer"
                },
                "showCountDown": {
                    "description": "是否展示倒计时",
                    "type": "boolean"
                }
            }
        },