zhangqian
2023-11-01 372e5032b10eddc00b7a87a862a71dea6705609c
docs/docs.go
@@ -152,6 +152,67 @@
                }
            }
        },
        "/v1/device/list": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Device"
                ],
                "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": [
@@ -172,37 +233,6 @@
                        }
                    }
                ],
                "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": "成功",
@@ -415,7 +445,10 @@
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.TaskCountdown"
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/model.ProcessModel"
                                            }
                                        }
                                    }
                                }
@@ -495,6 +528,11 @@
                "summary": "获取任务",
                "parameters": [
                    {
                        "type": "string",
                        "name": "deviceID",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "页码",
                        "name": "page",
@@ -540,6 +578,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 +876,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"
@@ -834,7 +967,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 +977,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 +1006,27 @@
                "method": {
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "parity": {
                    "description": "校验方式,method = modbusRTU 用",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.Parity"
                        }
                    ]
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
                },
                "serialName": {
                    "description": "串口名称,method = serial时 用",
                    "type": "string"
                },
                "stopBit": {
                    "description": "停止位,method = modbusRTU 用",
                    "type": "integer"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
@@ -911,6 +1073,12 @@
                "networkCard"
            ],
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "deletedAt": {
                    "type": "string"
                },
                "dns": {
                    "description": "dns",
                    "type": "string"
@@ -941,6 +1109,9 @@
                            "$ref": "#/definitions/model.NetConfigStatus"
                        }
                    ]
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
@@ -965,13 +1136,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 +1179,9 @@
                "unit": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                },
                "workOrderId": {
                    "type": "string"
                }
@@ -1020,10 +1203,19 @@
        "model.PlcBrand": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "deletedAt": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
@@ -1048,6 +1240,12 @@
                    "description": "通道",
                    "type": "integer"
                },
                "createdAt": {
                    "type": "string"
                },
                "deletedAt": {
                    "type": "string"
                },
                "deviceId": {
                    "type": "string"
                },
@@ -1068,24 +1266,110 @@
                "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"
                }
            }
        },
        "request.AddPlcBrand": {
            "type": "object",
            "properties": {
                "createdAt": {
                    "type": "string"
                },
                "deletedAt": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "updatedAt": {
                    "type": "string"
                }
            }
        },
        "request.QueryType": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-varnames": [
                "QueryTypeUnFinish",
                "QueryTypeToday",
                "QueryTypeFinished"
            ]
        },
        "request.SendProcessParams": {
            "type": "object",
@@ -1093,11 +1377,17 @@
                "procedureId"
            ],
            "properties": {
                "channel": {
                    "type": "integer"
                },
                "procedureId": {
                    "type": "integer"
                }
            }
        },
        "request.SetCurrentDevice": {
            "type": "object",
            "properties": {
                "currentDeviceID": {
                    "description": "当前选定的生产设备",
                    "type": "string"
                }
            }
        },
@@ -1105,7 +1395,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 +1405,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 +1434,14 @@
                "method": {
                    "$ref": "#/definitions/constvar.PlcMethod"
                },
                "parity": {
                    "description": "校验方式,method = modbusRTU 用",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.Parity"
                        }
                    ]
                },
                "port": {
                    "description": "plc 端口号,  method =  modbusTCP用",
                    "type": "integer"
@@ -1137,17 +1449,53 @@
                "serialName": {
                    "description": "串口名称,method = 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": {
                "currentDeviceID": {
                    "description": "当前选定的生产设备",
                    "type": "string"
                },
                "deviceIDList": {
                    "description": "生产设备id列表",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "systemDeviceID": {
                    "description": "工控机设备ID",
                    "type": "string"
                }
            }
        },