Ver Fonte

增加总线接口 HdWRDealOrderReq 持仓单摘牌请求

zhou.xiaoning há 2 anos atrás
pai
commit
b7d81e614e
5 ficheiros alterados com 506 adições e 8 exclusões
  1. 3 0
      global/funcode.go
  2. 14 0
      initialize/rabbitmq.go
  3. 18 0
      model/mq/request/mq.go
  4. 433 8
      res/pb/mtp2.pb.go
  5. 38 0
      res/pb/mtp2.proto

+ 3 - 0
global/funcode.go

@@ -105,6 +105,9 @@ var (
 	MakeUpDepositRsp     = 196716 // 补足定金应答
 	HoldAppendDepositReq = 196719 // 持仓追加定金接口请求
 	HoldAppendDepositRsp = 196720 // 持仓追加定金接口应答
+
+	HdWRDealOrderReq = 1441809 // 持仓单摘牌请求
+	HdWRDealOrderRsp = 1441810 // 持仓单摘牌应答
 )
 
 // 通过请求功能码获取对应主题的方法

+ 14 - 0
initialize/rabbitmq.go

@@ -718,6 +718,19 @@ func (t *MQProc) getRspProtobuf(msg *[]byte) (funcode uint32, sessionId uint32,
 			bytes = &bs
 			serialNumber = p.GetHeader().GetRequestID()
 		}
