|
@@ -9,10 +9,9 @@ import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3Ex
|
|
|
* 请求实时敞口 (敞口 -> 实时敞口) /Ermcp/QueryRealtimeExposure
|
|
* 请求实时敞口 (敞口 -> 实时敞口) /Ermcp/QueryRealtimeExposure
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
-export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
|
|
|
|
|
- const userid = getUserId(); // 所属机构id
|
|
|
|
|
- const usertype = getUserAccountType()
|
|
|
|
|
- return commonSearch_go('/Ermcp/QueryRealtimeExposure', { userid, usertype }).catch((err) => {
|
|
|
|
|
|
|
+export function QueryActualExposure(userid = 0): Promise<ErmcpRealExposureModel[]> {
|
|
|
|
|
+ const id = userid || getUserId(); // 所属机构id
|
|
|
|
|
+ return commonSearch_go('/Ermcp/QueryRealtimeExposure', { userid: id }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 实时敞口: ${err}`);
|
|
throw new Error(`查询敞口 -> 实时敞口: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -23,9 +22,9 @@ export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp3ExposureDetail[]> {
|
|
export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp3ExposureDetail[]> {
|
|
|
- const userid = getAreaUserId(); // 用户id
|
|
|
|
|
|
|
+ req.userid = req.userid || getAreaUserId(); // 用户id
|
|
|
req.usertype = getUserAccountType()
|
|
req.usertype = getUserAccountType()
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureDetail', { userid, ...req }).catch((err) => {
|
|
|
|
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureDetail', req).catch((err) => {
|
|
|
throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err}`);
|
|
throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -36,9 +35,8 @@ export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]> {
|
|
export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]> {
|
|
|
- const userid = getUserId(); // 所属机构id
|
|
|
|
|
- const usertype = getUserAccountType()
|
|
|
|
|
- return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { userid, usertype, ...req }).catch((err) => {
|
|
|
|
|
|
|
+ req.userid = req.userid || getUserId(); // 所属机构id
|
|
|
|
|
+ return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', req).catch((err) => {
|
|
|
throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err}`);
|
|
throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -47,10 +45,10 @@ export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promi
|
|
|
* 请求敞口现货头寸 (敞口 -> 现货头寸) /Ermcp3/QueryExposureSpot
|
|
* 请求敞口现货头寸 (敞口 -> 现货头寸) /Ermcp3/QueryExposureSpot
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
-export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
|
|
|
|
|
- const userid = getUserId(); // 用户id
|
|
|
|
|
|
|
+export function QuerySpotPosition(userid = 0): Promise<Ermcp3AreaSpot[]> {
|
|
|
|
|
+ const id = userid || getUserId(); // 用户id
|
|
|
const usertype = getUserAccountType(); // 用户类型 2-机构 7-企业成员
|
|
const usertype = getUserAccountType(); // 用户类型 2-机构 7-企业成员
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureSpot', { userid, usertype }).catch((err) => {
|
|
|
|
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureSpot', { userid: id, usertype }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 现货头寸: ${err}`);
|
|
throw new Error(`查询敞口 -> 现货头寸: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -61,9 +59,9 @@ export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<Ermcp3AreaSpotDetail[]> {
|
|
export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<Ermcp3AreaSpotDetail[]> {
|
|
|
- const userid = getUserId(); // 用户id
|
|
|
|
|
- const usertype = getUserAccountType(); // 用户类型 2-机构 7-企业成员
|
|
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', { userid, usertype, ...req }).catch((err) => {
|
|
|
|
|
|
|
+ req.userid = req.userid || getUserId(); // 用户id
|
|
|
|
|
+ req.usertype = getUserAccountType(); // 用户类型 2-机构 7-企业成员
|
|
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', req).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 现货头寸 -> 现货明细: ${err}`);
|
|
throw new Error(`查询敞口 -> 现货头寸 -> 现货明细: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -72,10 +70,9 @@ export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<E
|
|
|
* 查询敞口期货头寸(菜单:敞口-> 期货头寸) /Ermcp/QueryExposureHedgePosition
|
|
* 查询敞口期货头寸(菜单:敞口-> 期货头寸) /Ermcp/QueryExposureHedgePosition
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
-export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
|
|
|
|
|
- const userid = getUserId(); // 所属机构id
|
|
|
|
|
- const usertype = getUserAccountType()
|
|
|
|
|
- return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { userid, usertype }).catch((err) => {
|
|
|
|
|
|
|
+export function QueryExposureHedgePosition(userid = 0): Promise<ErmcpHedgePosition[]> {
|
|
|
|
|
+ const id = userid || getUserId(); // 所属机构id
|
|
|
|
|
+ return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { userid: id }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 期货头寸: ${err}`);
|
|
throw new Error(`查询敞口 -> 期货头寸: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -86,9 +83,8 @@ export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
|
|
|
* @constructor
|
|
* @constructor
|
|
|
*/
|
|
*/
|
|
|
export function QueryExposureHedgePositionDetail(req: ErmcpHedgePositionDetailReq): Promise<ErmcpHedgePositionDetail[]> {
|
|
export function QueryExposureHedgePositionDetail(req: ErmcpHedgePositionDetailReq): Promise<ErmcpHedgePositionDetail[]> {
|
|
|
- const userid = getUserId(); // 所属机构id
|
|
|
|
|
- const usertype = getUserAccountType()
|
|
|
|
|
- return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', { userid, usertype, ...req }).catch((err) => {
|
|
|
|
|
|
|
+ req.userid = req.userid || getUserId(); // 所属机构id
|
|
|
|
|
+ return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', req).catch((err) => {
|
|
|
throw new Error(`查询敞口->期货头寸->期货明细: ${err}`);
|
|
throw new Error(`查询敞口->期货头寸->期货明细: ${err}`);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|