Parcourir la source

commit 提交代码

yu jie il y a 4 ans
Parent
commit
402c141868

+ 48 - 0
public/proto/mtp.proto

@@ -1822,4 +1822,52 @@ message WROutCancelRsp {
  optional int32 RetCode = 2; // int32 返回码
  optional string RetDesc = 3; // string 描述信息
   optional uint64 applyid = 4; // uint64 申请Id
+}
+
+// 交割申报请求 0 6 1
+message DeliveryOrderReq {
+        optional MessageHead Header = 1; // MessageHead
+        optional string ClientSerialNo = 2; // string 客户端流水号
+        optional string ClientOrderTime = 3; // string 客户端委托时间
+        optional uint32 ClientType = 4; // uint32 终端类型
+        optional uint64 AccountID = 5; // uint64 交易账号
+        optional uint32 XGoodsID = 6; // uint32 主商品ID(交割合约)
+        optional uint32 PGoodsID = 7; // uint32 辅助商品ID(辅助合约)
+        optional uint32 P2GoodsID = 8; // uint32 辅助商品ID(辅助合约2)
+        optional uint32 DeliveryGoodsID = 9; // uint32 交割商品ID
+        optional uint64 XQty = 10; // uint64 交割合约数量
+        optional uint64 PQty = 11; // uint64 辅助合约数量
+        optional uint64 P2Qty = 12; // uint64 辅助合约2数量
+        optional uint64 DeliveryQty = 13; // uint64 交割商品仓单数量
+        optional uint32 OperateType = 14; // uint32 操作类型:
+        optional uint32 OrderSrc = 15; // uint32 单据来源
+        optional uint32 OperatorID = 16; // uint32 操作员账号ID
+        optional DeliveryOrderDetail DeliveryOrderDetail = 17; // DeliveryOrderDetail 关联仓单头寸
+        optional uint32 TakeMode = 18; // uint32 提货方式
+        optional string ReceiverAddress = 19; // string 提货地址
+}
+// 交割申报应答 0 6 2
+message DeliveryOrderRsp {
+        optional MessageHead Header = 1; // MessageHead 消息头
+        optional int32 RetCode = 2; // int32 返回码
+        optional string RetDesc = 3; // string 描述信息
+        optional string ClientSerialNo = 4; // string 客户端流水号
+        repeated DeliveryOrderDetail DeliveryOrderDetails = 5; // DeliveryOrderDetail 一级生成的订单号
+        optional string OrderTime = 6; // string 接收委托交易的时间
+}
+
+// 交割申报单明细 0 6 4
+message DeliveryOrderDetail {
+     optional uint64 AccountID = 1; // uint64 对手方账号
+     optional uint64 Qty = 2; // uint64 点选数量
+     optional uint32 BrandID = 3; // uint32 品牌
+     optional uint32 QualityID = 4; // uint32 品质
+     optional uint32 StandardID = 5; // uint32 规格
+     optional uint32 WarehouseID = 6; // uint32 仓库
+     optional uint32 DeliveryMonthID = 7; // uint32 月份
+     optional string ReceiverAddress = 8; // string 提货地址
+     optional uint32 TakeMode = 9; // uint32 提货方式
+     optional uint64 LadingBillID = 10; // uint64 提单ID
+     optional uint64 SubNum = 11; // uint64 提单子单号
+     optional uint64 WRFactorTypeID = 12; // uint64 仓单要素类型ID
 }

+ 3 - 0
src/services/funcode/index.ts

