From 63558d60419edd772f8f8c8b413326d4550783f0 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期四, 07 三月 2024 14:53:26 +0800 Subject: [PATCH] 获取wms仓库和操作记录信息 --- api/v1/purchase/purchase.go | 86 ++ model/purchase/purchase.go | 4 model/purchase/request/purchase.go | 4 router/purchase/purchase.go | 18 api/v1/test/code.go | 4 proto/purchase_wms/purchase_wms_grpc.pb.go | 72 ++ proto/purchase_wms/purchase_wms.pb.go | 581 +++++++++++++++++- model/purchase/response/purchase.go | 18 docs/swagger.yaml | 244 +++++++ proto/purchase_wms.proto | 32 + docs/docs.go | 373 +++++++++++ docs/swagger.json | 373 +++++++++++ 12 files changed, 1,682 insertions(+), 127 deletions(-) diff --git a/api/v1/purchase/purchase.go b/api/v1/purchase/purchase.go index e723875..ab3f0b5 100644 --- a/api/v1/purchase/purchase.go +++ b/api/v1/purchase/purchase.go @@ -51,7 +51,6 @@ purchaseRecord.Status = purchase.OrderStatusConfirmed purchaseRecord.HandledBy = "admin" purchaseRecord.Creator = "admin" - purchaseRecord.Principal = "admin" purchaseRecord.OrderType = "閲囪喘璁㈠崟" if !purchaseRecord.WholeDiscountType.IsValid(purchaseRecord.TotalPrice, purchaseRecord.WholeDiscount) { @@ -332,3 +331,88 @@ } response.OkWithDetailed(list, "鑾峰彇鎴愬姛", c) } + +// GetWarehouseInfo +// @Tags Purchase +// @Summary 鑾峰彇浠撳簱鍒楄〃 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Param id path int true "閲囪喘鍗旾D" true "閲囪喘鍗旾D" +// @Success 200 {object} response.Response{data=[]purchase_wms.SrmGetWarehouseInfoResponse} "鑾峰彇閲囪喘绫诲瀷鍒楄〃" +// @Router /purchase/getWarehouseInfo [get] +func (e *PurchaseApi) GetWarehouseInfo(c *gin.Context) { + client := purchase_wms.NewPurchaseServiceClient(purchase_wms.PurchaseConn) + info, err := client.SrmGetWarehouseInfo(context.Background(), &purchase_wms.SrmGetWarehouseInfoRequest{}) + if err != nil { + global.GVA_LOG.Error("grpc璋冪敤澶辫触!", zap.Error(err)) + response.FailWithMessage("grpc璋冪敤澶辫触", c) + return + } + response.OkWithData(info, c) +} + +// GetOperationInfo +// @Tags Purchase +// @Summary 鑾峰彇鎿嶄綔淇℃伅 +// @Security ApiKeyAuth +// @accept application/json +// @Produce application/json +// @Success 200 {object} response.Response{data=[]purchase_wms.SrmGetWarehouseInfoResponse} "鑾峰彇閲囪喘绫诲瀷鍒楄〃" +// @Router /purchase/getOperationInfo/{id} [get] +func (e *PurchaseApi) GetOperationInfo(c *gin.Context) { + id, _ := strconv.Atoi(c.Param("id")) + if id == 0 { + response.FailWithMessage("鍙傛暟缂哄け", c) + return + } + data, err := service.NewPurchaseService().GetPurchase(uint(id)) + if err != nil { + global.GVA_LOG.Error("鑾峰彇澶辫触!", zap.Error(err)) + response.FailWithMessage("鑾峰彇澶辫触", c) + return + } + productList, err := service.NewPurchaseService().GetPurchaseProductList(uint(id)) + if err != nil { + global.GVA_LOG.Error("鑾峰彇澶辫触!", zap.Error(err)) + response.FailWithMessage("鑾峰彇澶辫触", c) + return + } + client := purchase_wms.NewPurchaseServiceClient(purchase_wms.PurchaseConn) + info, err := client.SrmGetOperationInfo(context.Background(), &purchase_wms.SrmGetOperationInfoRequest{Number: data.Number}) + if err != nil { + global.GVA_LOG.Error("grpc璋冪敤澶辫触!", zap.Error(err)) + response.FailWithMessage("grpc璋冪敤澶辫触", c) + return + } + + operationInfos := make([]purchaseRes.OperationInfo, 0) + for _, operation := range info.Operations { + var oi purchaseRes.OperationInfo + oi.ProductId = operation.ProductId + oi.ProductName = operation.ProductName + oi.Number = operation.Number + oi.Status = operation.Status + oi.Principal = data.Principal + oi.WarehouseName = data.Warehouse + if operation.OverTime != "" { + oi.OverTime = operation.OverTime + oi.OverAmount = operation.Amount + } else { + oi.SendAmount = operation.Amount + } + for _, products := range productList { + if products.Product.Number == operation.ProductId { + oi.Amount = products.Amount + oi.Price = products.Price + oi.Total = products.Total + oi.Unit = products.Product.Unit + oi.Specifications = products.Product.Specifications + oi.ModelNumber = products.Product.ModelNumber + break + } + } + operationInfos = append(operationInfos, oi) + } + response.OkWithData(operationInfos, c) +} diff --git a/api/v1/test/code.go b/api/v1/test/code.go index 2c2420d..d6c18da 100644 --- a/api/v1/test/code.go +++ b/api/v1/test/code.go @@ -27,7 +27,7 @@ // @Summary 鑾峰彇缂栫爜鍒楄〃 // @Produce application/json // @Param object query request.GetCodeList true "鍙傛暟" -// @Success 200 {object} util.ResponseList{data=[]code.CodeStandard} +// @Success 200 {object} response.Response{data=[]code.CodeStandard} // // @Router /code/getCodeList [get] func (ca *CodeApi) GetCodeList(c *gin.Context) { @@ -66,7 +66,7 @@ // @Summary 鑾峰彇鑷姩缂栫爜 // @Produce application/json // @Param object body code.CodeStandard true "鍙傛暟" -// @Success 200 {object} util.ResponseList{data=map[string]interface{}} +// @Success 200 {object} response.Response{data=map[string]interface{}} // // @Router /code/getAutoCode [post] func (ca *CodeApi) GetAutoCode(c *gin.Context) { diff --git a/docs/docs.go b/docs/docs.go index 55a08e3..4fda355 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -16,6 +16,112 @@ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { + "/code/getAutoCode": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "缂栫爜" + ], + "summary": "鑾峰彇鑷姩缂栫爜", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/code.CodeStandard" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": true + } + } + } + ] + } + } + } + } + }, + "/code/getCodeList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "缂栫爜" + ], + "summary": "鑾峰彇缂栫爜鍒楄〃", + "parameters": [ + { + "type": "string", + "name": "codeStandID", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "name": "type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/code.CodeStandard" + } + } + } + } + ] + } + } + } + } + }, "/con/createContract": { "post": { "security": [ @@ -1096,7 +1202,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.GetById" + "$ref": "#/definitions/srm_model_common_request.GetById" } } ], @@ -1495,6 +1601,99 @@ "description": "{\"success\":true,\"data\":{},\"msg\":\"棰勮鎴愬姛\"}", "schema": { "type": "string" + } + } + } + } + }, + "/purchase/getOperationInfo/{id}": { + "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_wms.SrmGetWarehouseInfoResponse" + } + } + } + } + ] + } + } + } + } + }, + "/purchase/getWarehouseInfo": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鑾峰彇浠撳簱鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "閲囪喘鍗旾D", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鑾峰彇閲囪喘绫诲瀷鍒楄〃", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase_wms.SrmGetWarehouseInfoResponse" + } + } + } + } + ] } } } @@ -2188,7 +2387,8 @@ "in": "query" }, { - "type": "integer", + "type": "string", + "example": "0", "description": "涓婚敭ID", "name": "id", "in": "query" @@ -2349,7 +2549,8 @@ "in": "query" }, { - "type": "integer", + "type": "string", + "example": "0", "description": "涓婚敭ID", "name": "id", "in": "query" @@ -2915,6 +3116,69 @@ } }, "definitions": { + "code.CodeAuto": { + "type": "object", + "properties": { + "AutoLength": { + "type": "integer" + }, + "Desc": { + "type": "string" + }, + "PrefixMethod": { + "type": "integer" + }, + "PrefixValue": { + "type": "string" + }, + "SuffixMethod": { + "type": "integer" + } + } + }, + "code.CodeRule": { + "type": "object", + "properties": { + "Desc": { + "type": "string" + }, + "Length": { + "type": "integer" + }, + "Name": { + "type": "string" + } + } + }, + "code.CodeStandard": { + "type": "object", + "properties": { + "AutoRule": { + "$ref": "#/definitions/code.CodeAuto" + }, + "ID": { + "type": "string" + }, + "List": { + "type": "array", + "items": { + "$ref": "#/definitions/code.CodeRule" + } + }, + "Method": { + "type": "integer" + }, + "Name": { + "type": "string" + }, + "Status": { + "type": "string" + }, + "Type": { + "type": "string" + } + } + }, "config.CORS": { "type": "object", "properties": { @@ -3478,7 +3742,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "invoiceAmount": { "description": "宸叉敹绁ㄩ噾棰�", @@ -3521,7 +3786,7 @@ ] }, "principal": { - "description": "閲囪喘璐熻矗浜�", + "description": "浠撳簱璐熻矗浜�", "type": "string" }, "purchaseType": { @@ -3529,7 +3794,8 @@ }, "purchaseTypeId": { "description": "閲囪喘绫诲瀷id", - "type": "integer" + "type": "string", + "example": "0" }, "quantity": { "description": "閲囪喘鏁伴噺", @@ -3551,6 +3817,10 @@ "description": "绛剧害鏃ユ湡", "type": "string" }, + "sourceOrder": { + "description": "鏉ユ簮鍗曟嵁", + "type": "string" + }, "status": { "description": "鐘舵��", "allOf": [ @@ -3564,7 +3834,8 @@ }, "supplierId": { "description": "渚涘簲鍟唅d", - "type": "integer" + "type": "string", + "example": "0" }, "totalPrice": { "description": "浠风◣鍚堣", @@ -3579,6 +3850,10 @@ }, "warehouse": { "description": "鏀惰揣浠撳簱", + "type": "string" + }, + "warehouseAddress": { + "description": "鏀惰揣浠撳簱鍦板潃", "type": "string" }, "wholeDiscount": { @@ -3642,7 +3917,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘绫诲瀷", @@ -3676,6 +3952,34 @@ "WholeDiscountTypeDiscount" ] }, + "purchase_wms.SrmGetWarehouseInfoResponse": { + "type": "object", + "properties": { + "info": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase_wms.SrmWarehouseInfo" + } + } + } + }, + "purchase_wms.SrmWarehouseInfo": { + "type": "object", + "properties": { + "address": { + "description": "浠撳簱鍦板潃", + "type": "string" + }, + "name": { + "description": "浠撳簱鍚�", + "type": "string" + }, + "principal": { + "description": "浠撳簱璐熻矗浜�", + "type": "string" + } + } + }, "purchaserequest.AddPurchase": { "type": "object", "properties": { @@ -3703,7 +4007,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘鍚嶇О", @@ -3733,9 +4038,14 @@ } ] }, + "principal": { + "description": "浠撳簱璐熻矗浜�", + "type": "string" + }, "purchaseTypeId": { "description": "閲囪喘绫诲瀷id", - "type": "integer" + "type": "string", + "example": "0" }, "quantity": { "description": "閲囪喘鏁伴噺", @@ -3753,6 +4063,10 @@ "description": "绛剧害鏃ユ湡", "type": "string" }, + "sourceOrder": { + "description": "鏉ユ簮鍗曟嵁", + "type": "string" + }, "status": { "description": "鐘舵��", "allOf": [ @@ -3763,11 +4077,20 @@ }, "supplierId": { "description": "渚涘簲鍟唅d", - "type": "integer" + "type": "string", + "example": "0" }, "totalPrice": { "description": "浠风◣鍚堣", "type": "number" + }, + "warehouse": { + "description": "鏀惰揣浠撳簱", + "type": "string" + }, + "warehouseAddress": { + "description": "鏀惰揣浠撳簱鍦板潃", + "type": "string" }, "wholeDiscount": { "description": "鏁村崟鎶樻墸鍊�", @@ -3788,7 +4111,8 @@ "properties": { "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘绫诲瀷", @@ -3815,15 +4139,6 @@ }, "purchase": { "$ref": "#/definitions/purchaserequest.Purchase" - } - } - }, - "request.GetById": { - "type": "object", - "properties": { - "id": { - "description": "涓婚敭ID", - "type": "integer" } } }, @@ -3978,6 +4293,10 @@ "purchasePrice": { "type": "number" }, + "remark": { + "description": "鎻忚堪", + "type": "string" + }, "shippingDuration": { "type": "integer" }, @@ -4016,6 +4335,15 @@ "data": {}, "msg": { "type": "string" + } + } + }, + "srm_model_common_request.GetById": { + "type": "object", + "properties": { + "id": { + "description": "涓婚敭ID", + "type": "integer" } } }, @@ -4122,7 +4450,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "industry": { "type": "string" diff --git a/docs/swagger.json b/docs/swagger.json index 72dae67..2a6474a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -7,6 +7,112 @@ "version": "0.0.1" }, "paths": { + "/code/getAutoCode": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "缂栫爜" + ], + "summary": "鑾峰彇鑷姩缂栫爜", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/code.CodeStandard" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": true + } + } + } + ] + } + } + } + } + }, + "/code/getCodeList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "缂栫爜" + ], + "summary": "鑾峰彇缂栫爜鍒楄〃", + "parameters": [ + { + "type": "string", + "name": "codeStandID", + "in": "query" + }, + { + "type": "string", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "椤电爜", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "姣忛〉澶у皬", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "name": "type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/code.CodeStandard" + } + } + } + } + ] + } + } + } + } + }, "/con/createContract": { "post": { "security": [ @@ -1087,7 +1193,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/request.GetById" + "$ref": "#/definitions/srm_model_common_request.GetById" } } ], @@ -1486,6 +1592,99 @@ "description": "{\"success\":true,\"data\":{},\"msg\":\"棰勮鎴愬姛\"}", "schema": { "type": "string" + } + } + } + } + }, + "/purchase/getOperationInfo/{id}": { + "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_wms.SrmGetWarehouseInfoResponse" + } + } + } + } + ] + } + } + } + } + }, + "/purchase/getWarehouseInfo": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Purchase" + ], + "summary": "鑾峰彇浠撳簱鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "閲囪喘鍗旾D", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鑾峰彇閲囪喘绫诲瀷鍒楄〃", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase_wms.SrmGetWarehouseInfoResponse" + } + } + } + } + ] } } } @@ -2179,7 +2378,8 @@ "in": "query" }, { - "type": "integer", + "type": "string", + "example": "0", "description": "涓婚敭ID", "name": "id", "in": "query" @@ -2340,7 +2540,8 @@ "in": "query" }, { - "type": "integer", + "type": "string", + "example": "0", "description": "涓婚敭ID", "name": "id", "in": "query" @@ -2906,6 +3107,69 @@ } }, "definitions": { + "code.CodeAuto": { + "type": "object", + "properties": { + "AutoLength": { + "type": "integer" + }, + "Desc": { + "type": "string" + }, + "PrefixMethod": { + "type": "integer" + }, + "PrefixValue": { + "type": "string" + }, + "SuffixMethod": { + "type": "integer" + } + } + }, + "code.CodeRule": { + "type": "object", + "properties": { + "Desc": { + "type": "string" + }, + "Length": { + "type": "integer" + }, + "Name": { + "type": "string" + } + } + }, + "code.CodeStandard": { + "type": "object", + "properties": { + "AutoRule": { + "$ref": "#/definitions/code.CodeAuto" + }, + "ID": { + "type": "string" + }, + "List": { + "type": "array", + "items": { + "$ref": "#/definitions/code.CodeRule" + } + }, + "Method": { + "type": "integer" + }, + "Name": { + "type": "string" + }, + "Status": { + "type": "string" + }, + "Type": { + "type": "string" + } + } + }, "config.CORS": { "type": "object", "properties": { @@ -3469,7 +3733,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "invoiceAmount": { "description": "宸叉敹绁ㄩ噾棰�", @@ -3512,7 +3777,7 @@ ] }, "principal": { - "description": "閲囪喘璐熻矗浜�", + "description": "浠撳簱璐熻矗浜�", "type": "string" }, "purchaseType": { @@ -3520,7 +3785,8 @@ }, "purchaseTypeId": { "description": "閲囪喘绫诲瀷id", - "type": "integer" + "type": "string", + "example": "0" }, "quantity": { "description": "閲囪喘鏁伴噺", @@ -3542,6 +3808,10 @@ "description": "绛剧害鏃ユ湡", "type": "string" }, + "sourceOrder": { + "description": "鏉ユ簮鍗曟嵁", + "type": "string" + }, "status": { "description": "鐘舵��", "allOf": [ @@ -3555,7 +3825,8 @@ }, "supplierId": { "description": "渚涘簲鍟唅d", - "type": "integer" + "type": "string", + "example": "0" }, "totalPrice": { "description": "浠风◣鍚堣", @@ -3570,6 +3841,10 @@ }, "warehouse": { "description": "鏀惰揣浠撳簱", + "type": "string" + }, + "warehouseAddress": { + "description": "鏀惰揣浠撳簱鍦板潃", "type": "string" }, "wholeDiscount": { @@ -3633,7 +3908,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘绫诲瀷", @@ -3667,6 +3943,34 @@ "WholeDiscountTypeDiscount" ] }, + "purchase_wms.SrmGetWarehouseInfoResponse": { + "type": "object", + "properties": { + "info": { + "type": "array", + "items": { + "$ref": "#/definitions/purchase_wms.SrmWarehouseInfo" + } + } + } + }, + "purchase_wms.SrmWarehouseInfo": { + "type": "object", + "properties": { + "address": { + "description": "浠撳簱鍦板潃", + "type": "string" + }, + "name": { + "description": "浠撳簱鍚�", + "type": "string" + }, + "principal": { + "description": "浠撳簱璐熻矗浜�", + "type": "string" + } + } + }, "purchaserequest.AddPurchase": { "type": "object", "properties": { @@ -3694,7 +3998,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘鍚嶇О", @@ -3724,9 +4029,14 @@ } ] }, + "principal": { + "description": "浠撳簱璐熻矗浜�", + "type": "string" + }, "purchaseTypeId": { "description": "閲囪喘绫诲瀷id", - "type": "integer" + "type": "string", + "example": "0" }, "quantity": { "description": "閲囪喘鏁伴噺", @@ -3744,6 +4054,10 @@ "description": "绛剧害鏃ユ湡", "type": "string" }, + "sourceOrder": { + "description": "鏉ユ簮鍗曟嵁", + "type": "string" + }, "status": { "description": "鐘舵��", "allOf": [ @@ -3754,11 +4068,20 @@ }, "supplierId": { "description": "渚涘簲鍟唅d", - "type": "integer" + "type": "string", + "example": "0" }, "totalPrice": { "description": "浠风◣鍚堣", "type": "number" + }, + "warehouse": { + "description": "鏀惰揣浠撳簱", + "type": "string" + }, + "warehouseAddress": { + "description": "鏀惰揣浠撳簱鍦板潃", + "type": "string" }, "wholeDiscount": { "description": "鏁村崟鎶樻墸鍊�", @@ -3779,7 +4102,8 @@ "properties": { "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "name": { "description": "閲囪喘绫诲瀷", @@ -3806,15 +4130,6 @@ }, "purchase": { "$ref": "#/definitions/purchaserequest.Purchase" - } - } - }, - "request.GetById": { - "type": "object", - "properties": { - "id": { - "description": "涓婚敭ID", - "type": "integer" } } }, @@ -3969,6 +4284,10 @@ "purchasePrice": { "type": "number" }, + "remark": { + "description": "鎻忚堪", + "type": "string" + }, "shippingDuration": { "type": "integer" }, @@ -4007,6 +4326,15 @@ "data": {}, "msg": { "type": "string" + } + } + }, + "srm_model_common_request.GetById": { + "type": "object", + "properties": { + "id": { + "description": "涓婚敭ID", + "type": "integer" } } }, @@ -4113,7 +4441,8 @@ }, "id": { "description": "涓婚敭ID", - "type": "integer" + "type": "string", + "example": "0" }, "industry": { "type": "string" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4a26eb6..75effca 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,45 @@ definitions: + code.CodeAuto: + properties: + AutoLength: + type: integer + Desc: + type: string + PrefixMethod: + type: integer + PrefixValue: + type: string + SuffixMethod: + type: integer + type: object + code.CodeRule: + properties: + Desc: + type: string + Length: + type: integer + Name: + type: string + type: object + code.CodeStandard: + properties: + AutoRule: + $ref: '#/definitions/code.CodeAuto' + ID: + type: string + List: + items: + $ref: '#/definitions/code.CodeRule' + type: array + Method: + type: integer + Name: + type: string + Status: + type: string + Type: + type: string + type: object config.CORS: properties: mode: @@ -401,7 +442,8 @@ type: string id: description: 涓婚敭ID - type: integer + example: "0" + type: string invoiceAmount: description: 宸叉敹绁ㄩ噾棰� type: number @@ -431,13 +473,14 @@ - $ref: '#/definitions/purchase.PriceAdjustmentType' description: 浠锋牸璋冩暣绫诲瀷 principal: - description: 閲囪喘璐熻矗浜� + description: 浠撳簱璐熻矗浜� type: string purchaseType: $ref: '#/definitions/purchase.PurchaseType' purchaseTypeId: description: 閲囪喘绫诲瀷id - type: integer + example: "0" + type: string quantity: description: 閲囪喘鏁伴噺 type: number @@ -453,6 +496,9 @@ signingDate: description: 绛剧害鏃ユ湡 type: string + sourceOrder: + description: 鏉ユ簮鍗曟嵁 + type: string status: allOf: - $ref: '#/definitions/purchase.OrderStatus' @@ -461,7 +507,8 @@ $ref: '#/definitions/test.Supplier' supplierId: description: 渚涘簲鍟唅d - type: integer + example: "0" + type: string totalPrice: description: 浠风◣鍚堣 type: number @@ -472,6 +519,9 @@ type: string warehouse: description: 鏀惰揣浠撳簱 + type: string + warehouseAddress: + description: 鏀惰揣浠撳簱鍦板潃 type: string wholeDiscount: description: 鏁村崟鎶樻墸鍊� @@ -515,7 +565,8 @@ type: string id: description: 涓婚敭ID - type: integer + example: "0" + type: string name: description: 閲囪喘绫诲瀷 type: string @@ -539,6 +590,25 @@ x-enum-varnames: - WholeDiscountTypePercent - WholeDiscountTypeDiscount + purchase_wms.SrmGetWarehouseInfoResponse: + properties: + info: + items: + $ref: '#/definitions/purchase_wms.SrmWarehouseInfo' + type: array + type: object + purchase_wms.SrmWarehouseInfo: + properties: + address: + description: 浠撳簱鍦板潃 + type: string + name: + description: 浠撳簱鍚� + type: string + principal: + description: 浠撳簱璐熻矗浜� + type: string + type: object purchaserequest.AddPurchase: properties: productList: @@ -558,7 +628,8 @@ type: string id: description: 涓婚敭ID - type: integer + example: "0" + type: string name: description: 閲囪喘鍚嶇О type: string @@ -578,9 +649,13 @@ allOf: - $ref: '#/definitions/purchase.PriceAdjustmentType' description: 浠锋牸璋冩暣绫诲瀷 + principal: + description: 浠撳簱璐熻矗浜� + type: string purchaseTypeId: description: 閲囪喘绫诲瀷id - type: integer + example: "0" + type: string quantity: description: 閲囪喘鏁伴噺 type: number @@ -593,16 +668,26 @@ signingDate: description: 绛剧害鏃ユ湡 type: string + sourceOrder: + description: 鏉ユ簮鍗曟嵁 + type: string status: allOf: - $ref: '#/definitions/purchase.OrderStatus' description: 鐘舵�� supplierId: description: 渚涘簲鍟唅d - type: integer + example: "0" + type: string totalPrice: description: 浠风◣鍚堣 type: number + warehouse: + description: 鏀惰揣浠撳簱 + type: string + warehouseAddress: + description: 鏀惰揣浠撳簱鍦板潃 + type: string wholeDiscount: description: 鏁村崟鎶樻墸鍊� type: number @@ -615,7 +700,8 @@ properties: id: description: 涓婚敭ID - type: integer + example: "0" + type: string name: description: 閲囪喘绫诲瀷 type: string @@ -634,12 +720,6 @@ type: array purchase: $ref: '#/definitions/purchaserequest.Purchase' - type: object - request.GetById: - properties: - id: - description: 涓婚敭ID - type: integer type: object request.IdsReq: properties: @@ -741,6 +821,9 @@ type: integer purchasePrice: type: number + remark: + description: 鎻忚堪 + type: string shippingDuration: type: integer specifications: @@ -767,6 +850,12 @@ data: {} msg: type: string + type: object + srm_model_common_request.GetById: + properties: + id: + description: 涓婚敭ID + type: integer type: object system.System: properties: @@ -837,7 +926,8 @@ type: integer id: description: 涓婚敭ID - type: integer + example: "0" + type: string industry: type: string name: @@ -914,6 +1004,68 @@ title: Swagger Example API version: 0.0.1 paths: + /code/getAutoCode: + post: + parameters: + - description: 鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/code.CodeStandard' + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + additionalProperties: true + type: object + type: object + summary: 鑾峰彇鑷姩缂栫爜 + tags: + - 缂栫爜 + /code/getCodeList: + get: + parameters: + - in: query + name: codeStandID + type: string + - in: query + name: name + type: string + - description: 椤电爜 + in: query + name: page + type: integer + - description: 姣忛〉澶у皬 + in: query + name: pageSize + type: integer + - in: query + name: type + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/code.CodeStandard' + type: array + type: object + summary: 鑾峰彇缂栫爜鍒楄〃 + tags: + - 缂栫爜 /con/createContract: post: consumes: @@ -1566,7 +1718,7 @@ name: data required: true schema: - $ref: '#/definitions/request.GetById' + $ref: '#/definitions/srm_model_common_request.GetById' produces: - application/json responses: @@ -1815,6 +1967,58 @@ summary: 棰勮Contract tags: - Contract + /purchase/getOperationInfo/{id}: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: 鑾峰彇閲囪喘绫诲瀷鍒楄〃 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/purchase_wms.SrmGetWarehouseInfoResponse' + type: array + type: object + security: + - ApiKeyAuth: [] + summary: 鑾峰彇鎿嶄綔淇℃伅 + tags: + - Purchase + /purchase/getWarehouseInfo: + get: + consumes: + - application/json + parameters: + - description: 閲囪喘鍗旾D + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 鑾峰彇閲囪喘绫诲瀷鍒楄〃 + schema: + allOf: + - $ref: '#/definitions/response.Response' + - properties: + data: + items: + $ref: '#/definitions/purchase_wms.SrmGetWarehouseInfoResponse' + type: array + type: object + security: + - ApiKeyAuth: [] + summary: 鑾峰彇浠撳簱鍒楄〃 + tags: + - Purchase /purchase/purchase: post: consumes: @@ -2209,9 +2413,10 @@ name: fileId type: integer - description: 涓婚敭ID + example: "0" in: query name: id - type: integer + type: string - in: query name: industry type: string @@ -2306,9 +2511,10 @@ name: fileId type: integer - description: 涓婚敭ID + example: "0" in: query name: id - type: integer + type: string - in: query name: industry type: string diff --git a/model/purchase/purchase.go b/model/purchase/purchase.go index df91ce9..79d8203 100644 --- a/model/purchase/purchase.go +++ b/model/purchase/purchase.go @@ -23,9 +23,11 @@ Status OrderStatus `json:"status" form:"status" gorm:"type:tinyint(1);not null;default 0;comment:鐘舵��"` //鐘舵�� HandledBy string `json:"handledBy" form:"handledBy" gorm:"type:varchar(255);not null;default '';comment:缁忓姙浜�"` //缁忓姙浜� Creator string `json:"creator" form:"creator" gorm:"type:varchar(255);not null;default '';comment:鍒跺崟浜�"` //鍒跺崟浜� - Principal string `json:"principal" form:"principal" gorm:"type:varchar(255);not null;default '';comment:閲囪喘璐熻矗浜�"` //閲囪喘璐熻矗浜� OrderType string `json:"orderType" form:"orderType" gorm:"type:varchar(255);not null;default '';comment:鍗曟嵁绫诲瀷"` //鍗曟嵁绫诲瀷 Warehouse string `json:"warehouse" form:"warehouse" gorm:"type:varchar(255);not null;default '';comment:鏀惰揣浠撳簱"` //鏀惰揣浠撳簱 + WarehouseAddress string `json:"warehouseAddress" form:"warehouseAddress" gorm:"type:varchar(512);default '';comment:鏀惰揣浠撳簱鍦板潃"` //鏀惰揣浠撳簱鍦板潃 + Principal string `json:"principal" form:"principal" gorm:"type:varchar(255);not null;default '';comment:浠撳簱璐熻矗浜�"` //浠撳簱璐熻矗浜� + SourceOrder string `json:"sourceOrder" gorm:"type:varchar(255);comment:鏉ユ簮鍗曟嵁"` //鏉ユ簮鍗曟嵁 Quantity decimal.Decimal `json:"quantity" form:"quantity" gorm:"type:decimal(12,4);not null;comment:閲囪喘鏁伴噺"` // 閲囪喘鏁伴噺 TotalPrice decimal.Decimal `json:"totalPrice" form:"totalPrice" gorm:"type:decimal(12,2);not null;default '';comment:浠风◣鍚堣"` //浠风◣鍚堣 WholeDiscountType WholeDiscountType `json:"wholeDiscountType" form:"wholeDiscountType" gorm:"type:tinyint(1);not null;default '';comment:鏁村崟鎶樻墸"` //鏁村崟鎶樻墸绫诲瀷 diff --git a/model/purchase/request/purchase.go b/model/purchase/request/purchase.go index baad417..3315919 100644 --- a/model/purchase/request/purchase.go +++ b/model/purchase/request/purchase.go @@ -46,4 +46,8 @@ PriceAdjustmentType purchase.PriceAdjustmentType `json:"priceAdjustmentType" form:"priceAdjustmentType" gorm:"type:decimal(12,2);not null;default 0;comment:浠锋牸璋冩暣绫诲瀷"` //浠锋牸璋冩暣绫诲瀷 PriceAdjustment decimal.Decimal `json:"priceAdjustment" form:"priceAdjustment" gorm:"type:decimal(12,2);not null;default 0.00;comment:浠锋牸璋冩暣"` //浠锋牸璋冩暣鍊� RealTotalPrice decimal.Decimal `json:"realTotalPrice" form:"realTotalPrice" gorm:"type:decimal(12,2);not null;default 0.00;comment:鏈�缁堜环鏍�"` //鏈�缁堜环鏍� + Warehouse string `json:"warehouse" form:"warehouse" gorm:"type:varchar(255);not null;default '';comment:鏀惰揣浠撳簱"` //鏀惰揣浠撳簱 + WarehouseAddress string `json:"warehouseAddress" form:"warehouseAddress" gorm:"type:varchar(512);default '';comment:鏀惰揣浠撳簱鍦板潃"` //鏀惰揣浠撳簱鍦板潃 + Principal string `json:"principal" form:"principal" gorm:"type:varchar(255);not null;default '';comment:浠撳簱璐熻矗浜�"` //浠撳簱璐熻矗浜� + SourceOrder string `json:"sourceOrder" gorm:"type:varchar(255);comment:鏉ユ簮鍗曟嵁"` //鏉ユ簮鍗曟嵁 } diff --git a/model/purchase/response/purchase.go b/model/purchase/response/purchase.go index 83912ac..57a9fa7 100644 --- a/model/purchase/response/purchase.go +++ b/model/purchase/response/purchase.go @@ -49,3 +49,21 @@ Quantity decimal.Decimal `json:"quantity" form:"quantity" gorm:"type:decimal(12,4);not null;comment:閲囪喘鏁伴噺"` // 閲囪喘鏁伴噺 InspectStatus string `json:"inspectStatus" form:"inspectStatus"` //妫�娴嬬粨鏋� } + +type OperationInfo struct { + ProductId string `json:"productId"` + ProductName string `json:"productName"` + Specifications string `json:"specifications"` //瑙勬牸 + ModelNumber string `json:"modelNumber"` //鍨嬪彿 + Amount decimal.Decimal `json:"amount"` //閲囪喘鏁� + SendAmount int64 `json:"sendAmount"` //鍙戣揣鏁� + OverAmount int64 `json:"overAmount"` //鍏ュ簱鏁� + Unit string `json:"unit"` //鍗曚綅 + Price decimal.Decimal `json:"price"` //鍗曚环 + Total decimal.Decimal `json:"total"` //鎬讳环 + Number string `json:"number"` //鍏ュ簱鍗曞彿 + WarehouseName string `json:"warehouseName"` //浠撳簱鍚� + OverTime string `json:"overTime"` //鍏ュ簱鏃堕棿 + Status int64 `json:"status"` + Principal string `json:"principal"` //璐熻矗浜� +} diff --git a/proto/purchase_wms.proto b/proto/purchase_wms.proto index 8ae8034..be80ba4 100644 --- a/proto/purchase_wms.proto +++ b/proto/purchase_wms.proto @@ -9,6 +9,8 @@ rpc CreatePurchaseByWms(CreatePurchaseByWmsRequest) returns (CreatePurchaseByWmsResponse) {} rpc GetPurchaseInfo(GetPurchaseInfoRequest) returns (GetPurchaseInfoResponse) {} rpc ExistSupplier(ExistSupplierRequest) returns (ExistSupplierResponse) {} + rpc SrmGetWarehouseInfo(SrmGetWarehouseInfoRequest) returns (SrmGetWarehouseInfoResponse) {} + rpc SrmGetOperationInfo(SrmGetOperationInfoRequest) returns (SrmGetOperationInfoResponse) {} } //------------------------------------------PurchaseToWms-------------------------------- @@ -103,5 +105,35 @@ bool Exist = 1; } +//--------------------------------------------------SrmGetWarehouseInfo--------------------------------------- +message SrmGetWarehouseInfoRequest{} +message SrmWarehouseInfo{ + string name = 1;//浠撳簱鍚� + string address = 2;//浠撳簱鍦板潃 + string principal = 3;//浠撳簱璐熻矗浜� +} +message SrmGetWarehouseInfoResponse{ + repeated SrmWarehouseInfo info = 1; +} + +//--------------------------------------------------SrmGetOperationInfo--------------------------------------- +message SrmGetOperationInfoRequest{ + string number = 1; +} + +message SrmOperation{ + string number = 1;//鍏ュ簱鍗曞彿 + string warehouseName = 2;//浠撳簱鍚嶇О + string productName = 3;//浜у搧鍚嶇О + string productId = 4;//浜у搧缂栫爜 + int64 amount = 5;//鏁伴噺 + string overTime = 6;//鍏ュ簱鏃堕棿 + string consignee = 7;//鏀惰揣浜� + int64 status = 8;//鐘舵�� +} + +message SrmGetOperationInfoResponse{ + repeated SrmOperation operations = 1; +} diff --git a/proto/purchase_wms/purchase_wms.pb.go b/proto/purchase_wms/purchase_wms.pb.go index 054124e..558b8ed 100644 --- a/proto/purchase_wms/purchase_wms.pb.go +++ b/proto/purchase_wms/purchase_wms.pb.go @@ -885,6 +885,353 @@ return false } +// --------------------------------------------------SrmGetWarehouseInfo--------------------------------------- +type SrmGetWarehouseInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SrmGetWarehouseInfoRequest) Reset() { + *x = SrmGetWarehouseInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetWarehouseInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetWarehouseInfoRequest) ProtoMessage() {} + +func (x *SrmGetWarehouseInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmGetWarehouseInfoRequest.ProtoReflect.Descriptor instead. +func (*SrmGetWarehouseInfoRequest) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{15} +} + +type SrmWarehouseInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //浠撳簱鍚� + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` //浠撳簱鍦板潃 + Principal string `protobuf:"bytes,3,opt,name=principal,proto3" json:"principal,omitempty"` //浠撳簱璐熻矗浜� +} + +func (x *SrmWarehouseInfo) Reset() { + *x = SrmWarehouseInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmWarehouseInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmWarehouseInfo) ProtoMessage() {} + +func (x *SrmWarehouseInfo) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmWarehouseInfo.ProtoReflect.Descriptor instead. +func (*SrmWarehouseInfo) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{16} +} + +func (x *SrmWarehouseInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SrmWarehouseInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SrmWarehouseInfo) GetPrincipal() string { + if x != nil { + return x.Principal + } + return "" +} + +type SrmGetWarehouseInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info []*SrmWarehouseInfo `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"` +} + +func (x *SrmGetWarehouseInfoResponse) Reset() { + *x = SrmGetWarehouseInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetWarehouseInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetWarehouseInfoResponse) ProtoMessage() {} + +func (x *SrmGetWarehouseInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmGetWarehouseInfoResponse.ProtoReflect.Descriptor instead. +func (*SrmGetWarehouseInfoResponse) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{17} +} + +func (x *SrmGetWarehouseInfoResponse) GetInfo() []*SrmWarehouseInfo { + if x != nil { + return x.Info + } + return nil +} + +// --------------------------------------------------SrmGetOperationInfo--------------------------------------- +type SrmGetOperationInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *SrmGetOperationInfoRequest) Reset() { + *x = SrmGetOperationInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetOperationInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetOperationInfoRequest) ProtoMessage() {} + +func (x *SrmGetOperationInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmGetOperationInfoRequest.ProtoReflect.Descriptor instead. +func (*SrmGetOperationInfoRequest) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{18} +} + +func (x *SrmGetOperationInfoRequest) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +type SrmOperation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` //鍏ュ簱鍗曞彿 + WarehouseName string `protobuf:"bytes,2,opt,name=warehouseName,proto3" json:"warehouseName,omitempty"` //浠撳簱鍚嶇О + ProductName string `protobuf:"bytes,3,opt,name=productName,proto3" json:"productName,omitempty"` //浜у搧鍚嶇О + ProductId string `protobuf:"bytes,4,opt,name=productId,proto3" json:"productId,omitempty"` //浜у搧缂栫爜 + Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` //鏁伴噺 + OverTime string `protobuf:"bytes,6,opt,name=overTime,proto3" json:"overTime,omitempty"` //鍏ュ簱鏃堕棿 + Consignee string `protobuf:"bytes,7,opt,name=consignee,proto3" json:"consignee,omitempty"` //鏀惰揣浜� + Status int64 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` //鐘舵�� +} + +func (x *SrmOperation) Reset() { + *x = SrmOperation{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmOperation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmOperation) ProtoMessage() {} + +func (x *SrmOperation) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmOperation.ProtoReflect.Descriptor instead. +func (*SrmOperation) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{19} +} + +func (x *SrmOperation) GetNumber() string { + if x != nil { + return x.Number + } + return "" +} + +func (x *SrmOperation) GetWarehouseName() string { + if x != nil { + return x.WarehouseName + } + return "" +} + +func (x *SrmOperation) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *SrmOperation) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *SrmOperation) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *SrmOperation) GetOverTime() string { + if x != nil { + return x.OverTime + } + return "" +} + +func (x *SrmOperation) GetConsignee() string { + if x != nil { + return x.Consignee + } + return "" +} + +func (x *SrmOperation) GetStatus() int64 { + if x != nil { + return x.Status + } + return 0 +} + +type SrmGetOperationInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operations []*SrmOperation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` +} + +func (x *SrmGetOperationInfoResponse) Reset() { + *x = SrmGetOperationInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_purchase_wms_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SrmGetOperationInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SrmGetOperationInfoResponse) ProtoMessage() {} + +func (x *SrmGetOperationInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_purchase_wms_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SrmGetOperationInfoResponse.ProtoReflect.Descriptor instead. +func (*SrmGetOperationInfoResponse) Descriptor() ([]byte, []int) { + return file_purchase_wms_proto_rawDescGZIP(), []int{20} +} + +func (x *SrmGetOperationInfoResponse) GetOperations() []*SrmOperation { + if x != nil { + return x.Operations + } + return nil +} + var File_purchase_wms_proto protoreflect.FileDescriptor var file_purchase_wms_proto_rawDesc = []byte{ @@ -976,40 +1323,86 @@ 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x15, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x32, 0xef, 0x03, 0x0a, 0x0f, 0x50, - 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, - 0x0a, 0x0d, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x12, - 0x15, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, - 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, - 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, - 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x74, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x45, 0x78, 0x69, 0x73, 0x74, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x72, + 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, 0x10, 0x53, 0x72, 0x6d, 0x57, + 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0x44, 0x0a, 0x1b, 0x53, 0x72, 0x6d, 0x47, + 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x53, 0x72, 0x6d, 0x57, 0x61, 0x72, 0x65, 0x68, + 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x34, + 0x0a, 0x1a, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf6, 0x01, 0x0a, 0x0c, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x24, 0x0a, + 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, + 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, + 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4c, 0x0a, + 0x1b, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x53, 0x72, 0x6d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x97, 0x05, 0x0a, 0x0f, + 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x3e, 0x0a, 0x0d, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, + 0x12, 0x15, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, + 0x73, 0x65, 0x54, 0x6f, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x75, + 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, - 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, - 0x42, 0x79, 0x57, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, - 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, - 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, - 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, - 0x2e, 0x2f, 0x70, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, + 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x42, 0x79, 0x57, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, + 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, + 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6c, + 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, + 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, + 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, + 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x52, 0x0a, 0x13, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x53, 0x72, 0x6d, 0x47, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x10, 0x5a, 0x0e, 0x2e, 0x2f, 0x70, 0x75, 0x72, 0x63, 0x68, + 0x61, 0x73, 0x65, 0x5f, 0x77, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1024,7 +1417,7 @@ return file_purchase_wms_proto_rawDescData } -var file_purchase_wms_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_purchase_wms_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_purchase_wms_proto_goTypes = []interface{}{ (*PurchaseProduct)(nil), // 0: PurchaseProduct (*PurchaseToWmsRequest)(nil), // 1: PurchaseToWmsRequest @@ -1041,28 +1434,40 @@ (*GetPurchaseInfoResponse)(nil), // 12: GetPurchaseInfoResponse (*ExistSupplierRequest)(nil), // 13: ExistSupplierRequest (*ExistSupplierResponse)(nil), // 14: ExistSupplierResponse + (*SrmGetWarehouseInfoRequest)(nil), // 15: SrmGetWarehouseInfoRequest + (*SrmWarehouseInfo)(nil), // 16: SrmWarehouseInfo + (*SrmGetWarehouseInfoResponse)(nil), // 17: SrmGetWarehouseInfoResponse + (*SrmGetOperationInfoRequest)(nil), // 18: SrmGetOperationInfoRequest + (*SrmOperation)(nil), // 19: SrmOperation + (*SrmGetOperationInfoResponse)(nil), // 20: SrmGetOperationInfoResponse } var file_purchase_wms_proto_depIdxs = []int32{ 0, // 0: PurchaseToWmsRequest.Product:type_name -> PurchaseProduct 6, // 1: GetSupplierListByProductIdResponse.List:type_name -> SupplierList 11, // 2: GetPurchaseInfoResponse.Infos:type_name -> PurchaseInfo - 1, // 3: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest - 3, // 4: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest - 5, // 5: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest - 8, // 6: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest - 10, // 7: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest - 13, // 8: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest - 2, // 9: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse - 4, // 10: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse - 7, // 11: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse - 9, // 12: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse - 12, // 13: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse - 14, // 14: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse - 9, // [9:15] is the sub-list for method output_type - 3, // [3:9] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 16, // 3: SrmGetWarehouseInfoResponse.info:type_name -> SrmWarehouseInfo + 19, // 4: SrmGetOperationInfoResponse.operations:type_name -> SrmOperation + 1, // 5: PurchaseService.PurchaseToWms:input_type -> PurchaseToWmsRequest + 3, // 6: PurchaseService.UpdatePurchaseStatus:input_type -> UpdatePurchaseStatusRequest + 5, // 7: PurchaseService.GetSupplierListByProductId:input_type -> GetSupplierListByProductIdRequest + 8, // 8: PurchaseService.CreatePurchaseByWms:input_type -> CreatePurchaseByWmsRequest + 10, // 9: PurchaseService.GetPurchaseInfo:input_type -> GetPurchaseInfoRequest + 13, // 10: PurchaseService.ExistSupplier:input_type -> ExistSupplierRequest + 15, // 11: PurchaseService.SrmGetWarehouseInfo:input_type -> SrmGetWarehouseInfoRequest + 18, // 12: PurchaseService.SrmGetOperationInfo:input_type -> SrmGetOperationInfoRequest + 2, // 13: PurchaseService.PurchaseToWms:output_type -> PurchaseToWmsResponse + 4, // 14: PurchaseService.UpdatePurchaseStatus:output_type -> UpdatePurchaseStatusResponse + 7, // 15: PurchaseService.GetSupplierListByProductId:output_type -> GetSupplierListByProductIdResponse + 9, // 16: PurchaseService.CreatePurchaseByWms:output_type -> CreatePurchaseByWmsResponse + 12, // 17: PurchaseService.GetPurchaseInfo:output_type -> GetPurchaseInfoResponse + 14, // 18: PurchaseService.ExistSupplier:output_type -> ExistSupplierResponse + 17, // 19: PurchaseService.SrmGetWarehouseInfo:output_type -> SrmGetWarehouseInfoResponse + 20, // 20: PurchaseService.SrmGetOperationInfo:output_type -> SrmGetOperationInfoResponse + 13, // [13:21] is the sub-list for method output_type + 5, // [5:13] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_purchase_wms_proto_init() } @@ -1251,6 +1656,78 @@ return nil } } + file_purchase_wms_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetWarehouseInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmWarehouseInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetWarehouseInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetOperationInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmOperation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_purchase_wms_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SrmGetOperationInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1258,7 +1735,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_purchase_wms_proto_rawDesc, NumEnums: 0, - NumMessages: 15, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/purchase_wms/purchase_wms_grpc.pb.go b/proto/purchase_wms/purchase_wms_grpc.pb.go index cc71d37..142e836 100644 --- a/proto/purchase_wms/purchase_wms_grpc.pb.go +++ b/proto/purchase_wms/purchase_wms_grpc.pb.go @@ -24,6 +24,8 @@ CreatePurchaseByWms(ctx context.Context, in *CreatePurchaseByWmsRequest, opts ...grpc.CallOption) (*CreatePurchaseByWmsResponse, error) GetPurchaseInfo(ctx context.Context, in *GetPurchaseInfoRequest, opts ...grpc.CallOption) (*GetPurchaseInfoResponse, error) ExistSupplier(ctx context.Context, in *ExistSupplierRequest, opts ...grpc.CallOption) (*ExistSupplierResponse, error) + SrmGetWarehouseInfo(ctx context.Context, in *SrmGetWarehouseInfoRequest, opts ...grpc.CallOption) (*SrmGetWarehouseInfoResponse, error) + SrmGetOperationInfo(ctx context.Context, in *SrmGetOperationInfoRequest, opts ...grpc.CallOption) (*SrmGetOperationInfoResponse, error) } type purchaseServiceClient struct { @@ -88,6 +90,24 @@ return out, nil } +func (c *purchaseServiceClient) SrmGetWarehouseInfo(ctx context.Context, in *SrmGetWarehouseInfoRequest, opts ...grpc.CallOption) (*SrmGetWarehouseInfoResponse, error) { + out := new(SrmGetWarehouseInfoResponse) + err := c.cc.Invoke(ctx, "/PurchaseService/SrmGetWarehouseInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *purchaseServiceClient) SrmGetOperationInfo(ctx context.Context, in *SrmGetOperationInfoRequest, opts ...grpc.CallOption) (*SrmGetOperationInfoResponse, error) { + out := new(SrmGetOperationInfoResponse) + err := c.cc.Invoke(ctx, "/PurchaseService/SrmGetOperationInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // PurchaseServiceServer is the server API for PurchaseService service. // All implementations must embed UnimplementedPurchaseServiceServer // for forward compatibility @@ -98,6 +118,8 @@ CreatePurchaseByWms(context.Context, *CreatePurchaseByWmsRequest) (*CreatePurchaseByWmsResponse, error) GetPurchaseInfo(context.Context, *GetPurchaseInfoRequest) (*GetPurchaseInfoResponse, error) ExistSupplier(context.Context, *ExistSupplierRequest) (*ExistSupplierResponse, error) + SrmGetWarehouseInfo(context.Context, *SrmGetWarehouseInfoRequest) (*SrmGetWarehouseInfoResponse, error) + SrmGetOperationInfo(context.Context, *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) mustEmbedUnimplementedPurchaseServiceServer() } @@ -122,6 +144,12 @@ } func (UnimplementedPurchaseServiceServer) ExistSupplier(context.Context, *ExistSupplierRequest) (*ExistSupplierResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExistSupplier not implemented") +} +func (UnimplementedPurchaseServiceServer) SrmGetWarehouseInfo(context.Context, *SrmGetWarehouseInfoRequest) (*SrmGetWarehouseInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SrmGetWarehouseInfo not implemented") +} +func (UnimplementedPurchaseServiceServer) SrmGetOperationInfo(context.Context, *SrmGetOperationInfoRequest) (*SrmGetOperationInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SrmGetOperationInfo not implemented") } func (UnimplementedPurchaseServiceServer) mustEmbedUnimplementedPurchaseServiceServer() {} @@ -244,6 +272,42 @@ return interceptor(ctx, in, info, handler) } +func _PurchaseService_SrmGetWarehouseInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SrmGetWarehouseInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PurchaseServiceServer).SrmGetWarehouseInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/PurchaseService/SrmGetWarehouseInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PurchaseServiceServer).SrmGetWarehouseInfo(ctx, req.(*SrmGetWarehouseInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PurchaseService_SrmGetOperationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SrmGetOperationInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PurchaseServiceServer).SrmGetOperationInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/PurchaseService/SrmGetOperationInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PurchaseServiceServer).SrmGetOperationInfo(ctx, req.(*SrmGetOperationInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // PurchaseService_ServiceDesc is the grpc.ServiceDesc for PurchaseService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -275,6 +339,14 @@ MethodName: "ExistSupplier", Handler: _PurchaseService_ExistSupplier_Handler, }, + { + MethodName: "SrmGetWarehouseInfo", + Handler: _PurchaseService_SrmGetWarehouseInfo_Handler, + }, + { + MethodName: "SrmGetOperationInfo", + Handler: _PurchaseService_SrmGetOperationInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "purchase_wms.proto", diff --git a/router/purchase/purchase.go b/router/purchase/purchase.go index 34decce..3273abd 100644 --- a/router/purchase/purchase.go +++ b/router/purchase/purchase.go @@ -9,14 +9,16 @@ purchaseRouter := Router.Group("purchase") PurchaseApi := purchase.PurchaseApi{} { - purchaseRouter.POST("purchase", PurchaseApi.CreatePurchase) // 鍒涘缓閲囪喘鍗� - purchaseRouter.PUT("purchase", PurchaseApi.UpdatePurchase) // 鏇存柊閲囪喘鍗� - purchaseRouter.DELETE("purchase/:id", PurchaseApi.DeletePurchase) // 鍒犻櫎閲囪喘鍗� - purchaseRouter.GET("purchase/:id", PurchaseApi.GetPurchase) // 鑾峰彇鍗曚竴閲囪喘鍗曚俊鎭� - purchaseRouter.GET("purchaseList", PurchaseApi.GetPurchaseList) // 鑾峰彇閲囪喘鍗曞垪琛� - purchaseRouter.POST("submit", PurchaseApi.Submit) // 鎻愪氦閲囪喘鍗� - purchaseRouter.POST("purchaseType", PurchaseApi.SavePurchaseType) // 淇濆瓨閲囪喘绫诲瀷 - purchaseRouter.GET("purchaseTypeList", PurchaseApi.GetPurchaseTypeList) // 鏌ヨ閲囪喘绫诲瀷 + purchaseRouter.POST("purchase", PurchaseApi.CreatePurchase) // 鍒涘缓閲囪喘鍗� + purchaseRouter.PUT("purchase", PurchaseApi.UpdatePurchase) // 鏇存柊閲囪喘鍗� + purchaseRouter.DELETE("purchase/:id", PurchaseApi.DeletePurchase) // 鍒犻櫎閲囪喘鍗� + purchaseRouter.GET("purchase/:id", PurchaseApi.GetPurchase) // 鑾峰彇鍗曚竴閲囪喘鍗曚俊鎭� + purchaseRouter.GET("purchaseList", PurchaseApi.GetPurchaseList) // 鑾峰彇閲囪喘鍗曞垪琛� + purchaseRouter.POST("submit", PurchaseApi.Submit) // 鎻愪氦閲囪喘鍗� + purchaseRouter.POST("purchaseType", PurchaseApi.SavePurchaseType) // 淇濆瓨閲囪喘绫诲瀷 + purchaseRouter.GET("purchaseTypeList", PurchaseApi.GetPurchaseTypeList) // 鏌ヨ閲囪喘绫诲瀷 + purchaseRouter.GET("getWarehouseInfo", PurchaseApi.GetWarehouseInfo) // 鑾峰彇浠撳簱鍒楄〃 + purchaseRouter.GET("getOperationInfo/:id", PurchaseApi.GetOperationInfo) // 鑾峰彇鎿嶄綔淇℃伅 } qualityInspectRouter := Router.Group("purchase") -- Gitblit v1.8.0