Selaa lähdekoodia

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin 4 vuotta sitten
vanhempi
commit
43549bb507

+ 1 - 0
public/proto/mtp.proto

@@ -851,6 +851,7 @@ message GldSpotContractInfo {
 	optional uint64 SaleUserID = 33; // uint64 业务员ID
 	optional uint64 AccountID = 34; // uint64 期货账户ID
 	optional uint32 BizType = 35; // uint32 业务类型 - 1:套保 2:套利
+	optional uint32 CurrencyID = 36; // uint32 结算币种ID
 }
 // 合同操作请求 0 29 170
 message ErmcpContractOperateApplyReq {

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

@@ -81,6 +81,7 @@ export const funCode: Code = {
     SpotContractOperateReq: 1179653, // 现货合同操作请求(1179653)
     SpotContractOperateRsp: 1179654, // 现货合同操作响应(1179654)
 
+    // 业务 - 合同
     ErmcpContractOperateApplyReq: 1900714, /// 合同操作请求(1179656)
     ErmcpContractOperateApplyRsp: 1900715, /// 合同操作响应(1179657)
 

+ 10 - 2
src/services/proto/contract/index.ts

@@ -2,19 +2,27 @@ import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/build
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
 import {ErmcpContractOperateApplyReq} from "@/services/proto/contract/interface";
+import {getSelectedAccountId, getUserId} from "@/services/bus/account";
+import {getUUID} from "@/utils/qt/common";
 
 /**
  * 合同
  * @param param
  */
 export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
+
+    const OperateSrc = 2;
+    const UserID = getUserId()
+    const ClientTicket = getUUID()
+    const OperateApplyID = getUUID()
+
     return new Promise((resolve, reject) => {
         const params = {
             protobufName: 'ErmcpContractOperateApplyReq',
             funCodeName: 'ErmcpContractOperateApplyReq',
-            reqParams:  param,
+            reqParams:  { OperateApplyID, OperateSrc, UserID, ClientTicket, ...param },
             msgHeadParams: {
-                AccountID: param.accountid,
+                AccountID: getSelectedAccountId(),
                 MarketID: 18,
                 GoodsID: 0,
             }

+ 3 - 8
src/services/proto/contract/interface.ts

@@ -1,13 +1,8 @@
 // 合同操作请求 0 29 170
 export interface ErmcpContractOperateApplyReq {
-    accountid: number
-    OperateApplyID: number // uint64 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)
     OperateType: number // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
-    OperateSrc: number // uint32 操作来源-1:管理端2:终端
-    UserID: number // uint64 操作用户ID
-    Remark: string // string 备注
-    ClientTicket: string  // string 客户端流水号
-    Info : ErmcpContractOperateApplyInfo // ErmcpContractOperateApplyInfo 合同操作信息
+    Remark?: string // string 备注
+    Info: ErmcpContractOperateApplyInfo // ErmcpContractOperateApplyInfo 合同操作信息
 }
 // 合同操作响应 0 29 171
 export interface ErmcpContractOperateApplyRsp {
@@ -24,5 +19,5 @@ export interface ErmcpContractOperateApplyInfo {
     OperateApplyType: number // uint32 操作申请类型-1:点价2:结算3:款项4:发票
     RelatedID: number // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
     DetailJson : Uint8Array // bytes 明细JSON
-    AttachUrl: Uint8Array // bytes 附件
+    AttachUrl?: Uint8Array // bytes 附件
 }

+ 62 - 0
src/services/proto/spotcontract/interface.ts

@@ -61,4 +61,66 @@ export interface GldSpotContractInfo {
     SaleUserID: number // uint64 业务员ID
     AccountID: number // uint64 期货账户ID
     BizType: number // uint32 业务类型 - 1:套保 2:套利
+    CurrencyID: number // 结算币种ID
+}
+
+//套保计划操作请求  (一部分操作用这个借口)
+export interface SpotContractOperateReq {
+    SpotContractID: number; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+    OperateType: number; // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
+    OperateSrc: number; // uint32 操作来源-1:管理端2:终端
+    UserID: number; // uint64 操作用户ID
+    Remark: string; // string 操作备注
+    ClientTicket: string; // string 客户端流水号
+    Info?: SpotContractInfo; // SpotContractInfo 现货合同信息
+}
+
+export interface SpotContractInfo {
+    ContractNo: string; // string 现货合同编号
+    ContractType: number; // int32 现货合同类型-1:采购-1:销售
+    UserID: number; // uint32 机构ID
+    BuyUserID: number; // uint32 采购方ID
+    SellUserID: number; // uint32 客户ID
+    SignDate: string; // string 签订日期
+    ContractAttachment: Uint8Array; // bytes 合同附件
+    ContractMargin: number; // double 合同保证金
+    DeliveryGoodsID: number; // uint32 现货品种ID
+    WrStandardID: number; // uint32 现货商品ID
+    ProductType: number; // uint32 产品类型-1:标准仓单2:等标3:非标
+    ConvertFactor: number; // double 标仓系数
+    SpotGoodsDesc: string; // string 商品型号
+    PriceType: number; // uint32 定价类型-1:一口价2:点价3:暂定价
+    Qty: number; // double 数量
+    Price: number; // double 价格暂定价[1:一口价、3:暂定价]
+    Amount: number; // double 金额[1:一口价、3:暂定价]
+    DeliveryStartDate: string; // string 交收期(开始)
+    DeliveryEndDate: string; // string 交收期(结束)
+    GoodsID: number; // uint32 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
+    PriceMove: number; // double 升贴水[2:点价3:暂定价]
+    StartDate: string; // string 点价开始日期[2:点价3:暂定价]
+    EndDate: string; // string 点价结束日期[2:点价3:暂定价]
+    PointDesc: string; // string 点价备注[2:点价3:暂定价]
+    DeliveryDesc: string; // string 交收方式
+    MerUserID: number; // uint32 跟单员ID
+    TradeUserID : number; // uint32 交易员ID
+    PricedQty: number; // double 已定价量
+    PricedAmount: number; // double 已定价金额
+    SpotGoodsBrandID: number; // uint32 现货品牌ID
+    Remark: string; // string 合同备注
+    SaleUserID: number; // uint32 业务员ID
+    AccountID: number; // uint64 期货账户ID
+    BizType: number; // uint32 业务类型 - 1:套保 2:套利
+    WrFactorTypeID: number; // uint64 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+    CustomerUserID: number; // uint32 客户ID
+    RelatedUserID: number; // uint32 关联用户ID
+}
+
+// 现货合同操作响应 0 18 6
+export interface SpotContractOperateRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    SpotContractID: number; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+    OperateType: number; // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
+    OperateSrc: number; // uint32 操作来源-1:管理端2:终端
+    ClientTicket: string; // string 客户端流水号
 }