zhangqian
2023-08-18 e5ee9138c720e48f7447be486f247e765b3f1e46
docs/docs.go
@@ -16,26 +16,43 @@
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/v1/notice/task/start": {
            "post": {
        "/v1/task/finish/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Base"
                    "Task"
                ],
                "summary": "任务开启通知",
                "summary": "任务结束",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.TaskInfo"
                        }
                        "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": "获取任务",
                "responses": {
                    "200": {
                        "description": "成功",
@@ -48,7 +65,7 @@
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.LoginResponse"
                                            "$ref": "#/definitions/response.TaskData"
                                        }
                                    }
                                }
@@ -57,27 +74,65 @@
                    }
                }
            }
        },
        "/v1/task/sendProcessParams/{id}": {
            "post": {
                "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/start/{id}": {
            "get": {
                "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"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "constvar.UserType": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-comments": {
                "UserTypePrimary": "主账户",
                "UserTypeSub": "子账户",
                "UserTypeSuper": "超级管理员"
            },
            "x-enum-varnames": [
                "UserTypeSuper",
                "UserTypePrimary",
                "UserTypeSub"
            ]
        },
        "contextx.Response": {
            "type": "object",
            "properties": {
@@ -90,125 +145,144 @@
                }
            }
        },
        "model.User": {
        "model.Order": {
            "type": "object",
            "properties": {
                "companyCity": {
                "amount": {
                    "type": "number"
                },
                "customer": {
                    "type": "string"
                },
                "companyContact": {
                "deliverDate": {
                    "type": "string"
                },
                "companyEmail": {
                    "type": "string"
                },
                "companyLogo": {
                    "type": "string"
                },
                "companyName": {
                    "type": "string"
                },
                "companyProvince": {
                    "type": "string"
                },
                "companyTrade": {
                    "type": "string"
                },
                "createAt": {
                    "description": "创建时间",
                    "type": "string"
                },
                "enable": {
                    "type": "boolean"
                },
                "headerImage": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "ip": {
                    "type": "string"
                },
                "menuIds": {
                    "description": "菜单ID列表",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "nickName": {
                    "type": "string"
                },
                "parentId": {
                    "type": "string"
                },
                "parentName": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "port": {
                    "type": "string"
                },
                "pos": {
                    "type": "string"
                },
                "status": {
                "endTime": {
                    "type": "integer"
                },
                "systemName": {
                    "type": "string"
                },
                "updateAt": {
                    "description": "更新时间",
                    "type": "string"
                },
                "userType": {
                    "$ref": "#/definitions/constvar.UserType"
                },
                "username": {
                    "type": "string"
                }
            }
        },
        "request.TaskInfo": {
            "type": "object",
            "properties": {
                "device": {
                    "description": "设备",
                "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"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
        "response.LoginResponse": {
        "model.Procedures": {
            "type": "object",
            "properties": {
                "expiresAt": {
                "id": {
                    "type": "integer"
                },
                "token": {
                "procedure": {
                    "description": "request.ProductProcedure  对象",
                    "allOf": [
                        {
                            "$ref": "#/definitions/request.ProductProcedure"
                        }
                    ]
                }
            }
        },
        "request.ProcedureMaterial": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "number"
                },
                "materialId": {
                    "type": "string"
                },
                "user": {
                    "$ref": "#/definitions/model.User"
                "materialName": {
                    "type": "string"
                },
                "unit": {
                    "type": "string"
                }
            }
        },
        "request.ProcedureWorker": {
            "type": "object",
            "properties": {
                "phoneNum": {
                    "type": "string"
                },
                "workerId": {
                    "type": "string"
                },
                "workerName": {
                    "type": "string"
                }
            }
        },
        "request.ProductProcedure": {
            "type": "object",
            "properties": {
                "deviceId": {
                    "type": "string"
                },
                "endTime": {
                    "type": "integer"
                },
                "inputMaterials": {
                    "description": "输入物料列表",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.ProcedureMaterial"
                    }
                },
                "outputMaterials": {
                    "description": "输出物料列表",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.ProcedureMaterial"
                    }
                },
                "procedureId": {
                    "type": "string"
                },
                "procedureName": {
                    "type": "string"
                },
                "startTime": {
                    "type": "integer"
                },
                "workHours": {
                    "type": "number"
                },
                "workers": {
                    "description": "人员列表",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.ProcedureWorker"
                    }
                }
            }
        },
        "response.TaskData": {
            "type": "object",
            "properties": {
                "order": {
                    "$ref": "#/definitions/model.Order"
                },
                "procedure": {
                    "$ref": "#/definitions/model.Procedures"
                }
            }
        }