| | |
| | | OverOutbound //出库完成 |
| | | OverCLose //已关闭 |
| | | ) |
| | | |
| | | func (s SalesDetailsStatus) Valid() bool { |
| | | return s == WaitConfirmed || s == WaitOutbound || s == OverOutbound || s == OverCLose |
| | | } |
| | |
| | | rpc GetCrmSalesDetailsList(GetCrmSalesDetailsListRequest) returns(GetCrmSalesDetailsListResponse) {} |
| | | rpc SendSalesDetailsAndProjectToCrm(SendSalesDetailsAndProjectToCrmRequest) returns(SendSalesDetailsAndProjectToCrmResponse) {} |
| | | rpc GetClientList(GetClientListRequest) returns(GetClientListResponse) {} |
| | | rpc UpdateSalesDetail(UpdateSalesDetailRequest) returns(UpdateSalesDetailResponse) {} |
| | | rpc RemoveSalesDetail(RemoveSalesDetailRequest) returns(RemoveSalesDetailRequest) {} |
| | | } |
| | | |
| | | //-----------------------------------------------------GetApsProjectList-------------------------------------- |
| | |
| | | } |
| | | |
| | | |
| | | message UpdateSalesDetailRequest { |
| | | string number = 1;//销售明细单号 |
| | | int32 status = 2;//状态 |
| | | } |
| | | |
| | | message UpdateSalesDetailResponse {} |
| | | |
| | | message RemoveSalesDetailRequest { |
| | | string number = 1;//销售明细单号 |
| | | } |
| | | |
| | | message RemoveSalesDetailResponse {} |
| | |
| | | return "" |
| | | } |
| | | |
| | | type UpdateSalesDetailRequest struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` //销售明细单号 |
| | | Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` //状态 |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailRequest) Reset() { |
| | | *x = UpdateSalesDetailRequest{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_crm_aps_proto_msgTypes[14] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailRequest) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*UpdateSalesDetailRequest) ProtoMessage() {} |
| | | |
| | | func (x *UpdateSalesDetailRequest) ProtoReflect() protoreflect.Message { |
| | | mi := &file_crm_aps_proto_msgTypes[14] |
| | | 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 UpdateSalesDetailRequest.ProtoReflect.Descriptor instead. |
| | | func (*UpdateSalesDetailRequest) Descriptor() ([]byte, []int) { |
| | | return file_crm_aps_proto_rawDescGZIP(), []int{14} |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailRequest) GetNumber() string { |
| | | if x != nil { |
| | | return x.Number |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailRequest) GetStatus() int32 { |
| | | if x != nil { |
| | | return x.Status |
| | | } |
| | | return 0 |
| | | } |
| | | |
| | | type UpdateSalesDetailResponse struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailResponse) Reset() { |
| | | *x = UpdateSalesDetailResponse{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_crm_aps_proto_msgTypes[15] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *UpdateSalesDetailResponse) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*UpdateSalesDetailResponse) ProtoMessage() {} |
| | | |
| | | func (x *UpdateSalesDetailResponse) ProtoReflect() protoreflect.Message { |
| | | mi := &file_crm_aps_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 UpdateSalesDetailResponse.ProtoReflect.Descriptor instead. |
| | | func (*UpdateSalesDetailResponse) Descriptor() ([]byte, []int) { |
| | | return file_crm_aps_proto_rawDescGZIP(), []int{15} |
| | | } |
| | | |
| | | type RemoveSalesDetailRequest struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | |
| | | Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"` //销售明细单号 |
| | | } |
| | | |
| | | func (x *RemoveSalesDetailRequest) Reset() { |
| | | *x = RemoveSalesDetailRequest{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_crm_aps_proto_msgTypes[16] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *RemoveSalesDetailRequest) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*RemoveSalesDetailRequest) ProtoMessage() {} |
| | | |
| | | func (x *RemoveSalesDetailRequest) ProtoReflect() protoreflect.Message { |
| | | mi := &file_crm_aps_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 RemoveSalesDetailRequest.ProtoReflect.Descriptor instead. |
| | | func (*RemoveSalesDetailRequest) Descriptor() ([]byte, []int) { |
| | | return file_crm_aps_proto_rawDescGZIP(), []int{16} |
| | | } |
| | | |
| | | func (x *RemoveSalesDetailRequest) GetNumber() string { |
| | | if x != nil { |
| | | return x.Number |
| | | } |
| | | return "" |
| | | } |
| | | |
| | | type RemoveSalesDetailResponse struct { |
| | | state protoimpl.MessageState |
| | | sizeCache protoimpl.SizeCache |
| | | unknownFields protoimpl.UnknownFields |
| | | } |
| | | |
| | | func (x *RemoveSalesDetailResponse) Reset() { |
| | | *x = RemoveSalesDetailResponse{} |
| | | if protoimpl.UnsafeEnabled { |
| | | mi := &file_crm_aps_proto_msgTypes[17] |
| | | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| | | ms.StoreMessageInfo(mi) |
| | | } |
| | | } |
| | | |
| | | func (x *RemoveSalesDetailResponse) String() string { |
| | | return protoimpl.X.MessageStringOf(x) |
| | | } |
| | | |
| | | func (*RemoveSalesDetailResponse) ProtoMessage() {} |
| | | |
| | | func (x *RemoveSalesDetailResponse) ProtoReflect() protoreflect.Message { |
| | | mi := &file_crm_aps_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 RemoveSalesDetailResponse.ProtoReflect.Descriptor instead. |
| | | func (*RemoveSalesDetailResponse) Descriptor() ([]byte, []int) { |
| | | return file_crm_aps_proto_rawDescGZIP(), []int{17} |
| | | } |
| | | |
| | | var File_crm_aps_proto protoreflect.FileDescriptor |
| | | |
| | | var file_crm_aps_proto_rawDesc = []byte{ |
| | |
| | | 0x43, 0x6c, 0x69, 0x65, 0x6e, 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, 0x12, 0x12, |
| | | 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, |
| | | 0x6d, 0x65, 0x32, 0xea, 0x03, 0x0a, 0x14, 0x43, 0x72, 0x6d, 0x41, 0x6e, 0x64, 0x41, 0x70, 0x73, |
| | | 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x47, |
| | | 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, |
| | | 0x12, 0x19, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, |
| | | 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x47, 0x65, |
| | | 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, |
| | | 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x1c, 0x53, 0x65, 0x6e, |
| | | 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, |
| | | 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x53, 0x65, 0x6e, 0x64, |
| | | 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, |
| | | 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, |
| | | 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1b, |
| | | 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, |
| | | 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x18, 0x52, |
| | | 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, |
| | | 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, |
| | | 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, |
| | | 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x85, 0x05, 0x0a, |
| | | 0x14, 0x43, 0x72, 0x6d, 0x41, 0x6e, 0x64, 0x41, 0x70, 0x73, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, |
| | | 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, |
| | | 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x2e, 0x47, 0x65, 0x74, |
| | | 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, |
| | | 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x73, 0x50, 0x72, |
| | | 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, |
| | | 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, |
| | | 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, |
| | | 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, |
| | | 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x53, 0x65, 0x6e, 0x64, |
| | | 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, |
| | | 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, |
| | | 0x25, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, |
| | | 0x6c, 0x73, 0x54, 0x6f, 0x41, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, |
| | | 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, |
| | | 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4c, 0x69, |
| | | 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, |
| | | 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, 0x73, |
| | | 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, |
| | | 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x1f, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, |
| | | 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6a, |
| | | 0x65, 0x63, 0x74, 0x54, 0x6f, 0x43, 0x72, 0x6d, 0x12, 0x27, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, |
| | | 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x50, 0x72, |
| | | 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x43, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, |
| | | 0x74, 0x1a, 0x28, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, |
| | | 0x61, 0x69, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, |
| | | 0x43, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, |
| | | 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, |
| | | 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, |
| | | 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, |
| | | 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, |
| | | 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x63, 0x72, 0x6d, 0x5f, 0x61, 0x70, 0x73, 0x62, 0x06, 0x70, 0x72, |
| | | 0x6f, 0x74, 0x6f, 0x33, |
| | | 0x73, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, |
| | | 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, |
| | | 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x47, |
| | | 0x65, 0x74, 0x43, 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, |
| | | 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x47, |
| | | 0x65, 0x74, 0x43, 0x72, 0x6d, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, |
| | | 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, |
| | | 0x76, 0x0a, 0x1f, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, |
| | | 0x69, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x43, |
| | | 0x72, 0x6d, 0x12, 0x27, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, |
| | | 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, |
| | | 0x6f, 0x43, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x53, 0x65, |
| | | 0x6e, 0x64, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x41, 0x6e, |
| | | 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x43, 0x72, 0x6d, 0x52, 0x65, 0x73, |
| | | 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6c, |
| | | 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, |
| | | 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, |
| | | 0x16, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, |
| | | 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x55, 0x70, 0x64, |
| | | 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, |
| | | 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, |
| | | 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x55, 0x70, 0x64, 0x61, |
| | | 0x74, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, |
| | | 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, |
| | | 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x19, 0x2e, 0x52, |
| | | 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, |
| | | 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, |
| | | 0x53, 0x61, 0x6c, 0x65, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, |
| | | 0x73, 0x74, 0x22, 0x00, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x63, 0x72, 0x6d, 0x5f, 0x61, 0x70, |
| | | 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| | | } |
| | | |
| | | var ( |
| | |
| | | return file_crm_aps_proto_rawDescData |
| | | } |
| | | |
| | | var file_crm_aps_proto_msgTypes = make([]protoimpl.MessageInfo, 14) |
| | | var file_crm_aps_proto_msgTypes = make([]protoimpl.MessageInfo, 18) |
| | | var file_crm_aps_proto_goTypes = []interface{}{ |
| | | (*GetApsProjectListRequest)(nil), // 0: GetApsProjectListRequest |
| | | (*ApsProject)(nil), // 1: ApsProject |
| | |
| | | (*GetClientListRequest)(nil), // 11: GetClientListRequest |
| | | (*GetClientListResponse)(nil), // 12: GetClientListResponse |
| | | (*Client)(nil), // 13: Client |
| | | (*UpdateSalesDetailRequest)(nil), // 14: UpdateSalesDetailRequest |
| | | (*UpdateSalesDetailResponse)(nil), // 15: UpdateSalesDetailResponse |
| | | (*RemoveSalesDetailRequest)(nil), // 16: RemoveSalesDetailRequest |
| | | (*RemoveSalesDetailResponse)(nil), // 17: RemoveSalesDetailResponse |
| | | } |
| | | var file_crm_aps_proto_depIdxs = []int32{ |
| | | 1, // 0: GetApsProjectListResponse.List:type_name -> ApsProject |
| | |
| | | 6, // 6: CrmAndApsGrpcService.GetCrmSalesDetailsList:input_type -> GetCrmSalesDetailsListRequest |
| | | 9, // 7: CrmAndApsGrpcService.SendSalesDetailsAndProjectToCrm:input_type -> SendSalesDetailsAndProjectToCrmRequest |
| | | 11, // 8: CrmAndApsGrpcService.GetClientList:input_type -> GetClientListRequest |
| | | 2, // 9: CrmAndApsGrpcService.GetApsProjectList:output_type -> GetApsProjectListResponse |
| | | 5, // 10: CrmAndApsGrpcService.SendSalesDetailsToApsProject:output_type -> SendSalesDetailsToApsProjectResponse |
| | | 8, // 11: CrmAndApsGrpcService.GetCrmSalesDetailsList:output_type -> GetCrmSalesDetailsListResponse |
| | | 10, // 12: CrmAndApsGrpcService.SendSalesDetailsAndProjectToCrm:output_type -> SendSalesDetailsAndProjectToCrmResponse |
| | | 12, // 13: CrmAndApsGrpcService.GetClientList:output_type -> GetClientListResponse |
| | | 9, // [9:14] is the sub-list for method output_type |
| | | 4, // [4:9] is the sub-list for method input_type |
| | | 14, // 9: CrmAndApsGrpcService.UpdateSalesDetail:input_type -> UpdateSalesDetailRequest |
| | | 16, // 10: CrmAndApsGrpcService.RemoveSalesDetail:input_type -> RemoveSalesDetailRequest |
| | | 2, // 11: CrmAndApsGrpcService.GetApsProjectList:output_type -> GetApsProjectListResponse |
| | | 5, // 12: CrmAndApsGrpcService.SendSalesDetailsToApsProject:output_type -> SendSalesDetailsToApsProjectResponse |
| | | 8, // 13: CrmAndApsGrpcService.GetCrmSalesDetailsList:output_type -> GetCrmSalesDetailsListResponse |
| | | 10, // 14: CrmAndApsGrpcService.SendSalesDetailsAndProjectToCrm:output_type -> SendSalesDetailsAndProjectToCrmResponse |
| | | 12, // 15: CrmAndApsGrpcService.GetClientList:output_type -> GetClientListResponse |
| | | 15, // 16: CrmAndApsGrpcService.UpdateSalesDetail:output_type -> UpdateSalesDetailResponse |
| | | 16, // 17: CrmAndApsGrpcService.RemoveSalesDetail:output_type -> RemoveSalesDetailRequest |
| | | 11, // [11:18] is the sub-list for method output_type |
| | | 4, // [4:11] is the sub-list for method input_type |
| | | 4, // [4:4] is the sub-list for extension type_name |
| | | 4, // [4:4] is the sub-list for extension extendee |
| | | 0, // [0:4] is the sub-list for field type_name |
| | |
| | | return nil |
| | | } |
| | | } |
| | | file_crm_aps_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*UpdateSalesDetailRequest); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_crm_aps_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*UpdateSalesDetailResponse); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_crm_aps_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*RemoveSalesDetailRequest); i { |
| | | case 0: |
| | | return &v.state |
| | | case 1: |
| | | return &v.sizeCache |
| | | case 2: |
| | | return &v.unknownFields |
| | | default: |
| | | return nil |
| | | } |
| | | } |
| | | file_crm_aps_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { |
| | | switch v := v.(*RemoveSalesDetailResponse); 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{ |
| | |
| | | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| | | RawDescriptor: file_crm_aps_proto_rawDesc, |
| | | NumEnums: 0, |
| | | NumMessages: 14, |
| | | NumMessages: 18, |
| | | NumExtensions: 0, |
| | | NumServices: 1, |
| | | }, |
| | |
| | | CrmAndApsGrpcService_GetCrmSalesDetailsList_FullMethodName = "/CrmAndApsGrpcService/GetCrmSalesDetailsList" |
| | | CrmAndApsGrpcService_SendSalesDetailsAndProjectToCrm_FullMethodName = "/CrmAndApsGrpcService/SendSalesDetailsAndProjectToCrm" |
| | | CrmAndApsGrpcService_GetClientList_FullMethodName = "/CrmAndApsGrpcService/GetClientList" |
| | | CrmAndApsGrpcService_UpdateSalesDetail_FullMethodName = "/CrmAndApsGrpcService/UpdateSalesDetail" |
| | | CrmAndApsGrpcService_RemoveSalesDetail_FullMethodName = "/CrmAndApsGrpcService/RemoveSalesDetail" |
| | | ) |
| | | |
| | | // CrmAndApsGrpcServiceClient is the client API for CrmAndApsGrpcService service. |
| | |
| | | GetCrmSalesDetailsList(ctx context.Context, in *GetCrmSalesDetailsListRequest, opts ...grpc.CallOption) (*GetCrmSalesDetailsListResponse, error) |
| | | SendSalesDetailsAndProjectToCrm(ctx context.Context, in *SendSalesDetailsAndProjectToCrmRequest, opts ...grpc.CallOption) (*SendSalesDetailsAndProjectToCrmResponse, error) |
| | | GetClientList(ctx context.Context, in *GetClientListRequest, opts ...grpc.CallOption) (*GetClientListResponse, error) |
| | | UpdateSalesDetail(ctx context.Context, in *UpdateSalesDetailRequest, opts ...grpc.CallOption) (*UpdateSalesDetailResponse, error) |
| | | RemoveSalesDetail(ctx context.Context, in *RemoveSalesDetailRequest, opts ...grpc.CallOption) (*RemoveSalesDetailRequest, error) |
| | | } |
| | | |
| | | type crmAndApsGrpcServiceClient struct { |
| | |
| | | return out, nil |
| | | } |
| | | |
| | | func (c *crmAndApsGrpcServiceClient) UpdateSalesDetail(ctx context.Context, in *UpdateSalesDetailRequest, opts ...grpc.CallOption) (*UpdateSalesDetailResponse, error) { |
| | | out := new(UpdateSalesDetailResponse) |
| | | err := c.cc.Invoke(ctx, CrmAndApsGrpcService_UpdateSalesDetail_FullMethodName, in, out, opts...) |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | return out, nil |
| | | } |
| | | |
| | | func (c *crmAndApsGrpcServiceClient) RemoveSalesDetail(ctx context.Context, in *RemoveSalesDetailRequest, opts ...grpc.CallOption) (*RemoveSalesDetailRequest, error) { |
| | | out := new(RemoveSalesDetailRequest) |
| | | err := c.cc.Invoke(ctx, CrmAndApsGrpcService_RemoveSalesDetail_FullMethodName, in, out, opts...) |
| | | if err != nil { |
| | | return nil, err |
| | | } |
| | | return out, nil |
| | | } |
| | | |
| | | // CrmAndApsGrpcServiceServer is the server API for CrmAndApsGrpcService service. |
| | | // All implementations must embed UnimplementedCrmAndApsGrpcServiceServer |
| | | // for forward compatibility |
| | |
| | | GetCrmSalesDetailsList(context.Context, *GetCrmSalesDetailsListRequest) (*GetCrmSalesDetailsListResponse, error) |
| | | SendSalesDetailsAndProjectToCrm(context.Context, *SendSalesDetailsAndProjectToCrmRequest) (*SendSalesDetailsAndProjectToCrmResponse, error) |
| | | GetClientList(context.Context, *GetClientListRequest) (*GetClientListResponse, error) |
| | | UpdateSalesDetail(context.Context, *UpdateSalesDetailRequest) (*UpdateSalesDetailResponse, error) |
| | | RemoveSalesDetail(context.Context, *RemoveSalesDetailRequest) (*RemoveSalesDetailRequest, error) |
| | | mustEmbedUnimplementedCrmAndApsGrpcServiceServer() |
| | | } |
| | | |
| | |
| | | } |
| | | func (UnimplementedCrmAndApsGrpcServiceServer) GetClientList(context.Context, *GetClientListRequest) (*GetClientListResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method GetClientList not implemented") |
| | | } |
| | | func (UnimplementedCrmAndApsGrpcServiceServer) UpdateSalesDetail(context.Context, *UpdateSalesDetailRequest) (*UpdateSalesDetailResponse, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method UpdateSalesDetail not implemented") |
| | | } |
| | | func (UnimplementedCrmAndApsGrpcServiceServer) RemoveSalesDetail(context.Context, *RemoveSalesDetailRequest) (*RemoveSalesDetailRequest, error) { |
| | | return nil, status.Errorf(codes.Unimplemented, "method RemoveSalesDetail not implemented") |
| | | } |
| | | func (UnimplementedCrmAndApsGrpcServiceServer) mustEmbedUnimplementedCrmAndApsGrpcServiceServer() {} |
| | | |
| | |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | func _CrmAndApsGrpcService_UpdateSalesDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| | | in := new(UpdateSalesDetailRequest) |
| | | if err := dec(in); err != nil { |
| | | return nil, err |
| | | } |
| | | if interceptor == nil { |
| | | return srv.(CrmAndApsGrpcServiceServer).UpdateSalesDetail(ctx, in) |
| | | } |
| | | info := &grpc.UnaryServerInfo{ |
| | | Server: srv, |
| | | FullMethod: CrmAndApsGrpcService_UpdateSalesDetail_FullMethodName, |
| | | } |
| | | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| | | return srv.(CrmAndApsGrpcServiceServer).UpdateSalesDetail(ctx, req.(*UpdateSalesDetailRequest)) |
| | | } |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | func _CrmAndApsGrpcService_RemoveSalesDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| | | in := new(RemoveSalesDetailRequest) |
| | | if err := dec(in); err != nil { |
| | | return nil, err |
| | | } |
| | | if interceptor == nil { |
| | | return srv.(CrmAndApsGrpcServiceServer).RemoveSalesDetail(ctx, in) |
| | | } |
| | | info := &grpc.UnaryServerInfo{ |
| | | Server: srv, |
| | | FullMethod: CrmAndApsGrpcService_RemoveSalesDetail_FullMethodName, |
| | | } |
| | | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| | | return srv.(CrmAndApsGrpcServiceServer).RemoveSalesDetail(ctx, req.(*RemoveSalesDetailRequest)) |
| | | } |
| | | return interceptor(ctx, in, info, handler) |
| | | } |
| | | |
| | | // CrmAndApsGrpcService_ServiceDesc is the grpc.ServiceDesc for CrmAndApsGrpcService service. |
| | | // It's only intended for direct use with grpc.RegisterService, |
| | | // and not to be introspected or modified (even as a copy) |
| | |
| | | MethodName: "GetClientList", |
| | | Handler: _CrmAndApsGrpcService_GetClientList_Handler, |
| | | }, |
| | | { |
| | | MethodName: "UpdateSalesDetail", |
| | | Handler: _CrmAndApsGrpcService_UpdateSalesDetail_Handler, |
| | | }, |
| | | { |
| | | MethodName: "RemoveSalesDetail", |
| | | Handler: _CrmAndApsGrpcService_RemoveSalesDetail_Handler, |
| | | }, |
| | | }, |
| | | Streams: []grpc.StreamDesc{}, |
| | | Metadata: "crm_aps.proto", |
| | |
| | | "errors" |
| | | "fmt" |
| | | "github.com/shopspring/decimal" |
| | | "gorm.io/gorm" |
| | | ) |
| | | |
| | | type Server struct { |
| | |
| | | } |
| | | return resp, nil |
| | | } |
| | | func (s *Server) UpdateSalesDetail(ctx context.Context, req *UpdateSalesDetailRequest) (*UpdateSalesDetailResponse, error) { |
| | | if req.Number == "" { |
| | | return nil, errors.New("销售明细编号为空") |
| | | } |
| | | if req.Status == 0 { |
| | | return nil, errors.New("销售明细状态为空") |
| | | } |
| | | |
| | | status := constvar.SalesDetailsStatus(int(req.Status)) |
| | | if !status.Valid() { |
| | | return nil, errors.New("销售明细状态不正确") |
| | | } |
| | | |
| | | salesDetail, err := model.NewSalesDetailsSearch().SetNumber(req.Number).First() |
| | | if err == gorm.ErrRecordNotFound { |
| | | return nil, errors.New("销售明细不存在") |
| | | } |
| | | |
| | | salesDetail.Status = status |
| | | err = model.NewSalesDetailsSearch().Update(salesDetail) |
| | | if err != nil { |
| | | return nil, errors.New("更改CRM销售明细失败") |
| | | } |
| | | |
| | | return &UpdateSalesDetailResponse{}, nil |
| | | } |
| | | |
| | | func (s *Server) RemoveSalesDetail(ctx context.Context, req *RemoveSalesDetailRequest) (*RemoveSalesDetailRequest, error) { |
| | | if req.Number == "" { |
| | | return nil, errors.New("销售明细编号为空") |
| | | } |
| | | |
| | | _, err := model.NewSalesDetailsSearch().SetNumber(req.Number).First() |
| | | if err == gorm.ErrRecordNotFound { |
| | | return nil, errors.New("销售明细不存在") |
| | | } |
| | | |
| | | err = model.NewSalesDetailsSearch().SetNumber(req.Number).Delete() |
| | | if err == gorm.ErrRecordNotFound { |
| | | return nil, errors.New("销售明细删除失败") |
| | | } |
| | | |
| | | return &RemoveSalesDetailRequest{}, nil |
| | | } |