소스 검색

增加支持BSWMSReckonPayReq接口

zhou.xiaoning 2 년 전
부모
커밋
390429d766
5개의 변경된 파일270개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 0
      global/funcode.go
  2. 14 0
      initialize/rabbitmq.go
  3. 18 0
      model/mq/request/mq.go
  4. 219 8
      res/pb/mtp2.pb.go
  5. 17 0
      res/pb/mtp2.proto

+ 2 - 0
global/funcode.go

@@ -76,6 +76,8 @@ var (
 	GZCenterPurchaseApplyRsp = 1441888 // 广钻集采申请响应
 	GZCenterPurchaseOrderReq = 1441891 // 广钻集采认购下单请求
 	GZCenterPurchaseOrderRsp = 1441892 // 广钻集采认购下单响应
+	BSWMSReckonPayReq        = 1114135 // WMS结算单支付接口请求
+	BSWMSReckonPayRsp        = 1114136 // WMS结算单支付接口响应
 )
 
 // 通过请求功能码获取对应主题的方法

+ 14 - 0
initialize/rabbitmq.go

@@ -499,6 +499,19 @@ func (t *MQProc) getRspProtobuf(msg *[]byte) (funcode uint32, sessionId uint32,
 			bytes = &bs
 			serialNumber = p.GetHeader().GetRequestID()
 		}
+	case global.BSWMSReckonPayRsp: // WMS结算单支付接口响应
+		var p pb.BSWMSReckonPayRsp
+		if err = proto.Unmarshal(b, &p); err != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		}
+		if bs, e := protojson.Marshal(&p); e != nil {
+			global.M2A_LOG.Error("总线回复数据反序列化失败", zap.Error(err))
+			return
+		} else {
+			bytes = &bs
+			serialNumber = p.GetHeader().GetRequestID()
+		}
 	}
 
 	return
@@ -642,5 +655,6 @@ func InitFuncodeTopic() {
 	global.M2A_FuncodeTopic[global.TOPIC_REQ_WAREHOUSE_CENTERPURCHASE_GZ] = []int{
 		global.GZCenterPurchaseApplyReq,
 		global.GZCenterPurchaseOrderReq,
+		global.BSWMSReckonPayReq,
 	}
 }

+ 18 - 0
model/mq/request/mq.go

@@ -640,6 +640,24 @@ func (r *MQBodyReq) GetProtoBytes(serialNumber *uint32) (bytes *[]byte, err erro
 		} else {
 			bytes = &b
 		}
+	case global.BSWMSReckonPayReq:
+		m := pb.BSWMSReckonPayReq{}
+		if err = r.reflect(data, &m); err != nil {
+			return
+		}
+		if m.Header != nil {
+			m.Header.RequestID = serialNumber
+		} else {
+			err = errors.New("请求信息序列化失败")
+			return
+		}
+		if b, e := proto.Marshal(&m); e != nil {
+			global.M2A_LOG.Error(e.Error(), zap.Error(e))
+			err = errors.New("请求信息序列化失败")
+			return
+		} else {
+			bytes = &b
+		}
 	}
 
 	return

+ 219 - 8
res/pb/mtp2.pb.go

@@ -8801,6 +8801,166 @@ func (x *GZCenterPurchaseOrderRsp) GetClientSerialNo() string {
 	return ""
 }
 