@@ -181,6 +181,9 @@ export const funCode: Code = {
     WROutCancelReq: 1900743,//  仓单出库撤回请求
     WROutCancelRsp: 1900744,//  仓单出库撤回响应
 
+    DeliveryOrderReq: 393217,    /// 交割申报请求 (交收)
+    DeliveryOrderRsp: 393218,    /// 交割申报应答
+
     // 履约
     PerformanceManualConfirmReq: 1310723, // 履约手动确认请求
     PerformanceManualConfirmRsp: 1310724, // 履约手动确认应答

+ 31 - 9
src/services/go/wrtrade/index.ts

@@ -6,30 +6,44 @@ import { getUsrId } from "@/services/bus/user";
 import { commonSearch_go } from "@/services/go";
 import {
     QueryFaProductDetailReq,
-    QueryFilterItemReq, QueryHoldLBReq,
+    QueryFilterItemReq,
+    QueryHoldLBReq,
     QueryOrderQuoteDetailReq,
     QueryOrderQuoteReq,
     QueryPerformancePlanReq,
     QueryWrBuybackDetailReq,
-    QueryWrFactorTypeInfoReq, QueryWrGoodsInfoReq,
+    QueryWrDeliveryAvalidHoldLBReq,
+    QueryWrFactorTypeInfoReq,
+    QueryWrGoodsInfoReq,
     QueryWrMarketTradeConfigReq,
-    QueryWrOrderDetailReq, QueryWrPerformancePlanStepReq,
-    QueryWrPositionReq, QueryWrScfContractInterestReq, QueryWrSpecialMatchOrderReq,
+    QueryWrOrderDetailReq,
+    QueryWrPerformancePlanStepReq,
+    QueryWrPositionReq,
+    QueryWrScfContractInterestReq,
+    QueryWrSpecialMatchOrderReq,
     QueryWrStandardFactoryItemReq,
-    QueryWrTradeDetailReq, WrAverageTradePriceQsp, WrAverageTradePriceQsq, WrBuybackDetail, WrDeliveryDetail,
+    QueryWrTradeDetailReq,
+    WrAverageTradePriceQsp,
+    WrAverageTradePriceQsq,
+    WrBuybackDetail,
+    WrDeliveryAvalidHoldLB,
+    WrDeliveryDetail,
     WrFactorTypeInfo,
     WrFAProductDetail,
     WrFilterItem,
     WrFinanceBuyApply,
     WrFtDeliveryGoods,
     WrGoodsInfo,
-    WrHoldLB, WrOrderDetail,
+    WrHoldLB,
+    WrOrderDetail,
     WrOrderQuote,
-    WrOrderQuoteDetail, WrOutInApply,
+    WrOrderQuoteDetail,
+    WrOutInApply,
     WrPerformancePlan,
     WrPerformancePlanStep,
     WrPosition,
-    WrScfContract, WrScfContractInterest,
+    WrScfContract,
+    WrScfContractInterest,
     WrSpecialMatchOrder,
     WrStandardFactoryItemEx,
     WrTradeDetail,
@@ -299,4 +313,12 @@ export function queryWrAverageTradePrice(param: WrAverageTradePriceQsq): Promise
     });
 }
 
-
+/**
+ * /WrTrade2/QueryWrDeliveryAvalidHoldLB 查询合约交收可点选仓单
+ * @param QueryWrDeliveryAvalidHoldLBReq
+ */
+export function queryWrDeliveryAvalidHoldLB(param: QueryWrDeliveryAvalidHoldLBReq): Promise<WrDeliveryAvalidHoldLB[]> {
+    return commonSearch_go('/WrTrade2/QueryWrDeliveryAvalidHoldLB', param).catch((err) => {
+        throw new Error(`查询合约交收可点选仓单: ${err}`);
+    });
+}

+ 34 - 0
src/services/go/wrtrade/interface.ts

@@ -958,6 +958,40 @@ export interface WrTradeOrderDetailReq {
     buyorsell: 0 | 1; //买卖方向 0-买 1-卖
 }
 
