Browse Source

commit 合同操作 proto

xkwg 4 years ago
parent
commit
7eee4334c1
3 changed files with 70 additions and 5 deletions
  1. 62 0
      public/proto/mtp.proto
  2. 5 2
      src/services/funcode/index.ts
  3. 3 3
      src/services/proto/contract/index.ts

+ 62 - 0
public/proto/mtp.proto

@@ -923,5 +923,67 @@ message UserInfoCheckMangeRsp {
 	optional uint64 userid = 4; // uint64 客户userid
 }
 
+// 现货合同操作请求 0 18 5
+message SpotContractOperateReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional uint64 SpotContractID = 2; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+	optional uint32 OperateType = 3; // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
+	optional uint32 OperateSrc = 4; // uint32 操作来源-1:管理端2:终端
+	optional uint64 UserID = 5; // uint64 操作用户ID
+	optional string Remark = 6; // string 操作备注
+	optional string ClientTicket = 7; // string 客户端流水号
+	optional SpotContractInfo Info = 8; // SpotContractInfo 现货合同信息
+}
+// 现货合同操作响应 0 18 6
+message SpotContractOperateRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint64 SpotContractID = 4; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+	optional uint32 OperateType = 5; // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
+	optional uint32 OperateSrc = 6; // uint32 操作来源-1:管理端2:终端
+	optional string ClientTicket = 7; // string 客户端流水号
+}
+
+// 现货合同信息 0 18 4
+message SpotContractInfo {
+	optional string ContractNo = 1; // string 现货合同编号
+	optional int32 ContractType = 2; // int32 现货合同类型-1:采购-1:销售
+	optional uint32 UserID = 3; // uint32 机构ID
+	optional uint32 BuyUserID = 4; // uint32 采购方ID
+	optional uint32 SellUserID = 5; // uint32 客户ID
+	optional string SignDate = 6; // string 签订日期
+	optional bytes ContractAttachment = 7; // bytes 合同附件
+	optional double ContractMargin = 8; // double 合同保证金
+	optional uint32 DeliveryGoodsID = 9; // uint32 现货品种ID
+	optional uint32 WrStandardID = 10; // uint32 现货商品ID
+	optional uint32 ProductType = 11; // uint32 产品类型-1:标准仓单2:等标3:非标
+	optional double ConvertFactor = 12; // double 标仓系数
+	optional string SpotGoodsDesc = 13; // string 商品型号
+	optional uint32 PriceType = 14; // uint32 定价类型-1:一口价2:点价3:暂定价
+	optional double Qty = 15; // double 数量
+	optional double Price = 16; // double 价格暂定价[1:一口价、3:暂定价]
+	optional double Amount = 17; // double 金额[1:一口价、3:暂定价]
+	optional string DeliveryStartDate = 18; // string 交收期(开始)
+	optional string DeliveryEndDate = 19; // string 交收期(结束)
+	optional uint32 GoodsID = 20; // uint32 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
+	optional double PriceMove = 21; // double 升贴水[2:点价3:暂定价]
+	optional string StartDate = 22; // string 点价开始日期[2:点价3:暂定价]
+	optional string EndDate = 23; // string 点价结束日期[2:点价3:暂定价]
+	optional string PointDesc = 24; // string 点价备注[2:点价3:暂定价]
+	optional string DeliveryDesc = 25; // string 交收方式
+	optional uint32 MerUserID = 26; // uint32 跟单员ID
+	optional uint32 TradeUserID = 27; // uint32 交易员ID
+	optional double PricedQty = 28; // double 已定价量
+	optional double PricedAmount = 29; // double 已定价金额
+	optional uint32 SpotGoodsBrandID = 30; // uint32 现货品牌ID
+	optional string Remark = 31; // string 合同备注
+	optional uint32 SaleUserID = 32; // uint32 业务员ID
+	optional uint64 AccountID = 33; // uint64 期货账户ID
+	optional uint32 BizType = 34; // uint32 业务类型 - 1:套保 2:套利
+	optional uint64 WrFactorTypeID = 35; // uint64 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
+	optional uint32 CustomerUserID = 36; // uint32 客户ID
+	optional uint32 RelatedUserID = 37; // uint32 关联用户ID
+}
 
 

+ 5 - 2
src/services/funcode/index.ts

@@ -78,8 +78,11 @@ export const funCode: Code = {
     GldErmcpSpotContractOperateReq: 1900711,    /// 现货合同操作请求(1179653)
     GldErmcpSpotContractOperateRsp: 1900712,    /// 现货合同操作响应(1179654)
 
-    ContractOperateApplyReq: 1179656, // 合同操作请求(1179656)
-    ContractOperateApplyRsp: 1179657, // 合同操作响应(1179657)
+    SpotContractOperateReq: 1179653, // 现货合同操作请求(1179653)
+    SpotContractOperateRsp: 1179654, // 现货合同操作响应(1179654)
+
+    ErmcpContractOperateApplyReq: 1900714, /// 合同操作请求(1179656)
+    ErmcpContractOperateApplyRsp: 1900715, /// 合同操作响应(1179657)
 
     // 套保计划 -- 新增套保计划
     ErmcpHedgePlanReq: 1900708,  /// 套保计划操作请求(1179650)

+ 3 - 3
src/services/proto/contract/index.ts

@@ -10,8 +10,8 @@ import {ErmcpContractOperateApplyReq} from "@/services/proto/contract/interface"
 export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
     return new Promise((resolve, reject) => {
         const params = {
-            protobufName: 'ContractOperateApplyReq',
-            funCodeName: 'ContractOperateApplyReq',
+            protobufName: 'ErmcpContractOperateApplyReq',
+            funCodeName: 'ErmcpContractOperateApplyReq',
             reqParams:  param,
             msgHeadParams: {
                 AccountID: param.accountid,
@@ -22,7 +22,7 @@ export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promi
         const package50 = buildProtoReq50(params);
         APP.sendTradingServer(package50, undefined, {
             onSuccess: (res) => {
-                const { isSuccess, result } = parseProtoRsp50(res, 'ContractOperateApplyRsp');
+                const { isSuccess, result } = parseProtoRsp50(res, 'ErmcpContractOperateApplyRsp');
                 if (isSuccess) {
                     resolve(result);
                 } else {