+// WMS结算单支付接口请求
+type BSWMSReckonPayReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header         *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
+	UserID         *uint32      `protobuf:"varint,2,opt,name=UserID" json:"UserID,omitempty"`                // 用户ID,必填
+	OrderID        *uint64      `protobuf:"varint,3,opt,name=OrderID" json:"OrderID,omitempty"`              // 单据ID,必填
+	ClientSerialNo *string      `protobuf:"bytes,4,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"` // 客户端流水号
+}
+
+func (x *BSWMSReckonPayReq) Reset() {
+	*x = BSWMSReckonPayReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[77]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BSWMSReckonPayReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BSWMSReckonPayReq) ProtoMessage() {}
+
+func (x *BSWMSReckonPayReq) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[77]
+	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 BSWMSReckonPayReq.ProtoReflect.Descriptor instead.
+func (*BSWMSReckonPayReq) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{77}
+}
+
+func (x *BSWMSReckonPayReq) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *BSWMSReckonPayReq) GetUserID() uint32 {
+	if x != nil && x.UserID != nil {
+		return *x.UserID
+	}
+	return 0
+}
+
+func (x *BSWMSReckonPayReq) GetOrderID() uint64 {
+	if x != nil && x.OrderID != nil {
+		return *x.OrderID
+	}
+	return 0
+}
+
+func (x *BSWMSReckonPayReq) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
+// WMS结算单支付接口响应
+type BSWMSReckonPayRsp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Header         *MessageHead `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`                 // 消息头
+	RetCode        *int32       `protobuf:"varint,2,opt,name=RetCode" json:"RetCode,omitempty"`              // 返回码
+	RetDesc        *string      `protobuf:"bytes,3,opt,name=RetDesc" json:"RetDesc,omitempty"`               // 描述信息
+	UserID         *uint32      `protobuf:"varint,4,opt,name=UserID" json:"UserID,omitempty"`                // 用户ID
+	OrderID        *uint64      `protobuf:"varint,5,opt,name=OrderID" json:"OrderID,omitempty"`              // 单据ID
+	ClientSerialNo *string      `protobuf:"bytes,6,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"` // 客户端流水号
+}
+
+func (x *BSWMSReckonPayRsp) Reset() {
+	*x = BSWMSReckonPayRsp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[78]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BSWMSReckonPayRsp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BSWMSReckonPayRsp) ProtoMessage() {}
+
+func (x *BSWMSReckonPayRsp) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[78]
+	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 BSWMSReckonPayRsp.ProtoReflect.Descriptor instead.
+func (*BSWMSReckonPayRsp) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{78}
+}
+
+func (x *BSWMSReckonPayRsp) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *BSWMSReckonPayRsp) GetRetCode() int32 {
+	if x != nil && x.RetCode != nil {
+		return *x.RetCode
+	}
+	return 0
+}
+
+func (x *BSWMSReckonPayRsp) GetRetDesc() string {
+	if x != nil && x.RetDesc != nil {
+		return *x.RetDesc
+	}
+	return ""
+}
+
+func (x *BSWMSReckonPayRsp) GetUserID() uint32 {
+	if x != nil && x.UserID != nil {
+		return *x.UserID
+	}
+	return 0
+}
+
+func (x *BSWMSReckonPayRsp) GetOrderID() uint64 {
+	if x != nil && x.OrderID != nil {
+		return *x.OrderID
+	}
+	return 0
+}
+
+func (x *BSWMSReckonPayRsp) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
 var File_mtp2_proto protoreflect.FileDescriptor
 
 var file_mtp2_proto_rawDesc = []byte{
@@ -10434,7 +10594,30 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f,
 	0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
 	0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
-	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x22, 0x96,
+	0x01, 0x0a, 0x11, 0x42, 0x53, 0x57, 0x4d, 0x53, 0x52, 0x65, 0x63, 0x6b, 0x6f, 0x6e, 0x50, 0x61,
+	0x79, 0x52, 0x65, 0x71, 0x12, 0x27, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a,
+	0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55,
+	0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12,
+	0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e,
+	0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53,
+	0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x11, 0x42, 0x53, 0x57, 0x4d,
+	0x53, 0x52, 0x65, 0x63, 0x6b, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a,
+	0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
+	0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x52, 0x06,
+	0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
+	0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x07, 0x52, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72,
+	0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20,
+	0x01, 0x28, 0x04, 0x52, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69,
+	0x61, 0x6c, 0x4e, 0x6f,
 }
 
 var (
@@ -10449,7 +10632,7 @@ func file_mtp2_proto_rawDescGZIP() []byte {
 	return file_mtp2_proto_rawDescData
 }
 
-var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 77)
+var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 79)
 var file_mtp2_proto_goTypes = []interface{}{
 	(*MessageHead)(nil),                         // 0: pb.MessageHead
 	(*NotifyHead)(nil),                          // 1: pb.NotifyHead
@@ -10528,6 +10711,8 @@ var file_mtp2_proto_goTypes = []interface{}{
 	(*GZCenterPurchaseApplyRsp)(nil),            // 74: pb.GZCenterPurchaseApplyRsp
 	(*GZCenterPurchaseOrderReq)(nil),            // 75: pb.GZCenterPurchaseOrderReq
 	(*GZCenterPurchaseOrderRsp)(nil),            // 76: pb.GZCenterPurchaseOrderRsp
+	(*BSWMSReckonPayReq)(nil),                   // 77: pb.BSWMSReckonPayReq
+	(*BSWMSReckonPayRsp)(nil),                   // 78: pb.BSWMSReckonPayRsp
 }
 var file_mtp2_proto_depIdxs = []int32{
 	0,  // 0: pb.ModifyPwdReq.Header:type_name -> pb.MessageHead
@@ -10607,11 +10792,13 @@ var file_mtp2_proto_depIdxs = []int32{
 	0,  // 74: pb.GZCenterPurchaseApplyRsp.Header:type_name -> pb.MessageHead
 	0,  // 75: pb.GZCenterPurchaseOrderReq.Header:type_name -> pb.MessageHead
 	0,  // 76: pb.GZCenterPurchaseOrderRsp.Header:type_name -> pb.MessageHead
-	77, // [77:77] is the sub-list for method output_type
-	77, // [77:77] is the sub-list for method input_type
-	77, // [77:77] is the sub-list for extension type_name
-	77, // [77:77] is the sub-list for extension extendee
-	0,  // [0:77] is the sub-list for field type_name
+	0,  // 77: pb.BSWMSReckonPayReq.Header:type_name -> pb.MessageHead
+	0,  // 78: pb.BSWMSReckonPayRsp.Header:type_name -> pb.MessageHead
+	79, // [79:79] is the sub-list for method output_type
+	79, // [79:79] is the sub-list for method input_type
+	79, // [79:79] is the sub-list for extension type_name
+	79, // [79:79] is the sub-list for extension extendee
+	0,  // [0:79] is the sub-list for field type_name
 }
 
 func init() { file_mtp2_proto_init() }
@@ -11544,6 +11731,30 @@ func file_mtp2_proto_init() {
 				return nil
 			}
 		}
+		file_mtp2_proto_msgTypes[77].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BSWMSReckonPayReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[78].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BSWMSReckonPayRsp); 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{
@@ -11551,7 +11762,7 @@ func file_mtp2_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_mtp2_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   77,
+			NumMessages:   79,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 17 - 0
res/pb/mtp2.proto

@@ -1019,4 +1019,21 @@ message GZCenterPurchaseOrderRsp {
 		optional uint64 AccountID = 5; // 资金账户ID
 		optional uint64 WRTradeOrderID = 6; // 仓单贸易委托单ID
 		optional string ClientSerialNo = 7; // 客户端流水号
+}
+
+// WMS结算单支付接口请求
+message BSWMSReckonPayReq {
+	optional MessageHead Header = 1;
+		optional uint32 UserID = 2; // 用户ID,必填
+		optional uint64 OrderID = 3; // 单据ID,必填
+			optional string ClientSerialNo = 4; // 客户端流水号
+}
+// WMS结算单支付接口响应
+message BSWMSReckonPayRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint32 UserID = 4; // 用户ID
+		optional uint64 OrderID = 5; // 单据ID
+			optional string ClientSerialNo = 6; // 客户端流水号
 }