| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- /** ================================= 仓单贸易v2 ================================**/
- import { getSelectedAccountId } from "@/services/bus/account";
- import { getUsrId } from "@/services/bus/user";
- import { commonSearch_go } from "@/services/go";
- import {
- QueryFaProductDetailReq,
- QueryFilterItemReq, QueryOrderQuoteDetailReq,
- QueryOrderQuoteReq, QueryPerformancePlanReq,
- QueryWrGoodsInfoReq,
- QueryWrOrderDetailReq,
- QueryWrPositionReq, QueryWrSpecialMatchOrderReq,
- QueryWrTradeDetailReq, WrFAProductDetail, WrFilterItem,
- WrGoodsInfo, WrHoldLB,
- WrOrderDetail,
- WrOrderQuote,
- WrOrderQuoteDetail, WrPerformancePlan,
- WrPosition, WrSpecialMatchOrder,
- WrTradeDetail
- } from "@/services/go/wrtrade/interface";
- /**
- * 查询筛选框列表 /WrTrade2/QueryFilterItem
- * 页面 - 一口价挂牌 - 上方品类 | 仓库 下拉框数据获取
- * @param req
- */
- export function queryFilterItem(req: QueryFilterItemReq): Promise<WrFilterItem[]> {
- return commonSearch_go('/WrTrade2/QueryFilterItem', req).catch((err) => {
- throw new Error(`查询筛选框列表: ${err}`);
- });
- }
- /**
- * 查询大厅行情列表 /WrTrade2/QueryOrderQuote
- * @param req
- */
- export function queryOrderQuote(req: QueryOrderQuoteReq): Promise<WrOrderQuote[]> {
- return commonSearch_go('/WrTrade2/QueryOrderQuote', req).catch((err) => {
- throw new Error(`查询大厅行情列表: ${err}`);
- });
- }
- /**
- * 查询买卖大厅 /WrTrade2/QueryOrderQuoteDetail
- * @param req
- */
- export function queryOrderQuoteDetail(req: QueryOrderQuoteDetailReq): Promise<WrOrderQuoteDetail[]> {
- return commonSearch_go('/WrTrade2/QueryOrderQuoteDetail', req).catch((err) => {
- throw new Error(`查询买卖大厅: ${err}`);
- });
- }
- /**
- * 查询仓单商品信息 /WrTrade2/QueryWrGoodsInfo
- * @param req
- */
- export function queryWrGoodsInfo(req: QueryWrGoodsInfoReq): Promise<WrGoodsInfo[]> {
- return commonSearch_go('/WrTrade2/QueryWrGoodsInfo', req).catch((err) => {
- throw new Error(`查询仓单商品信息: ${err}`);
- });
- }
- /**
- * 页面 现货仓单 | 预售仓单 -> 挂单
- * 仓单头寸
- * 查询仓单委托单(挂单) /WrTrade2/QueryWrOrderDetail
- * @param req
- */
- export function queryWrOrderDetail(req: QueryWrOrderDetailReq): Promise<WrOrderDetail[]> {
- req.userid = getUsrId();
- return commonSearch_go('/WrTrade2/QueryWrOrderDetail', req).catch((err) => {
- throw new Error(`查询仓单委托单(挂单): ${err}`);
- });
- }
- /**
- * 页面 现货仓单->现货汇总/库存汇总/现货明细 ; 预售仓单->订单汇总
- * 查询现货(预售)仓单持仓 /WrTrade2/QueryWrPosition
- */
- export function queryWrPosition(req: QueryWrPositionReq): Promise<WrPosition[]> {
- req.userid = getUsrId();
- return commonSearch_go('/WrTrade2/QueryWrPosition', req).catch((err) => {
- throw new Error(`查询现货(预售)仓单持仓: ${err}`);
- });
- }
- /**
- * 查询指定成交 /WrTrade2/QueryWrSpecialMatchOrder
- * 页面 现货仓单 | 预售仓单 -> 指定成交
- */
- export function queryWrSpecialMatchOrder(req: QueryWrSpecialMatchOrderReq): Promise<WrSpecialMatchOrder[]> {
- req.userid = getUsrId();
- return commonSearch_go('/WrTrade2/QueryWrSpecialMatchOrder', req).catch((err) => {
- throw new Error(`查询指定成交: ${err}`);
- });
- }
- /**
- * 查询仓单成交明细 /WrTrade2/QueryWrTradeDetail
- */
- export function queryWrTradeDetail(req: QueryWrTradeDetailReq): Promise<WrTradeDetail[]> {
- return commonSearch_go('/WrTrade2/QueryWrTradeDetail', req).catch((err) => {
- throw new Error(`查询仓单成交明细: ${err}`);
- });
- }
- /**
- * 查询仓单持有记录 /WrTrade2/QueryHoldLB
- * 页面 现货仓单 -> 现货明细
- * @param req
- */
- export function queryHoldLB(): Promise<WrHoldLB[]> {
- const accountid = getSelectedAccountId()
- return commonSearch_go('/WrTrade2/QueryHoldLB', { accountid }).catch((err) => {
- throw new Error(`查询仓单持有记录: ${err}`);
- });
- }
- /**
- * 查询履约信息 /WrTrade2/QueryPerformancePlan
- */
- export function QueryPerformancePlan(req: QueryPerformancePlanReq): Promise<WrPerformancePlan[]> {
- req.userid = getUsrId();
- return commonSearch_go('/WrTrade2/QueryPerformancePlan', req).catch((err) => {
- throw new Error(`查询履约信息: ${err}`);
- });
- }
- /**
- * 查询融资产品列表 /WrTrade2/QueryFaProductDetail
- */
- export function queryFaProductDetail(req: QueryFaProductDetailReq): Promise<WrFAProductDetail[]> {
- return commonSearch_go('/WrTrade2/QueryFaProductDetail', req).catch((err) => {
- throw new Error(`查询融资产品列表: ${err}`);
- });
- }
|