+/**
+ * 查询合约交收可点选仓单
+ */
+export interface QueryWrDeliveryAvalidHoldLBReq {
+    accountid: number       //  资金账号
+    goodsid: number         //  商品id
+}
+
+
+export interface WrDeliveryAvalidHoldLB{
+    accountid	:number;//资金账号
+    avalidqty	:number;//数量(可点选数量)
+    deliverygoodsid	:number;//品种id
+    enumdicname	:string;//单位名称
+    goodsid	:number;//x合约商品id
+    ladingbillid	:string;//提单id
+    pgoodscode	:string;//p商品代码(点价合约)
+    pgoodsid	:number;//p商品id(点价合约)
+    pgoodsname	:string;//p商品名称(点价合约)
+    pricemove	:number;//升贴水
+    subnum	:number;//提单子id
+    userid	:number;//用户id
+    username	:string;//仓单持有人
+    warehousecode	:string;//仓库代码
+    warehouseid	:number;//仓库id
+    warehousename	:string;//仓库名称
+    wrfactortypeid	:string;//仓单要素id
+    wrstandardcode	:string;//品代码
+    wrstandardid	:number;//品类d
+    wrstandardname	:string;//品类名称
+    wrtypename	:string;//商品
+    xgoodscode	:string;//x合约代码
+    xgoodsname	:string;//x合约名称
+}
 export interface WrAverageTradePriceQsq {
     page?: number; //	页码
     pagesize?: number; //每页条数

+ 10 - 0
src/services/proto/warehousetrade/index.ts

@@ -1,4 +1,5 @@
 import {
+    DeliveryOrderReq,
     HdWRDealOrderReq,
     HdWROrderReq, PaymentArrearsReq, WarehouseRepurchaseReq,
     WRListingCancelOrderReq, WROutApplyCancelReq,
@@ -97,3 +98,12 @@ export const WROutConfirm = (param: WROutConfirmReq): Promise<any> => {
 export const WROutCancel = (param: WROutCancelReq): Promise<any> => {
     return protoMiddleware<WROutCancelReq>(param, 'WROutCancelReq', 'WROutCancelRsp', HeadEnum.tradeMode17)
 }
+
+/**
+ * 交割申报请求 0 6 1  (交收)
+ * @param param
+ * @constructor
+ */
+export const DeliveryOrder = (param: DeliveryOrderReq): Promise<any> =>{
+    return protoMiddleware<DeliveryOrderReq>(param, 'DeliveryOrderReq', 'DeliveryOrderRsp', HeadEnum.tradeMode17)
+}

+ 45 - 0
src/services/proto/warehousetrade/interface.ts

@@ -252,5 +252,50 @@ export interface WROutCancelRsp {
     applyid: number; // uint64 申请Id
 }
 
+// 交割申报请求 0 6 1
+export interface DeliveryOrderReq {
+    ClientSerialNo: string // string 客户端流水号
+    ClientOrderTime: string // string 客户端委托时间
+    ClientType: number // uint32 终端类型
+    AccountID: number // uint64 交易账号
+    XGoodsID: number // uint32 主商品ID(交割合约)
+    PGoodsID: number // uint32 辅助商品ID(辅助合约)
+    P2GoodsID: number // uint32 辅助商品ID(辅助合约2)
+    DeliveryGoodsID: number // uint32 交割商品ID
+    XQty: number // uint64 交割合约数量
+    PQty: number // uint64 辅助合约数量
+    P2Qty: number // uint64 辅助合约2数量
+    DeliveryQty: number // uint64 交割商品仓单数量
+    OperateType: number // uint32 操作类型:
+    OrderSrc: number // uint32 单据来源
+    OperatorID: number // uint32 操作员账号ID
+    DeliveryOrderDetail: DeliveryOrderDetail // DeliveryOrderDetail 关联仓单头寸
+    TakeMode: number // uint32 提货方式
+    ReceiverAddress: string // string 提货地址
+}
+// 交割申报应答 0 6 2
+export interface DeliveryOrderRsp {
+    RetCode: number // int32 返回码
+    RetDesc: string // string 描述信息
+    ClientSerialNo: string // string 客户端流水号
+    DeliveryOrderDetails: DeliveryOrderDetail // DeliveryOrderDetail 一级生成的订单号
+    OrderTime: string // string 接收委托交易的时间
+}
+
+// 交割申报单明细 0 6 4
+export interface DeliveryOrderDetail {
+    AccountID: number // uint64 对手方账号
+    Qty: number // uint64 点选数量
+    BrandID : number // uint32 品牌
+    QualityID : number // uint32 品质
+    StandardID: number // uint32 规格
+    WarehouseID: number // uint32 仓库
+    DeliveryMonthID: number // uint32 月份
+    ReceiverAddress: string // string 提货地址
+    TakeMode : number // uint32 提货方式
+    LadingBillID: number // uint64 提单ID
+    SubNum : number // uint64 提单子单号
+    WRFactorTypeID: number // uint64 仓单要素类型ID
+}
 
 

+ 0 - 1
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue

@@ -218,7 +218,6 @@ export default defineComponent({
                     // ValidTime: string // 指定有效日期
                     // ReceiveInfoID: number // 收货地址ID
                 }
-                debugger
                 requestResultLoadingAndInfo(Order, param, loading, ['摘牌成功', '摘牌失败:']).then(() => {
                     cancel(true);
                 });