liujiandao
2023-09-20 548030097f2b95dff474c397c7393168c73ab8a2
docs/docs.go
@@ -340,7 +340,7 @@
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Product"
                            "$ref": "#/definitions/models.Material"
                        }
                    }
                ],
@@ -354,15 +354,141 @@
                }
            }
        },
        "/api-wms/v1/product/getProductList": {
        "/api-wms/v1/product/addProductCategory": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品类型"
                ],
                "summary": "添加产品类型",
                "parameters": [
                    {
                        "description": "产品类型信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ProductCategory"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/deleteProduct/{id}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品"
                ],
                "summary": "获取产品详情",
                "summary": "删除产品",
                "parameters": [
                    {
                        "type": "string",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/deleteProductCategory/{id}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品类型"
                ],
                "summary": "删除产品类型",
                "parameters": [
                    {
                        "type": "string",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/getProductCategoryDetails/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品类型"
                ],
                "summary": "获取产品类型详情",
                "parameters": [
                    {
                        "type": "string",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/util.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/models.Material"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/getProductCategoryList": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品类型"
                ],
                "summary": "获取产品类型列表",
                "parameters": [
                    {
                        "description": "查询参数",
@@ -388,12 +514,157 @@
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/models.Product"
                                                "$ref": "#/definitions/models.ProductCategory"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/getProductDetails/{id}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品"
                ],
                "summary": "获取产品详情",
                "parameters": [
                    {
                        "type": "string",
                        "description": "id",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/util.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/models.Material"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/getProductList": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品"
                ],
                "summary": "获取产品列表",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.GetProductList"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/util.ResponseList"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/models.Material"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/updateProduct": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品"
                ],
                "summary": "修改产品",
                "parameters": [
                    {
                        "description": "产品信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.Material"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-wms/v1/product/updateProductCategory": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "产品类型"
                ],
                "summary": "修改产品类型",
                "parameters": [
                    {
                        "description": "产品信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/models.ProductCategory"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
@@ -707,6 +978,52 @@
                "BaseOperationTypeInternal"
            ]
        },
        "constvar.CostingMethod": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-comments": {
                "CostingMethodAverageCost": "平均成本",
                "CostingMethodFIFO": "先进先出",
                "CostingMethodStandardPrice": "标准价格"
            },
            "x-enum-varnames": [
                "CostingMethodStandardPrice",
                "CostingMethodFIFO",
                "CostingMethodAverageCost"
            ]
        },
        "constvar.ForceRemovalStrategy": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-varnames": [
                "ForceRemovalStrategyFIFO",
                "ForceRemovalStrategyLIFO",
                "ForceRemovalStrategyClosestLocation"
            ]
        },
        "constvar.InventoryValuation": {
            "type": "integer",
            "enum": [
                1,
                2
            ],
            "x-enum-comments": {
                "InventoryValuationAuto": "自动",
                "InventoryValuationManual": "手动"
            },
            "x-enum-varnames": [
                "InventoryValuationManual",
                "InventoryValuationAuto"
            ]
        },
        "constvar.InvoicingStrategy": {
            "type": "integer",
            "enum": [
@@ -761,6 +1078,19 @@
                "LocationTypeTransit"
            ]
        },
        "constvar.MaterialMode": {
            "type": "string",
            "enum": [
                "原材料",
                "半成品",
                "成品"
            ],
            "x-enum-varnames": [
                "MaterialModeRaw",
                "MaterialModeSemi",
                "MaterialModeFinished"
            ]
        },
        "constvar.OperationStatus": {
            "type": "integer",
            "enum": [
@@ -801,24 +1131,6 @@
                "Task",
                "Object",
                "TaskAndObject"
            ]
        },
        "constvar.ProductType": {
            "type": "integer",
            "enum": [
                1,
                2,
                3
            ],
            "x-enum-comments": {
                "Consumables": "消耗品",
                "Server": "服务",
                "StoredProduct": "可储存的产品"
            },
            "x-enum-varnames": [
                "Consumables",
                "Server",
                "StoredProduct"
            ]
        },
        "constvar.ReservationMethod": {
@@ -971,6 +1283,157 @@
                }
            }
        },
        "models.Material": {
            "type": "object",
            "properties": {
                "HSCode": {
                    "type": "string"
                },
                "amount": {
                    "type": "number"
                },
                "barcode": {
                    "description": "条码",
                    "type": "string"
                },
                "buyExplain": {
                    "type": "string"
                },
                "canBePurchased": {
                    "description": "是否可采购",
                    "type": "boolean"
                },
                "categoryId": {
                    "description": "产品类别id",
                    "type": "integer"
                },
                "companyId": {
                    "type": "integer"
                },
                "companyName": {
                    "type": "string"
                },
                "controlStrategy": {
                    "$ref": "#/definitions/constvar.InvoicingStrategy"
                },
                "cost": {
                    "description": "成本",
                    "type": "number"
                },
                "currencyName": {
                    "type": "string"
                },
                "customerTaxes": {
                    "description": "客户税百分比",
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "type": "integer"
                },
                "id": {
                    "type": "string"
                },
                "inStorageExplain": {
                    "type": "string"
                },
                "internalNotes": {
                    "description": "内部说明",
                    "type": "string"
                },
                "internalReference": {
                    "description": "内部参考",
                    "type": "string"
                },
                "internalTransferExplain": {
                    "type": "string"
                },
                "invoicingStrategy": {
                    "description": "wms添加字段",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.InvoicingStrategy"
                        }
                    ]
                },
                "isSale": {
                    "description": "PurchaseType      constvar.PurchaseType ` + "`" + `gorm:\"type:int(11);comment:采购类型\" json:\"purchaseType\"` + "`" + `",
                    "type": "boolean"
                },
                "maxInventory": {
                    "type": "number"
                },
                "minInventory": {
                    "description": "Explain           string                  ` + "`" + `gorm:\"type:varchar(512);comment:编号说明\" json:\"explain\"` + "`" + `\nCodeStandardID    string                  ` + "`" + `gorm:\"type:varchar(191);comment:编码规范ID\" json:\"codeStandardID\"` + "`" + `\nSpecs             string                  ` + "`" + `gorm:\"type:varchar(191);comment:物料规格\" json:\"specs\"` + "`" + `\nType              string                  ` + "`" + `gorm:\"type:varchar(191);comment:物料型号\" json:\"type\"` + "`" + `",
                    "type": "number"
                },
                "minPurchaseAmount": {
                    "description": "PurchaseAheadDay  int                     ` + "`" + `gorm:\"type:int(11);comment:采购提前期(天)\" json:\"purchaseAheadDay\"` + "`" + `\nProduceAheadDay   int                     ` + "`" + `gorm:\"type:int(11);comment:制造提前期(天)\" json:\"produceAheadDay\"` + "`" + `",
                    "type": "number"
                },
                "model": {
                    "description": "MaterialType constvar.ProductType  ` + "`" + `gorm:\"index;type:int(11);comment:物料类型(数字)\" json:\"materialType\"` + "`" + `",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.MaterialMode"
                        }
                    ]
                },
                "name": {
                    "type": "string"
                },
                "orderCreation": {
                    "$ref": "#/definitions/constvar.OrderCreation"
                },
                "originCountryId": {
                    "type": "integer"
                },
                "originCountryName": {
                    "type": "string"
                },
                "outStorageExplain": {
                    "type": "string"
                },
                "principal": {
                    "description": "负责人",
                    "type": "string"
                },
                "productTagId": {
                    "description": "产品标签",
                    "type": "integer"
                },
                "productTagName": {
                    "type": "string"
                },
                "purchasePrice": {
                    "type": "number"
                },
                "salePrice": {
                    "type": "number"
                },
                "selectProduct": {
                    "type": "integer"
                },
                "sellExplain": {
                    "type": "string"
                },
                "supplier": {
                    "description": "FSource           string                  ` + "`" + `gorm:\"type:varchar(191);comment:生产车间\" json:\"-\"` + "`" + `\nStatus            constvar.MaterialStatus ` + "`" + `gorm:\"type:int(11);comment:状态\" json:\"status\"` + "`" + `",
                    "type": "string"
                },
                "unit": {
                    "description": "LockAmount        decimal.Decimal         ` + "`" + `gorm:\"type:decimal(35,18);default:0;comment:锁定数量\" json:\"lockAmount\"` + "`" + `",
                    "type": "string"
                },
                "volume": {
                    "description": "体积",
                    "type": "number"
                },
                "weight": {
                    "description": "重量",
                    "type": "number"
                }
            }
        },
        "models.OperationType": {
            "type": "object",
            "properties": {
@@ -1085,150 +1548,50 @@
                }
            }
        },
        "models.Product": {
        "models.ProductCategory": {
            "type": "object",
            "properties": {
                "HSCode": {
                    "type": "string"
                "costingMethod": {
                    "description": "成本方法",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.CostingMethod"
                        }
                    ]
                },
                "barcode": {
                    "description": "条码",
                    "type": "string"
                },
                "buyExplain": {
                    "type": "string"
                },
                "canBePurchased": {
                    "description": "是否可采购",
                    "type": "boolean"
                },
                "canBeSell": {
                    "description": "是否销售",
                    "type": "boolean"
                },
                "categoryId": {
                    "description": "产品分类id",
                    "type": "integer"
                },
                "companyId": {
                    "type": "integer"
                },
                "companyName": {
                    "type": "string"
                },
                "controlStrategy": {
                    "$ref": "#/definitions/constvar.InvoicingStrategy"
                },
                "cost": {
                    "description": "成本",
                    "type": "number"
                },
                "createTime": {
                    "type": "string"
                },
                "currencyId": {
                    "type": "integer"
                },
                "currencyName": {
                    "type": "string"
                },
                "customerAdvanceTime": {
                    "type": "number"
                },
                "customerTaxes": {
                    "description": "客户税百分比",
                    "type": "number"
                },
                "deliveryAdvanceTime": {
                    "type": "number"
                "forceRemovalStrategy": {
                    "description": "强制下架策略",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.ForceRemovalStrategy"
                        }
                    ]
                },
                "id": {
                    "type": "integer"
                },
                "inStorageExplain": {
                    "type": "string"
                },
                "internalNotes": {
                    "description": "内部说明",
                    "type": "string"
                },
                "internalReference": {
                    "description": "内部参考",
                    "type": "string"
                },
                "internalTransferExplain": {
                    "type": "string"
                },
                "invoicingStrategy": {
                    "$ref": "#/definitions/constvar.InvoicingStrategy"
                },
                "name": {
                    "description": "产品名称",
                    "type": "string"
                },
                "objectTemplateId": {
                    "type": "string"
                },
                "orderCreation": {
                    "$ref": "#/definitions/constvar.OrderCreation"
                },
                "originCountryId": {
                    "type": "integer"
                },
                "originCountryName": {
                    "type": "string"
                },
                "outStorageExplain": {
                    "type": "string"
                },
                "price": {
                    "type": "number"
                },
                "principal": {
                    "description": "负责人",
                    "type": "string"
                },
                "productTagId": {
                    "description": "产品标签",
                    "type": "integer"
                },
                "productTagName": {
                    "type": "string"
                },
                "salePrice": {
                    "description": "销售价格",
                    "type": "number"
                },
                "selectProduct": {
                    "type": "integer"
                },
                "sellExplain": {
                    "type": "string"
                },
                "supplierId": {
                    "type": "integer"
                },
                "supplierName": {
                    "type": "string"
                },
                "type": {
                    "description": "产品类型",
                "inventoryValuation": {
                    "description": "库存计价",
                    "allOf": [
                        {
                            "$ref": "#/definitions/constvar.ProductType"
                            "$ref": "#/definitions/constvar.InventoryValuation"
                        }
                    ]
                },
                "updateTime": {
                "name": {
                    "description": "位置名称",
                    "type": "string"
                },
                "volume": {
                    "description": "体积",
                    "type": "number"
                "parentId": {
                    "description": "上级id",
                    "type": "integer"
                },
                "weight": {
                    "description": "重量",
                    "type": "number"
                "routeId": {
                    "type": "integer"
                },
                "routeName": {
                    "description": "公司",
                    "type": "string"
                }
            }
        },
@@ -1706,6 +2069,8 @@
   Description:      "",
   InfoInstanceName: "swagger",
   SwaggerTemplate:  docTemplate,
   LeftDelim:        "{{",
   RightDelim:       "}}",
}
func init() {