|
|
@@ -1,55 +1,106 @@
|
|
|
import APP from "@/services";
|
|
|
import {commonSearch_go} from "@/goServiceAPI";
|
|
|
import {
|
|
|
- Ermcp3AreaSpot, Ermcp3AreaSpotDetail,
|
|
|
+ Ermcp3AreaSpot,
|
|
|
+ Ermcp3AreaSpotDetail,
|
|
|
+ Ermcp3AreaSpotDetailReq,
|
|
|
Ermcp3ExposureDetail,
|
|
|
Ermcp3ExposureReq,
|
|
|
+ ErmcpExposurePostion,
|
|
|
+ ErmcpExposurePostionReq,
|
|
|
+ ErmcpHedgePosition,
|
|
|
+ ErmcpHedgePositionDetail,
|
|
|
+ ErmcpHedgePositionDetailReq,
|
|
|
ErmcpRealExposureModel
|
|
|
} from "@/goServiceAPI/ermcp/exposure/interface";
|
|
|
|
|
|
/** ================================= 敞口 ================================**/
|
|
|
|
|
|
/**
|
|
|
- * 请求实时敞口 /Ermcp/QueryRealtimeExposure
|
|
|
+ * 请求实时敞口 (敞口 -> 实时敞口) /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}`);
|
|
|
+ throw new Error(`查询敞口 -> 实时敞口: ${err.message}`);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 请求实时敞口现货明细信息 /Ermcp3/QueryExposureDetail
|
|
|
- * @param req
|
|
|
+ * 请求实时敞口现货明细信息 (敞口 ->实时敞口 -> 现货明细) /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}`);
|
|
|
+ throw new Error(`查询敞口 ->实时敞口 -> 现货明细: ${err.message}`);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 请求敞口现货头寸 /Ermcp3/QueryExposureSpot
|
|
|
+ * 查询实时敞口期货头寸明细 (敞口 ->实时敞口 -> 期货明细) /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('/Ermcp/QueryExposureSpot', {areauserid})
|
|
|
+ return commonSearch_go('/Ermcp3/QueryExposureSpot', {areauserid})
|
|
|
.catch(err => {
|
|
|
- throw new Error(`查询敞口现货头寸: ${err.message}`);
|
|
|
+ throw new Error(`查询敞口 -> 现货头寸: ${err.message}`);
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function QuerySpotPositionDetail() : Promise<Ermcp3AreaSpotDetail[]>{
|
|
|
+/**
|
|
|
+ * 查询敞口现货头寸明细(敞口 -> 现货头寸 -> 现货明细) /Ermcp3/QueryExposureSpotDetail
|
|
|
+ * req.deliverygoodsid 现货品种ID
|
|
|
+ * @constructor
|
|
|
+ */
|
|
|
+export function QuerySpotPositionDetail(req: Ermcp3AreaSpotDetailReq) : Promise<Ermcp3AreaSpotDetail[]>{
|
|
|
const areauserid = APP.get('userAccount').memberuserid; // 所属机构id
|
|
|
- return commonSearch_go('/Ermcp/QueryExposureSpot', {areauserid})
|
|
|
+ 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}`);
|
|
|
+ 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}`);
|
|
|
+ })
|
|
|
+}
|
|
|
+
|