+	case global.HdWRDealOrderRsp:
+		var p pb.HdWRDealOrderRsp
+		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
@@ -849,6 +862,7 @@ func InitFuncodeTopic() {
 	global.M2A_FuncodeTopic[global.TOPIC_REQ_WAREHOUSE_TRADE] = []int{
 		global.WRListingCancelOrderReq,
 		global.HdWROrderReq,
+		global.HdWRDealOrderReq,
 	}
 	global.M2A_FuncodeTopic[global.TOPIC_REQ_WAREHOUSE_TRADE_GZ] = []int{
 		global.GoodsFavoriteOperateReq,

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

@@ -824,6 +824,24 @@ func (r *MQBodyReq) GetProtoBytes(serialNumber *uint32) (bytes *[]byte, err erro
 		} else {
 			bytes = &b
 		}
+	case global.HdWRDealOrderReq:
+		m := pb.HdWRDealOrderReq{}
+		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

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

@@ -12353,6 +12353,334 @@ func (x *OfflineDeliveryRsp) GetClientTicket() string {
 	return ""
 }
 
+// 持仓单摘牌请求
+type HdWRDealOrderReq 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
+	AccountID             *uint64      `protobuf:"varint,3,opt,name=AccountID" json:"AccountID,omitempty"`                         // 资金账号
+	RelatedWRTradeOrderID *uint64      `protobuf:"varint,4,opt,name=RelatedWRTradeOrderID" json:"RelatedWRTradeOrderID,omitempty"` // 关联委托单号(摘牌委托关联挂牌委托单ID)
+	WRTransferUserID      *uint32      `protobuf:"varint,5,opt,name=WRTransferUserID" json:"WRTransferUserID,omitempty"`           // 仓单受让用户
+	OrderQty              *uint64      `protobuf:"varint,6,opt,name=OrderQty" json:"OrderQty,omitempty"`                           // 委托数量
+	OrderSrc              *uint32      `protobuf:"varint,7,opt,name=OrderSrc" json:"OrderSrc,omitempty"`                           // 委托来源
+	ClientSerialNo        *string      `protobuf:"bytes,8,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"`                // 客户端流水号
+	ClientOrderTime       *string      `protobuf:"bytes,9,opt,name=ClientOrderTime" json:"ClientOrderTime,omitempty"`              // 客户端委托时间
+	ClientType            *uint32      `protobuf:"varint,10,opt,name=ClientType" json:"ClientType,omitempty"`                      // 终端类型
+	OperatorID            *uint64      `protobuf:"varint,11,opt,name=OperatorID" json:"OperatorID,omitempty"`                      // 操作员账号ID
+	BuyOrSell             *uint32      `protobuf:"varint,12,opt,name=BuyOrSell" json:"BuyOrSell,omitempty"`                        // 买卖方向
+	ApplyID               *uint64      `protobuf:"varint,13,opt,name=ApplyID" json:"ApplyID,omitempty"`                            // 申请ID
+	LadingBillId          *uint64      `protobuf:"varint,14,opt,name=LadingBillId" json:"LadingBillId,omitempty"`                  // 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+	SubNum                *uint64      `protobuf:"varint,15,opt,name=SubNum" json:"SubNum,omitempty"`                              // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+	WRFactorTypeId        *uint64      `protobuf:"varint,16,opt,name=WRFactorTypeId" json:"WRFactorTypeId,omitempty"`              // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+	TradeDate             *string      `protobuf:"bytes,17,opt,name=TradeDate" json:"TradeDate,omitempty"`                         // 交易日
+	DeliveryMonth         *string      `protobuf:"bytes,18,opt,name=DeliveryMonth" json:"DeliveryMonth,omitempty"`                 // 交收月
+	HasWr                 *uint32      `protobuf:"varint,19,opt,name=HasWr" json:"HasWr,omitempty"`                                // 是否有仓单-0:没有仓单1:有仓单
+	IsFinancing           *uint32      `protobuf:"varint,20,opt,name=IsFinancing" json:"IsFinancing,omitempty"`                    // 是否融资购买(买摘牌时有效)-0:否1:是
+	ProductDetailID       *uint64      `protobuf:"varint,21,opt,name=ProductDetailID" json:"ProductDetailID,omitempty"`            // 金融机构产品组合ID(融资购买时有效)
+}
+
+func (x *HdWRDealOrderReq) Reset() {
+	*x = HdWRDealOrderReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[106]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *HdWRDealOrderReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HdWRDealOrderReq) ProtoMessage() {}
+
+func (x *HdWRDealOrderReq) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[106]
+	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 HdWRDealOrderReq.ProtoReflect.Descriptor instead.
+func (*HdWRDealOrderReq) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{106}
+}
+
+func (x *HdWRDealOrderReq) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *HdWRDealOrderReq) GetUserID() uint32 {
+	if x != nil && x.UserID != nil {
+		return *x.UserID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetAccountID() uint64 {
+	if x != nil && x.AccountID != nil {
+		return *x.AccountID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetRelatedWRTradeOrderID() uint64 {
+	if x != nil && x.RelatedWRTradeOrderID != nil {
+		return *x.RelatedWRTradeOrderID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetWRTransferUserID() uint32 {
+	if x != nil && x.WRTransferUserID != nil {
+		return *x.WRTransferUserID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetOrderQty() uint64 {
+	if x != nil && x.OrderQty != nil {
+		return *x.OrderQty
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetOrderSrc() uint32 {
+	if x != nil && x.OrderSrc != nil {
+		return *x.OrderSrc
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderReq) GetClientOrderTime() string {
+	if x != nil && x.ClientOrderTime != nil {
+		return *x.ClientOrderTime
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderReq) GetClientType() uint32 {
+	if x != nil && x.ClientType != nil {
+		return *x.ClientType
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetOperatorID() uint64 {
+	if x != nil && x.OperatorID != nil {
+		return *x.OperatorID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetBuyOrSell() uint32 {
+	if x != nil && x.BuyOrSell != nil {
+		return *x.BuyOrSell
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetApplyID() uint64 {
+	if x != nil && x.ApplyID != nil {
+		return *x.ApplyID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetLadingBillId() uint64 {
+	if x != nil && x.LadingBillId != nil {
+		return *x.LadingBillId
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetSubNum() uint64 {
+	if x != nil && x.SubNum != nil {
+		return *x.SubNum
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetWRFactorTypeId() uint64 {
+	if x != nil && x.WRFactorTypeId != nil {
+		return *x.WRFactorTypeId
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetTradeDate() string {
+	if x != nil && x.TradeDate != nil {
+		return *x.TradeDate
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderReq) GetDeliveryMonth() string {
+	if x != nil && x.DeliveryMonth != nil {
+		return *x.DeliveryMonth
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderReq) GetHasWr() uint32 {
+	if x != nil && x.HasWr != nil {
+		return *x.HasWr
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetIsFinancing() uint32 {
+	if x != nil && x.IsFinancing != nil {
+		return *x.IsFinancing
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderReq) GetProductDetailID() uint64 {
+	if x != nil && x.ProductDetailID != nil {
+		return *x.ProductDetailID
+	}
+	return 0
+}
+
+// 持仓单摘牌应答
+type HdWRDealOrderRsp 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
+	AccountID             *uint64      `protobuf:"varint,5,opt,name=AccountID" json:"AccountID,omitempty"`                         // 资金账号
+	WRTradeOrderID        *uint64      `protobuf:"varint,6,opt,name=WRTradeOrderID" json:"WRTradeOrderID,omitempty"`               // 仓单贸易委托单ID
+	RelatedWRTradeOrderID *uint64      `protobuf:"varint,7,opt,name=RelatedWRTradeOrderID" json:"RelatedWRTradeOrderID,omitempty"` // 关联委托单号(摘牌委托关联挂牌委托单ID)
+	FreezeAmount          *float64     `protobuf:"fixed64,8,opt,name=FreezeAmount" json:"FreezeAmount,omitempty"`                  // 冻结货款
+	OrderTime             *string      `protobuf:"bytes,9,opt,name=OrderTime" json:"OrderTime,omitempty"`                          // 接收委托交易的时间
+	ClientSerialNo        *string      `protobuf:"bytes,10,opt,name=ClientSerialNo" json:"ClientSerialNo,omitempty"`               // 客户端流水号
+}
+
+func (x *HdWRDealOrderRsp) Reset() {
+	*x = HdWRDealOrderRsp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_mtp2_proto_msgTypes[107]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *HdWRDealOrderRsp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HdWRDealOrderRsp) ProtoMessage() {}
+
+func (x *HdWRDealOrderRsp) ProtoReflect() protoreflect.Message {
+	mi := &file_mtp2_proto_msgTypes[107]
+	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 HdWRDealOrderRsp.ProtoReflect.Descriptor instead.
+func (*HdWRDealOrderRsp) Descriptor() ([]byte, []int) {
+	return file_mtp2_proto_rawDescGZIP(), []int{107}
+}
+
+func (x *HdWRDealOrderRsp) GetHeader() *MessageHead {
+	if x != nil {
+		return x.Header
+	}
+	return nil
+}
+
+func (x *HdWRDealOrderRsp) GetRetCode() int32 {
+	if x != nil && x.RetCode != nil {
+		return *x.RetCode
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetRetDesc() string {
+	if x != nil && x.RetDesc != nil {
+		return *x.RetDesc
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderRsp) GetUserID() uint32 {
+	if x != nil && x.UserID != nil {
+		return *x.UserID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetAccountID() uint64 {
+	if x != nil && x.AccountID != nil {
+		return *x.AccountID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetWRTradeOrderID() uint64 {
+	if x != nil && x.WRTradeOrderID != nil {
+		return *x.WRTradeOrderID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetRelatedWRTradeOrderID() uint64 {
+	if x != nil && x.RelatedWRTradeOrderID != nil {
+		return *x.RelatedWRTradeOrderID
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetFreezeAmount() float64 {
+	if x != nil && x.FreezeAmount != nil {
+		return *x.FreezeAmount
+	}
+	return 0
+}
+
+func (x *HdWRDealOrderRsp) GetOrderTime() string {
+	if x != nil && x.OrderTime != nil {
+		return *x.OrderTime
+	}
+	return ""
+}
+
+func (x *HdWRDealOrderRsp) GetClientSerialNo() string {
+	if x != nil && x.ClientSerialNo != nil {
+		return *x.ClientSerialNo
+	}
+	return ""
+}
+
 var File_mtp2_proto protoreflect.FileDescriptor
 
 var file_mtp2_proto_rawDesc = []byte{
@@ -14643,7 +14971,76 @@ var file_mtp2_proto_rawDesc = []byte{
 	0x41, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x41,
 	0x70, 0x70, 0x6c, 0x79, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
 	0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x6c,
-	0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
+	0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0xdf, 0x05, 0x0a, 0x10, 0x48,
+	0x64, 0x57, 0x52, 0x44, 0x65, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x1c, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x04, 0x52, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x34,
+	0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x52,
+	0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64,
+	0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x57, 0x52, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
+	0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10,
+	0x57, 0x52, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
+	0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x51, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x04, 0x52, 0x08, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x51, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
+	0x4f, 0x72, 0x64, 0x65, 0x72, 0x53, 0x72, 0x63, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65,
+	0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f,
+	0x12, 0x28, 0x0a, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54,
+	0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+	0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6c,
+	0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4f, 0x70,
+	0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a,
+	0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x42, 0x75,
+	0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x42,
+	0x75, 0x79, 0x4f, 0x72, 0x53, 0x65, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x6c,
+	0x79, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x41, 0x70, 0x70, 0x6c, 0x79,
+	0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x69, 0x6c, 0x6c,
+	0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x4c, 0x61, 0x64, 0x69, 0x6e, 0x67,
+	0x42, 0x69, 0x6c, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x75, 0x62, 0x4e, 0x75, 0x6d,
+	0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x53, 0x75, 0x62, 0x4e, 0x75, 0x6d, 0x12, 0x26,
+	0x0a, 0x0e, 0x57, 0x52, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64,
+	0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x57, 0x52, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72,
+	0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x72, 0x61, 0x64, 0x65, 0x44,
+	0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x72, 0x61, 0x64, 0x65,
+	0x44, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
+	0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x44, 0x65, 0x6c,
+	0x69, 0x76, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x48, 0x61,
+	0x73, 0x57, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x48, 0x61, 0x73, 0x57, 0x72,
+	0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73, 0x46, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x18,
+	0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x49, 0x73, 0x46, 0x69, 0x6e, 0x61, 0x6e, 0x63, 0x69,
+	0x6e, 0x67, 0x12, 0x28, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74,
+	0x61, 0x69, 0x6c, 0x49, 0x44, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x50, 0x72, 0x6f,
+	0x64, 0x75, 0x63, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x49, 0x44, 0x22, 0xed, 0x02, 0x0a,
+	0x10, 0x48, 0x64, 0x57, 0x52, 0x44, 0x65, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 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, 0x1c, 0x0a, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+	0x74, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x41, 0x63, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f,
+	0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x57, 0x52,
+	0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x44, 0x12, 0x34, 0x0a, 0x15,
+	0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72,
+	0x64, 0x65, 0x72, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x52, 0x65, 0x6c,
+	0x61, 0x74, 0x65, 0x64, 0x57, 0x52, 0x54, 0x72, 0x61, 0x64, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72,
+	0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x41, 0x6d, 0x6f, 0x75,
+	0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0c, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65,
+	0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x54,
+	0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72,
+	0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65,
+	0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c,
+	0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x6f,
 }
 
 var (
@@ -14658,7 +15055,7 @@ func file_mtp2_proto_rawDescGZIP() []byte {
 	return file_mtp2_proto_rawDescData
 }
 
-var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 106)
+var file_mtp2_proto_msgTypes = make([]protoimpl.MessageInfo, 108)
 var file_mtp2_proto_goTypes = []interface{}{
 	(*MessageHead)(nil),                         // 0: pb.MessageHead
 	(*NotifyHead)(nil),                          // 1: pb.NotifyHead
@@ -14766,6 +15163,8 @@ var file_mtp2_proto_goTypes = []interface{}{
 	(*HoldAppendDepositRsp)(nil),                // 103: pb.HoldAppendDepositRsp
 	(*OfflineDeliveryReq)(nil),                  // 104: pb.OfflineDeliveryReq
 	(*OfflineDeliveryRsp)(nil),                  // 105: pb.OfflineDeliveryRsp
+	(*HdWRDealOrderReq)(nil),                    // 106: pb.HdWRDealOrderReq
+	(*HdWRDealOrderRsp)(nil),                    // 107: pb.HdWRDealOrderRsp
 }
 var file_mtp2_proto_depIdxs = []int32{
 	0,   // 0: pb.MoneyChangedNtf.Header:type_name -> pb.MessageHead
@@ -14879,11 +15278,13 @@ var file_mtp2_proto_depIdxs = []int32{
 	0,   // 108: pb.HoldAppendDepositRsp.Header:type_name -> pb.MessageHead
 	0,   // 109: pb.OfflineDeliveryReq.Header:type_name -> pb.MessageHead
 	0,   // 110: pb.OfflineDeliveryRsp.Header:type_name -> pb.MessageHead
-	111, // [111:111] is the sub-list for method output_type
-	111, // [111:111] is the sub-list for method input_type
-	111, // [111:111] is the sub-list for extension type_name
-	111, // [111:111] is the sub-list for extension extendee
-	0,   // [0:111] is the sub-list for field type_name
+	0,   // 111: pb.HdWRDealOrderReq.Header:type_name -> pb.MessageHead
+	0,   // 112: pb.HdWRDealOrderRsp.Header:type_name -> pb.MessageHead
+	113, // [113:113] is the sub-list for method output_type
+	113, // [113:113] is the sub-list for method input_type
+	113, // [113:113] is the sub-list for extension type_name
+	113, // [113:113] is the sub-list for extension extendee
+	0,   // [0:113] is the sub-list for field type_name
 }
 
 func init() { file_mtp2_proto_init() }
@@ -16164,6 +16565,30 @@ func file_mtp2_proto_init() {
 				return nil
 			}
 		}
+		file_mtp2_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*HdWRDealOrderReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_mtp2_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*HdWRDealOrderRsp); 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{
@@ -16171,7 +16596,7 @@ func file_mtp2_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_mtp2_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   106,
+			NumMessages:   108,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 38 - 0
res/pb/mtp2.proto

@@ -1419,4 +1419,42 @@ message OfflineDeliveryRsp {
 			optional uint32 UserID = 5; // 用户ID
 			optional uint64 ApplyID = 6; // 申请ID
 			optional string ClientTicket = 7; // 客户端流水号
+}
+
+// 持仓单摘牌请求
+message HdWRDealOrderReq {
+	optional MessageHead Header = 1;
+		optional uint32 UserID = 2; // 用户ID
+		optional uint64 AccountID = 3; // 资金账号
+		optional uint64 RelatedWRTradeOrderID = 4; // 关联委托单号(摘牌委托关联挂牌委托单ID)
+		optional uint32 WRTransferUserID = 5; // 仓单受让用户
+		optional uint64 OrderQty = 6; // 委托数量
+		optional uint32 OrderSrc = 7; // 委托来源
+		optional string ClientSerialNo = 8; // 客户端流水号
+		optional string ClientOrderTime = 9; // 客户端委托时间
+		optional uint32 ClientType = 10; // 终端类型
+		optional uint64 OperatorID = 11; // 操作员账号ID
+		optional uint32 BuyOrSell = 12; // 买卖方向
+		optional uint64 ApplyID = 13; // 申请ID
+		optional uint64 LadingBillId = 14; // 提单id(wrholdlb的LadingBillId字段),卖的时候填写
+		optional uint64 SubNum = 15; // 提单子单号(wrholdlb的SubNum字段),卖的时候填写
+		optional uint64 WRFactorTypeId = 16; // 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
+		optional string TradeDate = 17; // 交易日
+		optional string DeliveryMonth = 18; // 交收月
+		optional uint32 HasWr = 19; // 是否有仓单-0:没有仓单1:有仓单
+		optional uint32 IsFinancing = 20; // 是否融资购买(买摘牌时有效)-0:否1:是
+		optional uint64 ProductDetailID = 21; // 金融机构产品组合ID(融资购买时有效)
+}
+// 持仓单摘牌应答
+message HdWRDealOrderRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint32 UserID = 4; // 用户ID
+		optional uint64 AccountID = 5; // 资金账号
+		optional uint64 WRTradeOrderID = 6; // 仓单贸易委托单ID
+		optional uint64 RelatedWRTradeOrderID = 7; // 关联委托单号(摘牌委托关联挂牌委托单ID)
+		optional double FreezeAmount = 8; // 冻结货款
+		optional string OrderTime = 9; // 接收委托交易的时间
+		optional string ClientSerialNo = 10; // 客户端流水号
 }