zhangqian
2023-08-29 cd6940f07750c1e2cd3a5c0eeafa6cc0309ef2f6
docs/docs.go
@@ -4428,119 +4428,6 @@
                }
            }
        },
        "/p/getProductListFromGrpc": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Product"
                ],
                "summary": "分页获取Product列表",
                "parameters": [
                    {
                        "type": "integer",
                        "name": "deliveryTime",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "endCreatedAt",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "主键ID",
                        "name": "id",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "关键字",
                        "name": "keyword",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "maximumStock",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "minimumStock",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "number",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "页码",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "每页大小",
                        "name": "pageSize",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "productType",
                        "in": "query"
                    },
                    {
                        "type": "number",
                        "name": "purchasePrice",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "remark",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "shippingDuration",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "startCreatedAt",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "unit",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
                        "schema": {
                            "type": "string"
                        }
                    }
                }
            }
        },
        "/p/updateProduct": {
            "put": {
                "security": [
@@ -4603,7 +4490,7 @@
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/purchaserequest.AddPurchase"
                            "$ref": "#/definitions/purchaserequest.UpdatePurchase"
                        }
                    }
                ],
@@ -4790,7 +4677,7 @@
                "tags": [
                    "Purchase"
                ],
                "summary": "分页获取权限采购单列表",
                "summary": "分页获取采购单列表",
                "parameters": [
                    {
                        "type": "string",
@@ -4813,7 +4700,7 @@
                ],
                "responses": {
                    "200": {
                        "description": "分页获取权限采购单列表,返回包括列表,总数,页码,每页数量",
                        "description": "分页获取采购单列表,返回包括列表,总数,页码,每页数量",
                        "schema": {
                            "allOf": [
                                {
@@ -4825,6 +4712,152 @@
                                        "data": {
                                            "$ref": "#/definitions/response.PageResult"
                                        },
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchaseType": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "创建采购类型",
                "parameters": [
                    {
                        "description": "采购类型list",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/purchaserequest.PurchaseType"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "创建采购类型",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchaseTypeList": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "获取采购类型列表",
                "responses": {
                    "200": {
                        "description": "获取采购类型列表",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/purchase.PurchaseType"
                                            }
                                        },
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/submit/{id}": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "提交采购单",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "采购单ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "提交采购单",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
@@ -8188,6 +8221,27 @@
                }
            }
        },
        "purchase.OrderStatus": {
            "type": "integer",
            "enum": [
                1,
                2,
                3,
                4
            ],
            "x-enum-comments": {
                "OrderStatusCompleted": "已完成",
                "OrderStatusConfirmed": "已下单",
                "OrderStatusReceived": "已到货",
                "OrderStatusStored": "已入库"
            },
            "x-enum-varnames": [
                "OrderStatusConfirmed",
                "OrderStatusReceived",
                "OrderStatusStored",
                "OrderStatusCompleted"
            ]
        },
        "purchase.Purchase": {
            "type": "object",
            "properties": {
@@ -8207,9 +8261,16 @@
                    "description": "采购名称",
                    "type": "string"
                },
                "number": {
                    "description": "采购编号",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
                },
                "purchaseType": {
                    "$ref": "#/definitions/purchase.PurchaseType"
                },
                "purchaseTypeId": {
                    "description": "采购类型id",
@@ -8222,6 +8283,17 @@
                "signingDate": {
                    "description": "签约日期",
                    "type": "string"
                },
                "status": {
                    "description": "状态",
                    "allOf": [
                        {
                            "$ref": "#/definitions/purchase.OrderStatus"
                        }
                    ]
                },
                "supplier": {
                    "$ref": "#/definitions/test.Supplier"
                },
                "supplierId": {
                    "description": "供应商id",
@@ -8262,6 +8334,27 @@
                }
            }
        },
        "purchase.PurchaseType": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购类型",
                    "type": "string"
                },
                "pin": {
                    "description": "是否置顶",
                    "type": "boolean"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.AddPurchase": {
            "type": "object",
            "properties": {
@@ -8272,7 +8365,95 @@
                    }
                },
                "purchase": {
                    "$ref": "#/definitions/purchase.Purchase"
                    "$ref": "#/definitions/purchaserequest.Purchase"
                }
            }
        },
        "purchaserequest.Purchase": {
            "type": "object",
            "properties": {
                "contact": {
                    "description": "联系人",
                    "type": "string"
                },
                "deliveryDate": {
                    "description": "交付日期",
                    "type": "string"
                },
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购名称",
                    "type": "string"
                },
                "number": {
                    "description": "采购编号",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
                },
                "purchaseTypeId": {
                    "description": "采购类型id",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "signingDate": {
                    "description": "签约日期",
                    "type": "string"
                },
                "status": {
                    "description": "状态",
                    "allOf": [
                        {
                            "$ref": "#/definitions/purchase.OrderStatus"
                        }
                    ]
                },
                "supplierId": {
                    "description": "供应商id",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.PurchaseType": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购类型",
                    "type": "string"
                },
                "pin": {
                    "description": "是否置顶",
                    "type": "boolean"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.UpdatePurchase": {
            "type": "object",
            "properties": {
                "productList": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/purchase.PurchaseProducts"
                    }
                },
                "purchase": {
                    "$ref": "#/definitions/purchaserequest.Purchase"
                }
            }
        },