| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- import APP from "@/services";
- import {commonSearch_go} from "@/goServiceAPI";
- import {
- Ermcp3AreaSpot,
- Ermcp3AreaSpotDetail,
- Ermcp3AreaSpotDetailReq,
- Ermcp3ExposureDetail,
- Ermcp3ExposureReq,
- ErmcpExposurePostion,
- ErmcpExposurePostionReq,
- ErmcpHedgePosition,
- ErmcpHedgePositionDetail,
- ErmcpHedgePositionDetailReq,
- ErmcpRealExposureModel
- } from "@/goServiceAPI/ermcp/exposure/interface";
- /** ================================= 敞口 ================================**/
- /**
- * 请求实时敞口 (敞口 -> 实时敞口) /Ermcp/QueryRealtimeExposure
- * @constructor
- */
- export function QueryActualExposure() : Promise<ErmcpRealExposureModel[]>{
- const AreaUserID = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp/QueryRealtimeExposure', {AreaUserID})
- .catch(err => {
- throw new Error(`查询敞口 -> 实时敞口: ${err.message}`);
- })
- }
- /**
- * 请求实时敞口现货明细信息 (敞口 ->实时敞口 -> 现货明细) /Ermcp3/QueryExposureDetail
- * @param req.middlegoodsid 套保商品
- * @constructor
- */
- export function QueryActualExposureDetail(req: Ermcp3ExposureReq) : Promise<Ermcp3ExposureDetail[]>{
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryExposureDetail', {areauserid, ...req})
- .catch(err => {
- throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err.message}`);
- })
- }
- /**
- * 查询实时敞口期货头寸明细 (敞口 ->实时敞口 -> 期货明细) /Ermcp/QueryRealtimeExposurePosition
- * @param req.middleGoodsId 套保商品ID
- * @constructor
- */
- export function QueryAutualExposurePosition(req: ErmcpExposurePostionReq): Promise<ErmcpExposurePostion[]>{
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryExposureDetail', {areaUserId, ...req})
- .catch(err => {
- throw new Error(`查询敞口 ->实时敞口 -> 期货明细: ${err.message}`);
- })
- }
- /**
- * 请求敞口现货头寸 (敞口 -> 现货头寸) /Ermcp3/QueryExposureSpot
- * @constructor
- */
- export function QuerySpotPosition() : Promise<Ermcp3AreaSpot[]>{
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryExposureSpot', {areauserid})
- .catch(err => {
- throw new Error(`查询敞口 -> 现货头寸: ${err.message}`);
- })
- }
- /**
- * 查询敞口现货头寸明细(敞口 -> 现货头寸 -> 现货明细) /Ermcp3/QueryExposureSpotDetail
- * req.deliverygoodsid 现货品种ID
- * @constructor
- */
- export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq) : Promise<Ermcp3AreaSpotDetail[]>{
- const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp3/QueryExposureSpotDetail', {areauserid, ...req})
- .catch(err => {
- throw new Error(`查询敞口 -> 现货头寸 -> 现货明细: ${err.message}`);
- })
- }
- /**
- * 查询敞口期货头寸(菜单:敞口-> 期货头寸) /Ermcp/QueryExposureHedgePosition
- * @constructor
- */
- export function QueryExposureHedgePosition() : Promise<ErmcpHedgePosition>{
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp/QueryExposureHedgePosition', {areaUserId})
- .catch(err => {
- throw new Error(`查询敞口 -> 期货头寸: ${err.message}`);
- })
- }
- /**
- * 查询敞口期货头寸期货明细(菜单:敞口 -> 期货头寸 -> 期货明细) /Ermcp/QueryExposureHedgePositionDetail
- * @param req.goodsId 商品id
- * @constructor
- */
- export function QueryExposureHedgePositionDetail(req : ErmcpHedgePositionDetailReq) :Promise<ErmcpHedgePositionDetail[]>{
- const areaUserId = APP.get('userAccount').memberuserid; // 所属机构id
- return commonSearch_go('/Ermcp/QueryExposureHedgePositionDetail', {areaUserId, ...req})
- .catch(err => {
- throw new Error(`查询敞口->期货头寸->期货明细: ${err.message}`);
- })
- }
|