فهرست منبع

commit 新增proto请求

xkwg 4 سال پیش
والد
کامیت
2b016cd3ba

+ 92 - 0
public/proto/mtp.proto

@@ -781,3 +781,95 @@ message WarehouseStateChangeRsp {
 	optional string RetDesc = 3; // string 描述信息
 	optional uint64 warehouseid = 4; // uint64 仓库ID
 }
+
+// 现货合同操作请求 0 29 167
+message GldErmcpSpotContractOperateReq {
+	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 ManageServiceMI2.GldSpotContractInfo Info = 8; // GldSpotContractInfo 现货合同信息
+}
+// 现货合同操作响应 0 29 168
+message GldErmcpSpotContractOperateRsp {
+	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 29 166
+message GldSpotContractInfo {
+	optional string TradeDate = 1; // string 交易日(yyyyMMdd)
+	optional string ContractNo = 2; // string 现货合同编号
+	optional int32 ContractType = 3; // int32 现货合同类型-1:采购-1:销售
+	optional uint64 UserID = 4; // uint64 机构ID
+	optional uint64 BuyUserID = 5; // uint64 采购方ID
+	optional uint64 SellUserID = 6; // uint64 客户ID
+	optional string SignDate = 7; // string 签订日期
+	optional bytes ContractAttachment = 8; // bytes 合同附件
+	optional double ContractMargin = 9; // double 合同保证金
+	optional uint64 DeliveryGoodsID = 10; // uint64 现货品种ID
+	optional uint64 WrStandardID = 11; // uint64 现货商品ID
+	optional uint32 ProductType = 12; // uint32 产品类型-1:标准仓单2:等标3:非标
+	optional double ConvertFactor = 13; // double 标仓系数
+	optional string SpotGoodsDesc = 14; // string 商品型号
+	optional uint32 PriceType = 15; // uint32 定价类型-1:一口价2:点价3:暂定价
+	optional double Qty = 16; // double 数量
+	optional double Price = 17; // double 价格暂定价[1:一口价、3:暂定价]
+	optional double Amount = 18; // double 金额[1:一口价、3:暂定价]
+	optional string DeliveryStartDate = 19; // string 交收期(开始)
+	optional string DeliveryEndDate = 20; // string 交收期(结束)
+	optional uint64 GoodsID = 21; // uint64 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
+	optional double PriceMove = 22; // double 升贴水[2:点价3:暂定价]
+	optional string StartDate = 23; // string 点价开始日期[2:点价3:暂定价]
+	optional string EndDate = 24; // string 点价结束日期[2:点价3:暂定价]
+	optional string PointDesc = 25; // string 点价备注[2:点价3:暂定价]
+	optional string DeliveryDesc = 26; // string 交收方式
+	optional uint64 MerUserID = 27; // uint64 跟单员ID
+	optional uint64 TradeUserID = 28; // uint64 交易员ID
+	optional double PricedQty = 29; // double 已定价量
+	optional double PricedAmount = 30; // double 已定价金额
+	optional uint64 SpotGoodsBrandID = 31; // uint64 现货品牌ID
+	optional string Remark = 32; // string 合同备注
+	optional uint64 SaleUserID = 33; // uint64 业务员ID
+	optional uint64 AccountID = 34; // uint64 期货账户ID
+	optional uint32 BizType = 35; // uint32 业务类型 - 1:套保 2:套利
+}
+// 合同操作请求 0 29 170
+message ErmcpContractOperateApplyReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional uint64 OperateApplyID = 2; // uint64 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)
+	optional uint32 OperateType = 3; // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
+	optional uint32 OperateSrc = 4; // uint32 操作来源-1:管理端2:终端
+	optional uint64 UserID = 5; // uint64 操作用户ID
+	optional string Remark = 6; // string 备注
+	optional string ClientTicket = 7; // string 客户端流水号
+	optional ManageServiceMI2.ErmcpContractOperateApplyInfo Info = 8; // ErmcpContractOperateApplyInfo 合同操作信息
+}
+// 合同操作响应 0 29 171
+message ErmcpContractOperateApplyRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint64 OperateApplyID = 4; // uint64 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)
+	optional uint32 OperateType = 5; // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
+	optional uint32 OperateSrc = 6; // uint32 操作来源-1:管理端2:终端
+	optional string ClientTicket = 7; // string 客户端流水号
+}
+// 合同操作信息 0 29 169
+message ErmcpContractOperateApplyInfo {
+	optional uint32 OperateApplyType = 1; // uint32 操作申请类型-1:点价2:结算3:款项4:发票
+	optional uint64 RelatedID = 2; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+	optional bytes DetailJson = 3; // bytes 明细JSON
+	optional bytes AttachUrl = 4; // bytes 附件
+}
+
+
+

+ 5 - 0
src/funcode/index.ts

@@ -75,4 +75,9 @@ export const funCode: Code = {
     WareHouseStateChangeRsp: 1900688,    /// 仓库状态修改响应
 
 
+    GldErmcpSpotContractOperateReq: 1900711,    /// 现货合同操作请求(1179653)
+    GldErmcpSpotContractOperateRsp: 1900712,    /// 现货合同操作响应(1179654)
+
+    ContractOperateApplyReq: 1179656, // 合同操作请求(1179656)
+    ContractOperateApplyRsp: 1179657, // 合同操作响应(1179657)
 };

+ 2 - 2
src/goServiceAPI/ermcp/customInfo/index.ts

