From 439b8cf9619e6deb6b42182d0f43cc1252fc9d2a Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期一, 15 四月 2024 11:09:41 +0800 Subject: [PATCH] 获取aps人员列表 --- proto/inventory_order.proto | 14 + proto/inventory_order/inventory_order.pb.go | 307 ++++++++++++++++++++++----- controllers/operation.go | 18 + proto/inventory_order/inventory_order_grpc.pb.go | 36 +++ models/operation.go | 4 docs/swagger.yaml | 51 ++++ request/operation.go | 6 docs/docs.go | 83 +++++++ docs/swagger.json | 83 +++++++ router/router.go | 1 10 files changed, 547 insertions(+), 56 deletions(-) diff --git a/controllers/operation.go b/controllers/operation.go index 63cfdad..216c091 100644 --- a/controllers/operation.go +++ b/controllers/operation.go @@ -1130,3 +1130,21 @@ } util.ResponseFormatListWithPage(c, code.Success, records, int(total), params.Page, params.PageSize) } + +// GetPersonnelList +// @Tags 鍏ュ簱/鍑哄簱 +// @Summary 鑾峰彇浜哄憳鍒楄〃 +// @Produce application/json +// @Param object body request.OperationCondition true "鍙傛暟" +// @Success 200 {object} util.ResponseList{data=[]inventory_order.WorkerInfo} "鎴愬姛" +// @Router /api-wms/v1/operation/getPersonnelList [get] +func (slf OperationController) GetPersonnelList(c *gin.Context) { + cli := inventory_order.NewInventoryOrderServiceClient(init_client.ApsConn) + list, err := cli.GetWorkerList(context.Background(), &inventory_order.GetWorkerListRequest{}) + if err != nil { + util.ResponseFormat(c, code.RequestParamError, "鍐呴儴閿欒") + logx.Error("grpc璋冪敤澶辫触, GetPersonnelList err : " + err.Error()) + return + } + util.ResponseFormat(c, code.Success, list.List) +} diff --git a/docs/docs.go b/docs/docs.go index 574cc1b..e201b02 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1220,6 +1220,51 @@ } } }, + "/api-wms/v1/operation/getPersonnelList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "鍏ュ簱/鍑哄簱" + ], + "summary": "鑾峰彇浜哄憳鍒楄〃", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.OperationCondition" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/inventory_order.WorkerInfo" + } + } + } + } + ] + } + } + } + } + }, "/api-wms/v1/operation/getSupplierList": { "get": { "produces": [ @@ -3067,6 +3112,17 @@ "ReservationNever" ] }, + "inventory_order.WorkerInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "models.Attachment": { "type": "object", "properties": { @@ -3566,6 +3622,9 @@ "models.Operation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "auditDate": { "type": "string" }, @@ -3593,6 +3652,9 @@ "type": "string" }, "createTime": { + "type": "string" + }, + "custodian": { "type": "string" }, "details": { @@ -3625,6 +3687,9 @@ "logisticWeight": { "description": "鐗╂祦閲嶉噺", "type": "number" + }, + "manager": { + "type": "string" }, "number": { "description": "鍗曞彿", @@ -4053,6 +4118,9 @@ "request.AddOperation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "comment": { "description": "澶囨敞", "type": "string" @@ -4071,6 +4139,9 @@ }, "contacterName": { "description": "鑱旂郴浜哄鍚�-闈炲繀濉�", + "type": "string" + }, + "custodian": { "type": "string" }, "details": { @@ -4092,6 +4163,9 @@ "logisticWeight": { "description": "鐗╂祦閲嶉噺", "type": "number" + }, + "manager": { + "type": "string" }, "number": { "description": "鍗曞彿", @@ -4787,6 +4861,9 @@ "request.UpdateOperation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "baseOperationType": { "description": "鍩虹浣滀笟绫诲瀷", "allOf": [ @@ -4815,6 +4892,9 @@ "description": "鑱旂郴浜哄鍚�-闈炲繀濉�", "type": "string" }, + "custodian": { + "type": "string" + }, "details": { "type": "array", "items": { @@ -4835,6 +4915,9 @@ "description": "鐗╂祦閲嶉噺", "type": "number" }, + "manager": { + "type": "string" + }, "number": { "description": "鍗曞彿", "type": "string" diff --git a/docs/swagger.json b/docs/swagger.json index 9d2d5c5..7b47605 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1208,6 +1208,51 @@ } } }, + "/api-wms/v1/operation/getPersonnelList": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "鍏ュ簱/鍑哄簱" + ], + "summary": "鑾峰彇浜哄憳鍒楄〃", + "parameters": [ + { + "description": "鍙傛暟", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.OperationCondition" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/util.ResponseList" + }, + { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/inventory_order.WorkerInfo" + } + } + } + } + ] + } + } + } + } + }, "/api-wms/v1/operation/getSupplierList": { "get": { "produces": [ @@ -3055,6 +3100,17 @@ "ReservationNever" ] }, + "inventory_order.WorkerInfo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "models.Attachment": { "type": "object", "properties": { @@ -3554,6 +3610,9 @@ "models.Operation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "auditDate": { "type": "string" }, @@ -3581,6 +3640,9 @@ "type": "string" }, "createTime": { + "type": "string" + }, + "custodian": { "type": "string" }, "details": { @@ -3613,6 +3675,9 @@ "logisticWeight": { "description": "鐗╂祦閲嶉噺", "type": "number" + }, + "manager": { + "type": "string" }, "number": { "description": "鍗曞彿", @@ -4041,6 +4106,9 @@ "request.AddOperation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "comment": { "description": "澶囨敞", "type": "string" @@ -4059,6 +4127,9 @@ }, "contacterName": { "description": "鑱旂郴浜哄鍚�-闈炲繀濉�", + "type": "string" + }, + "custodian": { "type": "string" }, "details": { @@ -4080,6 +4151,9 @@ "logisticWeight": { "description": "鐗╂祦閲嶉噺", "type": "number" + }, + "manager": { + "type": "string" }, "number": { "description": "鍗曞彿", @@ -4775,6 +4849,9 @@ "request.UpdateOperation": { "type": "object", "properties": { + "accountant": { + "type": "string" + }, "baseOperationType": { "description": "鍩虹浣滀笟绫诲瀷", "allOf": [ @@ -4803,6 +4880,9 @@ "description": "鑱旂郴浜哄鍚�-闈炲繀濉�", "type": "string" }, + "custodian": { + "type": "string" + }, "details": { "type": "array", "items": { @@ -4823,6 +4903,9 @@ "description": "鐗╂祦閲嶉噺", "type": "number" }, + "manager": { + "type": "string" + }, "number": { "description": "鍗曞彿", "type": "string" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 85d71c5..2fb4dd5 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -311,6 +311,13 @@ - WhetherTypeAsk - WhetherTypeAlways - ReservationNever + inventory_order.WorkerInfo: + properties: + id: + type: string + name: + type: string + type: object models.Attachment: properties: FileUrl: @@ -667,6 +674,8 @@ type: object models.Operation: properties: + accountant: + type: string auditDate: type: string baseOperationType: @@ -684,6 +693,8 @@ contacterName: type: string createTime: + type: string + custodian: type: string details: items: @@ -705,6 +716,8 @@ logisticWeight: description: 鐗╂祦閲嶉噺 type: number + manager: + type: string number: description: 鍗曞彿 type: string @@ -995,6 +1008,8 @@ type: object request.AddOperation: properties: + accountant: + type: string comment: description: 澶囨敞 type: string @@ -1010,6 +1025,8 @@ contacterName: description: 鑱旂郴浜哄鍚�-闈炲繀濉� type: string + custodian: + type: string details: items: $ref: '#/definitions/request.OperationDetails' @@ -1024,6 +1041,8 @@ logisticWeight: description: 鐗╂祦閲嶉噺 type: number + manager: + type: string number: description: 鍗曞彿 type: string @@ -1507,6 +1526,8 @@ type: object request.UpdateOperation: properties: + accountant: + type: string baseOperationType: allOf: - $ref: '#/definitions/constvar.BaseOperationType' @@ -1526,6 +1547,8 @@ contacterName: description: 鑱旂郴浜哄鍚�-闈炲繀濉� type: string + custodian: + type: string details: items: $ref: '#/definitions/request.OperationDetails' @@ -1540,6 +1563,8 @@ logisticWeight: description: 鐗╂祦閲嶉噺 type: number + manager: + type: string number: description: 鍗曞彿 type: string @@ -2506,6 +2531,32 @@ summary: 鍏ュ簱/鍑哄簱鍒楄〃 tags: - 鍏ュ簱/鍑哄簱 + /api-wms/v1/operation/getPersonnelList: + get: + parameters: + - description: 鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.OperationCondition' + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/util.ResponseList' + - properties: + data: + items: + $ref: '#/definitions/inventory_order.WorkerInfo' + type: array + type: object + summary: 鑾峰彇浜哄憳鍒楄〃 + tags: + - 鍏ュ簱/鍑哄簱 /api-wms/v1/operation/getSupplierList: get: produces: diff --git a/models/operation.go b/models/operation.go index bd56ea2..15e2fd9 100644 --- a/models/operation.go +++ b/models/operation.go @@ -49,6 +49,10 @@ ToLocationID int `json:"toLocationId" gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"` //鐩爣浣嶇疆id ToLocation Location `json:"toLocation" gorm:"foreignKey:ToLocationID;references:Id"` //鐩爣浣嶇疆 SalesDetailsNumber string `gorm:"type:varchar(191);comment:閿�鍞槑缁嗙紪鐮�" json:"salesDetailsNumber"` + + Manager string `json:"manager" gorm:"type:varchar(255);comment:涓荤"` + Accountant string `json:"accountant" gorm:"type:varchar(255);comment:浼氳"` + Custodian string `json:"custodian" gorm:"type:varchar(255);comment:淇濈鍛�"` } OperationSearch struct { diff --git a/proto/inventory_order.proto b/proto/inventory_order.proto index 8820551..4e5cb81 100644 --- a/proto/inventory_order.proto +++ b/proto/inventory_order.proto @@ -11,6 +11,7 @@ rpc GetWarehouseInfo(GetWarehouseInfoRequest) returns(GetWarehouseInfoResponse) {} rpc UpdateOutsourceOrder(UpdateOutsourceOrderRequest) returns(UpdateOutsourceOrderResponse) {} rpc GetOperationInfo(GetOperationInfoRequest) returns(GetOperationInfoResponse) {} + rpc GetWorkerList(GetWorkerListRequest) returns(GetWorkerListResponse) {} } message CreateNewOrderRequest{ @@ -106,4 +107,17 @@ string SalesDetailsNumber = 2;//閿�鍞槑缁嗙紪鐮� string ProductId = 3; int64 Amount = 4; +} + +//-------------------------------------------------GetWorkerList----------------------------------------- + +message GetWorkerListRequest{ +} + +message WorkerInfo{ + string id = 1; + string name = 2; +} +message GetWorkerListResponse{ + repeated WorkerInfo List = 1; } \ No newline at end of file diff --git a/proto/inventory_order/inventory_order.pb.go b/proto/inventory_order/inventory_order.pb.go index e7c37bd..30f00ba 100644 --- a/proto/inventory_order/inventory_order.pb.go +++ b/proto/inventory_order/inventory_order.pb.go @@ -961,6 +961,146 @@ return 0 } +type GetWorkerListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetWorkerListRequest) Reset() { + *x = GetWorkerListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_order_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkerListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkerListRequest) ProtoMessage() {} + +func (x *GetWorkerListRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventory_order_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 GetWorkerListRequest.ProtoReflect.Descriptor instead. +func (*GetWorkerListRequest) Descriptor() ([]byte, []int) { + return file_inventory_order_proto_rawDescGZIP(), []int{17} +} + +type WorkerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *WorkerInfo) Reset() { + *x = WorkerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_order_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerInfo) ProtoMessage() {} + +func (x *WorkerInfo) ProtoReflect() protoreflect.Message { + mi := &file_inventory_order_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 WorkerInfo.ProtoReflect.Descriptor instead. +func (*WorkerInfo) Descriptor() ([]byte, []int) { + return file_inventory_order_proto_rawDescGZIP(), []int{18} +} + +func (x *WorkerInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WorkerInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetWorkerListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*WorkerInfo `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"` +} + +func (x *GetWorkerListResponse) Reset() { + *x = GetWorkerListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventory_order_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkerListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkerListResponse) ProtoMessage() {} + +func (x *GetWorkerListResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventory_order_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 GetWorkerListResponse.ProtoReflect.Descriptor instead. +func (*GetWorkerListResponse) Descriptor() ([]byte, []int) { + return file_inventory_order_proto_rawDescGZIP(), []int{19} +} + +func (x *GetWorkerListResponse) GetList() []*WorkerInfo { + if x != nil { + return x.List + } + return nil +} + var File_inventory_order_proto protoreflect.FileDescriptor var file_inventory_order_proto_rawDesc = []byte{ @@ -1066,41 +1206,54 @@ 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x83, 0x04, 0x0a, 0x15, 0x69, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, - 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, - 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, 0x70, - 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, - 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, - 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 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, 0x55, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, - 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 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, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x03, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x30, 0x0a, 0x0a, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, + 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xc5, + 0x04, 0x0a, 0x15, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x65, 0x77, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, + 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x64, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x57, 0x61, + 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 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, 0x55, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4f, 0x75, 0x74, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, + 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 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, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1115,7 +1268,7 @@ return file_inventory_order_proto_rawDescData } -var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_inventory_order_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_inventory_order_proto_goTypes = []interface{}{ (*CreateNewOrderRequest)(nil), // 0: CreateNewOrderRequest (*CreateNewOrderResponse)(nil), // 1: CreateNewOrderResponse @@ -1134,33 +1287,39 @@ (*GetOperationInfoRequest)(nil), // 14: GetOperationInfoRequest (*GetOperationInfoResponse)(nil), // 15: GetOperationInfoResponse (*OperationInfo)(nil), // 16: OperationInfo - (common.OperationSource)(0), // 17: OperationSource + (*GetWorkerListRequest)(nil), // 17: GetWorkerListRequest + (*WorkerInfo)(nil), // 18: WorkerInfo + (*GetWorkerListResponse)(nil), // 19: GetWorkerListResponse + (common.OperationSource)(0), // 20: OperationSource } var file_inventory_order_proto_depIdxs = []int32{ 2, // 0: OperationList.Products:type_name -> OperationProduct 3, // 1: CreateOperationListRequest.List:type_name -> OperationList - 17, // 2: CreateOperationListRequest.OperationSource:type_name -> OperationSource + 20, // 2: CreateOperationListRequest.OperationSource:type_name -> OperationSource 5, // 3: CreateOperationListResponse.List:type_name -> OperationResponse 10, // 4: GetWarehouseInfoResponse.List:type_name -> WarehouseInfo 2, // 5: UpdateOutsourceOrderRequest.Products:type_name -> OperationProduct 16, // 6: GetOperationInfoResponse.list:type_name -> OperationInfo - 0, // 7: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest - 4, // 8: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest - 7, // 9: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest - 9, // 10: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest - 12, // 11: inventoryOrderService.UpdateOutsourceOrder:input_type -> UpdateOutsourceOrderRequest - 14, // 12: inventoryOrderService.GetOperationInfo:input_type -> GetOperationInfoRequest - 1, // 13: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse - 6, // 14: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse - 8, // 15: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse - 11, // 16: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse - 13, // 17: inventoryOrderService.UpdateOutsourceOrder:output_type -> UpdateOutsourceOrderResponse - 15, // 18: inventoryOrderService.GetOperationInfo:output_type -> GetOperationInfoResponse - 13, // [13:19] is the sub-list for method output_type - 7, // [7:13] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 18, // 7: GetWorkerListResponse.List:type_name -> WorkerInfo + 0, // 8: inventoryOrderService.CreateNewOrder:input_type -> CreateNewOrderRequest + 4, // 9: inventoryOrderService.CreateOperationList:input_type -> CreateOperationListRequest + 7, // 10: inventoryOrderService.UpdateMaterialApplyStatus:input_type -> UpdateMaterialApplyStatusRequest + 9, // 11: inventoryOrderService.GetWarehouseInfo:input_type -> GetWarehouseInfoRequest + 12, // 12: inventoryOrderService.UpdateOutsourceOrder:input_type -> UpdateOutsourceOrderRequest + 14, // 13: inventoryOrderService.GetOperationInfo:input_type -> GetOperationInfoRequest + 17, // 14: inventoryOrderService.GetWorkerList:input_type -> GetWorkerListRequest + 1, // 15: inventoryOrderService.CreateNewOrder:output_type -> CreateNewOrderResponse + 6, // 16: inventoryOrderService.CreateOperationList:output_type -> CreateOperationListResponse + 8, // 17: inventoryOrderService.UpdateMaterialApplyStatus:output_type -> UpdateMaterialApplyStatusResponse + 11, // 18: inventoryOrderService.GetWarehouseInfo:output_type -> GetWarehouseInfoResponse + 13, // 19: inventoryOrderService.UpdateOutsourceOrder:output_type -> UpdateOutsourceOrderResponse + 15, // 20: inventoryOrderService.GetOperationInfo:output_type -> GetOperationInfoResponse + 19, // 21: inventoryOrderService.GetWorkerList:output_type -> GetWorkerListResponse + 15, // [15:22] is the sub-list for method output_type + 8, // [8:15] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_inventory_order_proto_init() } @@ -1373,6 +1532,42 @@ return nil } } + file_inventory_order_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkerListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_order_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventory_order_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkerListResponse); 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{ @@ -1380,7 +1575,7 @@ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_inventory_order_proto_rawDesc, NumEnums: 0, - NumMessages: 17, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/inventory_order/inventory_order_grpc.pb.go b/proto/inventory_order/inventory_order_grpc.pb.go index 2cccf05..ced1aa4 100644 --- a/proto/inventory_order/inventory_order_grpc.pb.go +++ b/proto/inventory_order/inventory_order_grpc.pb.go @@ -24,6 +24,7 @@ GetWarehouseInfo(ctx context.Context, in *GetWarehouseInfoRequest, opts ...grpc.CallOption) (*GetWarehouseInfoResponse, error) UpdateOutsourceOrder(ctx context.Context, in *UpdateOutsourceOrderRequest, opts ...grpc.CallOption) (*UpdateOutsourceOrderResponse, error) GetOperationInfo(ctx context.Context, in *GetOperationInfoRequest, opts ...grpc.CallOption) (*GetOperationInfoResponse, error) + GetWorkerList(ctx context.Context, in *GetWorkerListRequest, opts ...grpc.CallOption) (*GetWorkerListResponse, error) } type inventoryOrderServiceClient struct { @@ -88,6 +89,15 @@ return out, nil } +func (c *inventoryOrderServiceClient) GetWorkerList(ctx context.Context, in *GetWorkerListRequest, opts ...grpc.CallOption) (*GetWorkerListResponse, error) { + out := new(GetWorkerListResponse) + err := c.cc.Invoke(ctx, "/inventoryOrderService/GetWorkerList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // InventoryOrderServiceServer is the server API for InventoryOrderService service. // All implementations must embed UnimplementedInventoryOrderServiceServer // for forward compatibility @@ -98,6 +108,7 @@ GetWarehouseInfo(context.Context, *GetWarehouseInfoRequest) (*GetWarehouseInfoResponse, error) UpdateOutsourceOrder(context.Context, *UpdateOutsourceOrderRequest) (*UpdateOutsourceOrderResponse, error) GetOperationInfo(context.Context, *GetOperationInfoRequest) (*GetOperationInfoResponse, error) + GetWorkerList(context.Context, *GetWorkerListRequest) (*GetWorkerListResponse, error) mustEmbedUnimplementedInventoryOrderServiceServer() } @@ -122,6 +133,9 @@ } func (UnimplementedInventoryOrderServiceServer) GetOperationInfo(context.Context, *GetOperationInfoRequest) (*GetOperationInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOperationInfo not implemented") +} +func (UnimplementedInventoryOrderServiceServer) GetWorkerList(context.Context, *GetWorkerListRequest) (*GetWorkerListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkerList not implemented") } func (UnimplementedInventoryOrderServiceServer) mustEmbedUnimplementedInventoryOrderServiceServer() {} @@ -244,6 +258,24 @@ return interceptor(ctx, in, info, handler) } +func _InventoryOrderService_GetWorkerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkerListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InventoryOrderServiceServer).GetWorkerList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/inventoryOrderService/GetWorkerList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InventoryOrderServiceServer).GetWorkerList(ctx, req.(*GetWorkerListRequest)) + } + return interceptor(ctx, in, info, handler) +} + // InventoryOrderService_ServiceDesc is the grpc.ServiceDesc for InventoryOrderService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -275,6 +307,10 @@ MethodName: "GetOperationInfo", Handler: _InventoryOrderService_GetOperationInfo_Handler, }, + { + MethodName: "GetWorkerList", + Handler: _InventoryOrderService_GetWorkerList_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "inventory_order.proto", diff --git a/request/operation.go b/request/operation.go index dc95942..2f2050a 100644 --- a/request/operation.go +++ b/request/operation.go @@ -30,6 +30,9 @@ ReceiverAddr string `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"` LocationId int `json:"locationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"` //鐩爣浣嶇疆id + Manager string `json:"manager" gorm:"type:varchar(255);comment:涓荤"` + Accountant string `json:"accountant" gorm:"type:varchar(255);comment:浼氳"` + Custodian string `json:"custodian" gorm:"type:varchar(255);comment:淇濈鍛�"` } type OperationDetails struct { @@ -76,6 +79,9 @@ ReceiverAddr string `json:"receiverAddr" gorm:"type:varchar(255);comment:鏀惰揣鍦板潃"` LocationId int `json:"locationId" gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d ToLocationId int `json:"toLocationId" gorm:"type:int;not null;comment:浠撳簱浣嶇疆id"` //鐩爣浣嶇疆id + Manager string `json:"manager" gorm:"type:varchar(255);comment:涓荤"` + Accountant string `json:"accountant" gorm:"type:varchar(255);comment:浼氳"` + Custodian string `json:"custodian" gorm:"type:varchar(255);comment:淇濈鍛�"` } type OperationAllList struct { diff --git a/router/router.go b/router/router.go index 1b936db..b759a4c 100644 --- a/router/router.go +++ b/router/router.go @@ -94,6 +94,7 @@ operationAPI.GET("getSupplierList", operationController.GetSupplierList) operationAPI.GET("getClientList", operationController.GetClientList) operationAPI.POST("listByCondition", operationController.ListByCondition) + operationAPI.GET("getPersonnelList", operationController.GetPersonnelList) } -- Gitblit v1.8.0