| | |
| | | "wms/extend/util" |
| | | "wms/models" |
| | | "wms/request" |
| | | "wms/response" |
| | | ) |
| | | |
| | | type LocationProductAmountController struct { |
| | |
| | | util.ResponseFormat(c, code.Success, "添加成功") |
| | | } |
| | | |
| | | // GetRuleList |
| | | // @Tags 库存盘点 |
| | | // @Summary 获取上架规则 |
| | | // @Produce application/json |
| | | // @Param object body request.GetRuleList true "查询信息" |
| | | // @Success 200 {object} util.ResponseList{data=[]response.RuleList} "成功" |
| | | // @Router /api-wms/v1/locationProductAmount/getRuleList [post] |
| | | func (slf LocationProductAmountController) GetRuleList(c *gin.Context) { |
| | | var params request.GetRuleList |
| | | if err := c.BindJSON(¶ms); err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, "参数解析失败,数据类型错误") |
| | | return |
| | | } |
| | | list, err := models.NewLocationProductSearch().SetProductId(params.ProductId).SetLocationId(params.LocationId).Find() |
| | | if err != nil { |
| | | util.ResponseFormat(c, code.RequestParamError, err.Error()) |
| | | return |
| | | } |
| | | var ruleList response.RuleList |
| | | for _, l := range list { |
| | | ruleList.LocationList = append(ruleList.LocationList, l.Location) |
| | | ruleList.ProductList = append(ruleList.ProductList, l.Product) |
| | | } |
| | | util.ResponseFormat(c, code.Success, ruleList) |
| | | } |
| | | |
| | | // Add |
| | | // @Tags 库存盘点 |
| | | // @Summary 修改库存盘点信息 |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getHistory": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取历史信息", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetInventoryHistory" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.InventoryHistory" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getInventoryForms": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取库存报表", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetInventoryForms" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.InventoryForms" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getLocationForms": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取位置报表", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.PageInfo" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.LocationForms" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/location/addLocation": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/util.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/locationProductAmount/getRuleList": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "库存盘点" |
| | | ], |
| | | "summary": "获取上架规则", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询信息", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetRuleList" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.RuleList" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "request.GetInventoryForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "categoryIds": { |
| | | "description": "产品类型id", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "integer" |
| | | } |
| | | }, |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | | }, |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "warehouseCode": { |
| | | "description": "仓库缩写", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetInventoryHistory": { |
| | | "type": "object", |
| | | "properties": { |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | | }, |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetProductList": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetRuleList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "locationId": { |
| | | "description": "位置id", |
| | | "type": "integer" |
| | | }, |
| | | "productId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | "response.InventoryForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "在库数量", |
| | | "type": "number" |
| | | }, |
| | | "availableNumber": { |
| | | "description": "可用库存", |
| | | "type": "number" |
| | | }, |
| | | "cost": { |
| | | "description": "成本", |
| | | "type": "number" |
| | | }, |
| | | "in": { |
| | | "description": "入库", |
| | | "type": "number" |
| | | }, |
| | | "out": { |
| | | "description": "出库", |
| | | "type": "number" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productType": { |
| | | "description": "产品类型", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "总价值", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | | "response.InventoryHistory": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "baseOperationType": { |
| | | "description": "基础作业类型", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | | } |
| | | ] |
| | | }, |
| | | "contactedName": { |
| | | "description": "完成者", |
| | | "type": "string" |
| | | }, |
| | | "date": { |
| | | "description": "日期", |
| | | "type": "string" |
| | | }, |
| | | "fromLocation": { |
| | | "description": "源位置", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "toLocation": { |
| | | "description": "目标位置", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "response.LocationForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "locationName": { |
| | | "description": "位置名称", |
| | | "type": "string" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productTypeName": { |
| | | "description": "产品类别", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "总价值", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | | "response.RuleList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "locationList": { |
| | | "description": "位置列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Location" |
| | | } |
| | | }, |
| | | "productList": { |
| | | "description": "产品列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Material" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "util.Response": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | Description: "", |
| | | InfoInstanceName: "swagger", |
| | | SwaggerTemplate: docTemplate, |
| | | LeftDelim: "{{", |
| | | RightDelim: "}}", |
| | | } |
| | | |
| | | func init() { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getHistory": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取历史信息", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetInventoryHistory" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.InventoryHistory" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getInventoryForms": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取库存报表", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetInventoryForms" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.InventoryForms" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/forms/getLocationForms": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "报表" |
| | | ], |
| | | "summary": "获取位置报表", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询参数", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.PageInfo" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.LocationForms" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/location/addLocation": { |
| | | "post": { |
| | | "produces": [ |
| | |
| | | "description": "成功", |
| | | "schema": { |
| | | "$ref": "#/definitions/util.Response" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "/api-wms/v1/locationProductAmount/getRuleList": { |
| | | "post": { |
| | | "produces": [ |
| | | "application/json" |
| | | ], |
| | | "tags": [ |
| | | "库存盘点" |
| | | ], |
| | | "summary": "获取上架规则", |
| | | "parameters": [ |
| | | { |
| | | "description": "查询信息", |
| | | "name": "object", |
| | | "in": "body", |
| | | "required": true, |
| | | "schema": { |
| | | "$ref": "#/definitions/request.GetRuleList" |
| | | } |
| | | } |
| | | ], |
| | | "responses": { |
| | | "200": { |
| | | "description": "成功", |
| | | "schema": { |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/util.ResponseList" |
| | | }, |
| | | { |
| | | "type": "object", |
| | | "properties": { |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/response.RuleList" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "request.GetInventoryForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "categoryIds": { |
| | | "description": "产品类型id", |
| | | "type": "array", |
| | | "items": { |
| | | "type": "integer" |
| | | } |
| | | }, |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | | }, |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "warehouseCode": { |
| | | "description": "仓库缩写", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetInventoryHistory": { |
| | | "type": "object", |
| | | "properties": { |
| | | "page": { |
| | | "description": "页码", |
| | | "type": "integer" |
| | | }, |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetProductList": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | "pageSize": { |
| | | "description": "每页大小", |
| | | "type": "integer" |
| | | } |
| | | } |
| | | }, |
| | | "request.GetRuleList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "locationId": { |
| | | "description": "位置id", |
| | | "type": "integer" |
| | | }, |
| | | "productId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | "response.InventoryForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "在库数量", |
| | | "type": "number" |
| | | }, |
| | | "availableNumber": { |
| | | "description": "可用库存", |
| | | "type": "number" |
| | | }, |
| | | "cost": { |
| | | "description": "成本", |
| | | "type": "number" |
| | | }, |
| | | "in": { |
| | | "description": "入库", |
| | | "type": "number" |
| | | }, |
| | | "out": { |
| | | "description": "出库", |
| | | "type": "number" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productType": { |
| | | "description": "产品类型", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "总价值", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | | "response.InventoryHistory": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "baseOperationType": { |
| | | "description": "基础作业类型", |
| | | "allOf": [ |
| | | { |
| | | "$ref": "#/definitions/constvar.BaseOperationType" |
| | | } |
| | | ] |
| | | }, |
| | | "contactedName": { |
| | | "description": "完成者", |
| | | "type": "string" |
| | | }, |
| | | "date": { |
| | | "description": "日期", |
| | | "type": "string" |
| | | }, |
| | | "fromLocation": { |
| | | "description": "源位置", |
| | | "type": "string" |
| | | }, |
| | | "number": { |
| | | "description": "单号", |
| | | "type": "string" |
| | | }, |
| | | "toLocation": { |
| | | "description": "目标位置", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | } |
| | | } |
| | | }, |
| | | "response.LocationForms": { |
| | | "type": "object", |
| | | "properties": { |
| | | "amount": { |
| | | "description": "数量", |
| | | "type": "number" |
| | | }, |
| | | "locationName": { |
| | | "description": "位置名称", |
| | | "type": "string" |
| | | }, |
| | | "produceId": { |
| | | "description": "产品id", |
| | | "type": "string" |
| | | }, |
| | | "productName": { |
| | | "description": "产品名称", |
| | | "type": "string" |
| | | }, |
| | | "productTypeName": { |
| | | "description": "产品类别", |
| | | "type": "string" |
| | | }, |
| | | "unit": { |
| | | "description": "单位", |
| | | "type": "string" |
| | | }, |
| | | "value": { |
| | | "description": "总价值", |
| | | "type": "number" |
| | | } |
| | | } |
| | | }, |
| | | "response.RuleList": { |
| | | "type": "object", |
| | | "properties": { |
| | | "locationList": { |
| | | "description": "位置列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Location" |
| | | } |
| | | }, |
| | | "productList": { |
| | | "description": "产品列表", |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.Material" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "util.Response": { |
| | | "type": "object", |
| | | "properties": { |
| | |
| | | required: |
| | | - code |
| | | type: object |
| | | request.GetInventoryForms: |
| | | properties: |
| | | categoryIds: |
| | | description: 产品类型id |
| | | items: |
| | | type: integer |
| | | type: array |
| | | page: |
| | | description: 页码 |
| | | type: integer |
| | | pageSize: |
| | | description: 每页大小 |
| | | type: integer |
| | | warehouseCode: |
| | | description: 仓库缩写 |
| | | type: string |
| | | type: object |
| | | request.GetInventoryHistory: |
| | | properties: |
| | | page: |
| | | description: 页码 |
| | | type: integer |
| | | pageSize: |
| | | description: 每页大小 |
| | | type: integer |
| | | produceId: |
| | | description: 产品id |
| | | type: string |
| | | productName: |
| | | description: 产品名称 |
| | | type: string |
| | | unit: |
| | | description: 单位 |
| | | type: string |
| | | type: object |
| | | request.GetProductList: |
| | | properties: |
| | | categoryId: |
| | |
| | | pageSize: |
| | | description: 每页大小 |
| | | type: integer |
| | | type: object |
| | | request.GetRuleList: |
| | | properties: |
| | | locationId: |
| | | description: 位置id |
| | | type: integer |
| | | productId: |
| | | description: 产品id |
| | | type: string |
| | | type: object |
| | | request.OperationAllList: |
| | | properties: |
| | |
| | | description: 仓库id |
| | | type: integer |
| | | type: object |
| | | response.InventoryForms: |
| | | properties: |
| | | amount: |
| | | description: 在库数量 |
| | | type: number |
| | | availableNumber: |
| | | description: 可用库存 |
| | | type: number |
| | | cost: |
| | | description: 成本 |
| | | type: number |
| | | in: |
| | | description: 入库 |
| | | type: number |
| | | out: |
| | | description: 出库 |
| | | type: number |
| | | produceId: |
| | | description: 产品id |
| | | type: string |
| | | productName: |
| | | description: 产品名称 |
| | | type: string |
| | | productType: |
| | | description: 产品类型 |
| | | type: string |
| | | unit: |
| | | description: 单位 |
| | | type: string |
| | | value: |
| | | description: 总价值 |
| | | type: number |
| | | type: object |
| | | response.InventoryHistory: |
| | | properties: |
| | | amount: |
| | | description: 数量 |
| | | type: number |
| | | baseOperationType: |
| | | allOf: |
| | | - $ref: '#/definitions/constvar.BaseOperationType' |
| | | description: 基础作业类型 |
| | | contactedName: |
| | | description: 完成者 |
| | | type: string |
| | | date: |
| | | description: 日期 |
| | | type: string |
| | | fromLocation: |
| | | description: 源位置 |
| | | type: string |
| | | number: |
| | | description: 单号 |
| | | type: string |
| | | toLocation: |
| | | description: 目标位置 |
| | | type: string |
| | | unit: |
| | | description: 单位 |
| | | type: string |
| | | type: object |
| | | response.LocationForms: |
| | | properties: |
| | | amount: |
| | | description: 数量 |
| | | type: number |
| | | locationName: |
| | | description: 位置名称 |
| | | type: string |
| | | produceId: |
| | | description: 产品id |
| | | type: string |
| | | productName: |
| | | description: 产品名称 |
| | | type: string |
| | | productTypeName: |
| | | description: 产品类别 |
| | | type: string |
| | | unit: |
| | | description: 单位 |
| | | type: string |
| | | value: |
| | | description: 总价值 |
| | | type: number |
| | | type: object |
| | | response.RuleList: |
| | | properties: |
| | | locationList: |
| | | description: 位置列表 |
| | | items: |
| | | $ref: '#/definitions/models.Location' |
| | | type: array |
| | | productList: |
| | | description: 产品列表 |
| | | items: |
| | | $ref: '#/definitions/models.Material' |
| | | type: array |
| | | type: object |
| | | util.Response: |
| | | properties: |
| | | code: |
| | |
| | | summary: 编辑公司 |
| | | tags: |
| | | - 公司 |
| | | /api-wms/v1/forms/getHistory: |
| | | post: |
| | | parameters: |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.GetInventoryHistory' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/response.InventoryHistory' |
| | | type: array |
| | | type: object |
| | | summary: 获取历史信息 |
| | | tags: |
| | | - 报表 |
| | | /api-wms/v1/forms/getInventoryForms: |
| | | post: |
| | | parameters: |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.GetInventoryForms' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/response.InventoryForms' |
| | | type: array |
| | | type: object |
| | | summary: 获取库存报表 |
| | | tags: |
| | | - 报表 |
| | | /api-wms/v1/forms/getLocationForms: |
| | | post: |
| | | parameters: |
| | | - description: 查询参数 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.PageInfo' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/response.LocationForms' |
| | | type: array |
| | | type: object |
| | | summary: 获取位置报表 |
| | | tags: |
| | | - 报表 |
| | | /api-wms/v1/location/addLocation: |
| | | post: |
| | | parameters: |
| | |
| | | summary: 添加库存盘点信息 |
| | | tags: |
| | | - 库存盘点 |
| | | /api-wms/v1/locationProductAmount/getRuleList: |
| | | post: |
| | | parameters: |
| | | - description: 查询信息 |
| | | in: body |
| | | name: object |
| | | required: true |
| | | schema: |
| | | $ref: '#/definitions/request.GetRuleList' |
| | | produces: |
| | | - application/json |
| | | responses: |
| | | "200": |
| | | description: 成功 |
| | | schema: |
| | | allOf: |
| | | - $ref: '#/definitions/util.ResponseList' |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/response.RuleList' |
| | | type: array |
| | | type: object |
| | | summary: 获取上架规则 |
| | | tags: |
| | | - 库存盘点 |
| | | /api-wms/v1/locationProductAmount/list: |
| | | post: |
| | | parameters: |
| | |
| | | DifferenceAmount decimal.Decimal `json:"differenceAmount"` //计数数量 |
| | | OperationId int `json:"operationId"` //出入库id |
| | | } |
| | | |
| | | type GetRuleList struct { |
| | | LocationId int `json:"locationId"` //位置id |
| | | ProductId string `json:"productId"` //产品id |
| | | } |
New file |
| | |
| | | package response |
| | | |
| | | import "wms/models" |
| | | |
| | | type RuleList struct { |
| | | ProductList []models.Material `json:"productList"` //产品列表 |
| | | LocationList []models.Location `json:"locationList"` //位置列表 |
| | | } |
| | |
| | | locationProductAmountController := new(controllers.LocationProductAmountController) |
| | | locationProductAmountAPI := r.Group(urlPrefix + "/locationProductAmount") |
| | | { |
| | | locationProductAmountAPI.POST("add", locationProductAmountController.Add) //添加库存盘点信息 |
| | | locationProductAmountAPI.POST("list", locationProductAmountController.List) //查看库存盘点列表 |
| | | locationProductAmountAPI.POST("add", locationProductAmountController.Add) //添加库存盘点信息 |
| | | locationProductAmountAPI.POST("list", locationProductAmountController.List) //查看库存盘点列表 |
| | | locationProductAmountAPI.POST("getRuleList", locationProductAmountController.GetRuleList) //获取上架规则 |
| | | } |
| | | |
| | | //报表 |