@@ -1,6 +1,6 @@
 /** ================================= 客户资料 ================================**/
 
-import { commonSearch_go } from '@/goServiceAPI/index';
+import {BaseResponse, commonSearch_go, commonUpdate_go} from '@/goServiceAPI/index';
 import APP from '@/services';
 import * as type from './interface';
 import { QueryCustomInfoEnum } from './type';
@@ -27,7 +27,7 @@ export function QueryCustomInfo(queryType: QueryCustomInfoEnum): Promise<type.Qu
  * @constructor
  */
 // export function QueryModifyUserInfo(userInfoApply: type.ModifyUserInfoApplyReq): Promise<BaseResponse> {
-//     return commonUpdate_go('/Ermcp/ModifyUserInfoApply', { userInfoApply })
+//     return commonUpdate_go('/Ermcp/ModifyUserInfoApply',  userInfoApply )
 //         .catch(err => {
 //             throw new Error(`新增客户申请: ${err.message}`);
 //         })

+ 0 - 0
src/protoService/accountinfo/index.ts


+ 0 - 0
src/protoService/accountinfo/interface.ts


+ 39 - 0
src/protoService/contract/index.ts

@@ -0,0 +1,39 @@
+import {DeliveryGoodsApplyReq} from "@/protoService/delivery/interface";
+import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
+import APP from "@/services";
+import {Callback} from "@/utils/websocket";
+import {ErmcpContractOperateApplyReq} from "@/protoService/contract/interface";
+
+/**
+ * 合同
+ * @param info ContractOperateApplyInfo 操作信息
+ * @param operateType Int 操作类型-1:登记2:确认3:拒绝4:撤销
+ * @param remark String 备注
+ * @param operateApplyID Long 暂时传0 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)//不知道是啥玩意
+ */
+export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promise<any> => {
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'ContractOperateApplyReq',
+            funCodeName: 'ContractOperateApplyReq',
+            reqParams:  param,
+            msgHeadParams: {
+                AccountID: param.accountid,
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'ContractOperateApplyRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

+ 28 - 0
src/protoService/contract/interface.ts

@@ -0,0 +1,28 @@
+// 合同操作请求 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 合同操作信息
+}
+// 合同操作响应 0 29 171
+export interface ErmcpContractOperateApplyRsp {
+    RetCode: number // int32 返回码
+    RetDesc: string // string 描述信息
+    OperateApplyID: number // uint64 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)
+    OperateType: number // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
+    OperateSrc: number // uint32 操作来源-1:管理端2:终端
+    ClientTicket: string // string 客户端流水号
+}
+
+// 合同操作信息 0 29 169
+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 附件
+}

+ 0 - 2
src/protoService/delivery/index.ts

@@ -1,6 +1,4 @@
 import {DeliveryGoodsApplyReq} from "@/protoService/delivery/interface";
-import {getUserId} from "@/services/bus/account";
-import {getUUID} from "@/utils/tool/common";
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";

+ 39 - 0
src/protoService/spotcontract/index.ts

@@ -0,0 +1,39 @@
+import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
+import APP from "@/services";
+import {Callback} from "@/utils/websocket";
+import {GldErmcpSpotContractOperateReq} from "@/protoService/spotcontract/interface";
+
+/**(重点提醒 这里属于管理端接口,仅用于新增)以上来自android代码  回头需要确认
+ * 获取新增采购合同报文
+ * @param contractInfo SpotContractInfo 新增合同信息
+ * @param OperateType String 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
+ * @param Remark String 备注
+ * @param SpotContractID String 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
+ * @param
+ */
+export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<any> => {
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'GldErmcpSpotContractOperateReq',
+            funCodeName: 'GldErmcpSpotContractOperateReq',
+            reqParams: param,
+            msgHeadParams: {
+                AccountID: param.accountid,
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'GldErmcpSpotContractOperateRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

+ 59 - 0
src/protoService/spotcontract/interface.ts

@@ -0,0 +1,59 @@
+// 现货合同操作请求 0 29 167
+export interface GldErmcpSpotContractOperateReq {
+    accountid: number  // header
+    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: GldSpotContractInfo // GldSpotContractInfo 现货合同信息
+}
+// 现货合同操作响应 0 29 168
+export interface GldErmcpSpotContractOperateRsp {
+    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 客户端流水号
+}
+
+// 现货合同信息 0 29 166
+export interface GldSpotContractInfo {
+    TradeDate: string // string 交易日(yyyyMMdd)
+    ContractNo: string // string 现货合同编号
+    ContractType: number// int32 现货合同类型-1:采购-1:销售
+    UserID :number // uint64 机构ID
+    BuyUserID :number // uint64 采购方ID
+    SellUserID :number // uint64 客户ID
+    SignDate : string // string 签订日期
+    ContractAttachment : Uint8Array // bytes 合同附件
+    ContractMargin : number // double 合同保证金
+    DeliveryGoodsID : number  // uint64 现货品种ID
+    WrStandardID : number  // uint64 现货商品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 // uint64 点价合约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 // uint64 跟单员ID
+    TradeUserID: number // uint64 交易员ID
+    PricedQty: number // double 已定价量
+    PricedAmount: number // double 已定价金额
+    SpotGoodsBrandID: number // uint64 现货品牌ID
+    Remark: string // string 合同备注
+    SaleUserID: number // uint64 业务员ID
+    AccountID: number // uint64 期货账户ID
+    BizType: number // uint32 业务类型 - 1:套保 2:套利
+}