|
|
@@ -1,6 +1,7 @@
|
|
|
import APP from '@/services';
|
|
|
import { commonSearch_go } from '@/services/go';
|
|
|
import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3ExposureDetail, Ermcp3ExposureReq, ErmcpExposurePostion, ErmcpExposurePostionReq, ErmcpHedgePosition, ErmcpHedgePositionDetail, ErmcpHedgePositionDetailReq, ErmcpRealExposureModel } from '@/services/go/ermcp/exposure/interface';
|
|
|
+import {getUserId} from "@/services/bus/account";
|
|
|
|
|
|
/** ================================= 业务 - 敞口 ================================**/
|
|
|
|
|
|
@@ -9,8 +10,8 @@ import { Ermcp3AreaSpot, Ermcp3AreaSpotDetail, Ermcp3AreaSpotDetailReq, Ermcp3Ex
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
|
|
|
- const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp/QueryRealtimeExposure', { AreaUserID }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 所属机构id
|
|
|
+ return commonSearch_go('/Ermcp/QueryRealtimeExposure', { userid }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 实时敞口: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -21,8 +22,9 @@ export function QueryActualExposure(): Promise<ErmcpRealExposureModel[]> {
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp3ExposureDetail[]> {
|
|
|
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureDetail', { areauserid, ...req }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 用户id
|
|
|
+ const usertype = 2; // 用户类型 2-机构 7-企业成员
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureDetail', { userid, usertype, ...req }).catch((err) => {
|
|
|
throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -33,8 +35,8 @@ export function QueryActualExposureDetail(req: Ermcp3ExposureReq): Promise<Ermcp
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]> {
|
|
|
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { areaUserId, ...req }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 所属机构id
|
|
|
+ return commonSearch_go('/Ermcp/QueryRealtimeExposurePosition', { userid, ...req }).catch((err) => {
|
|
|
throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -44,8 +46,9 @@ export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promi
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
|
|
|
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureSpot', { areauserid }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 用户id
|
|
|
+ const usertype = 2; // 用户类型 2-机构 7-企业成员
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureSpot', { userid, usertype }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 现货头寸: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -56,8 +59,9 @@ export function QuerySpotPosition(): Promise<Ermcp3AreaSpot[]> {
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<Ermcp3AreaSpotDetail[]> {
|
|
|
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', { areauserid, ...req }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 用户id
|
|
|
+ const usertype = 2; // 用户类型 2-机构 7-企业成员
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', { userid, usertype, ...req }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 现货头寸 -> 现货明细: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -67,8 +71,8 @@ export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq): Promise<E
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
|
|
|
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { areaUserId }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 所属机构id
|
|
|
+ return commonSearch_go('/Ermcp/QueryExposureHedgePosition', { userid }).catch((err) => {
|
|
|
throw new Error(`查询敞口 -> 期货头寸: ${err.message}`);
|
|
|
});
|
|
|
}
|
|
|
@@ -79,8 +83,8 @@ export function QueryExposureHedgePosition(): Promise<ErmcpHedgePosition[]> {
|
|
|
* @constructor
|
|
|
*/
|
|
|
export function QueryExposureHedgePositionDetail(req: ErmcpHedgePositionDetailReq): Promise<ErmcpHedgePositionDetail[]> {
|
|
|
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', { areaUserId, ...req }).catch((err) => {
|
|
|
+ const userid = getUserId(); // 所属机构id
|
|
|
+ return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', { userid, ...req }).catch((err) => {
|
|
|
throw new Error(`查询敞口->期货头寸->期货明细: ${err.message}`);
|
|
|
});
|
|
|
}
|