Przeglądaj źródła

commit 合同操作 proto

xkwg 4 lat temu
rodzic
commit
8130b47889

+ 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 附件
 }