| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- /** ================================= 前海金相关接口 ================================**/
- import { getSelectedAccountId } from "@/services/bus/account";
- import { getUserId } from "@/services/bus/user";
- import { commonSearch_go } from "@/services/go";
- import {
- Ermcp3SpotGoodsPrice, Ermcp3SpotGoodsPriceLog,
- QhjAccountOutInApply, QhjAgreementChangeLog, QhjAgreementConfig,
- QhjContract,
- QhjCustomer, QhjCustomerSignStatus,
- QhjMgrPosition,
- QhjMgrSubArea, QhjMgrTradeDetailRsp,
- QhjMgrTradeOrderDetailRsp,
- QhjMgrTradePayOrder,
- QhjParentAreaList,
- QhjPayOrder,
- QhjPickGoods,
- QhjReckonPriceLog,
- QhjRStrategy,
- QhjRSTriggerLog,
- QhjTradeGoodsPickup,
- QueryAccountInOutApplyReq, QueryAgreementChangeLogReq, QueryAgreementConfigReq,
- QueryBrokerApplyRsp,
- QueryBrokerApplyRsq,
- QueryContractLogReq,
- QueryContractLogRsp, QueryCustomerInfoReq, QueryCustomerSignStatusReq,
- QueryPayOrderReq,
- QueryReckonPriceLogReq, QuerySpotGoodsPrice, QuerySpotGoodsPriceLogReq,
- QuerySubAreaReq,
- QueryTradeDetailReq,
- QueryTradeOrderDetailReq,
- QueryTradePayOrderReq,
- QueryTradePositionReq
- } from "@/services/go/ermcp/qhj/interface";
- /**
- * -- 铂金宝 - 提货查询
- * 查询提货 /Qhj/QueryTradeGoodsPickup
- * @constructor
- */
- export function queryTradeGoodsPickup(): Promise<QhjTradeGoodsPickup[]> {
- const userid = getUserId()
- return commonSearch_go('/Qhj/QueryTradeGoodsPickup', { userid }).catch((err) => {
- throw new Error(`查询提货: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 定投价查询
- * 查询定投价(结算价) /Qhj/QueryReckonPriceLog
- * @param req
- */
- export function queryReckonPriceLog(req: QueryReckonPriceLogReq): Promise<QhjReckonPriceLog[]> {
- return commonSearch_go('/Qhj/QueryReckonPriceLog', req).catch((err) => {
- throw new Error(`定投价查询: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 定投查询 - 定投流水查询
- * 查询定投记录(定投管理/详情/定投记录) /Qhj/QueryRSTriggerLog
- * @param req
- */
- export function queryRSTriggerLog(status?: 1 | 2 | 3): Promise<QhjRSTriggerLog[]> {
- // fixme 不传userid
- // const userid = getUserId();
- // const param = status ? { userid, status } : { userid }
- const param = status ? { status } : {}
- return commonSearch_go('/Qhj/QueryRSTriggerLog', param).catch((err) => {
- throw new Error(`查询定投记录: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 定投查询 - 定投计划查询
- * 查询定投设置(我的定投/历史定投[状态=已终止]) /Qhj/set feedback off
- * @param req
- */
- export function queryRStrategy(status?: 1 | 2 | 3): Promise<QhjRStrategy[]> {
- // fixme 不传userid
- // const userid = getUserId();
- const param = status ? { status } : {}
- return commonSearch_go('/Qhj/QueryRStrategy', param).catch((err) => {
- throw new Error(`查询定投设置: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 融资明细流水
- * 查询融资明细流水(融资明细详情页中的流水) /Qhj/QueryContractLog
- * @param 合同id
- */
- export function queryContractLog(param: QueryContractLogReq): Promise<QueryContractLogRsp[]> {
- return commonSearch_go('/Qhj/QueryContractLog', param).catch((err) => {
- throw new Error(`融资明细详情页中的流水): ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 查询所属机构列表
- * 查询客户资料 /Qhj/QueryParentAreaList
- * @param req
- */
- export function queryParentAreaList(): Promise<QhjParentAreaList[]> {
- const userid = getUserId()
- return commonSearch_go('/Qhj/QueryParentAreaList', { userid }).catch((err) => {
- throw new Error(`查询所属机构列表: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 查询经纪人申请(所属客户经理)
- * 查询客户资料 /QhjMgr/QueryBrokerApply
- * @param req
- */
- export function QueryBrokerApply(param: QueryBrokerApplyRsq): Promise<QueryBrokerApplyRsp[]> {
- return commonSearch_go('/QhjMgr/QueryBrokerApply', param).catch((err) => {
- throw new Error(`查询所属机构列表: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 查询待付款单据
- * 查询客户资料 /Qhj/QueryPayOrder
- * @param req
- */
- export function queryPayOrder(req: QueryPayOrderReq): Promise<QhjPayOrder[]> {
- req.accountid = getSelectedAccountId()
- return commonSearch_go('/Qhj/QueryPayOrder', req).catch((err) => {
- throw new Error(`查询待付款单据: ${err}`);
- });
- }
- /****************** (Ermcp3) ****************/
- /**
- * -- 查询现货市价(现货市价)
- * /Ermcp3/QuerySpotGoodsPrice
- */
- export function querySpotGoodsPrice(req: QuerySpotGoodsPrice): Promise<Ermcp3SpotGoodsPrice[]> {
- const param = {
- userid: getUserId(),
- }
- Object.assign(param, req)
- return commonSearch_go('/Ermcp3/QuerySpotGoodsPrice', param).catch((err) => {
- throw new Error(`查询现货市价: ${err}`);
- });
- }
- /**
- * 查询现货市价详情(现货市价/详情)
- * /Ermcp3/QuerySpotGoodsPriceLog
- */
- export function querySpotGoodsPriceLog(req: QuerySpotGoodsPriceLogReq): Promise<Ermcp3SpotGoodsPriceLog[]> {
- return commonSearch_go('/Ermcp3/QuerySpotGoodsPriceLog', req).catch((err) => {
- throw new Error(`查询现货市价详情: ${err}`);
- });
- }
- /****************** 大连千海金(PCWeb) (QhjMgr)*******************************/
- /**
- * -- 铂金宝 - 充值提现审核 - 充值审核/提现审核
- * 查询充值提现 /QhjMgr/QueryAccountInOutApply
- * @param req
- */
- export function queryAccountInOutApply(req: QueryAccountInOutApplyReq): Promise<QhjAccountOutInApply[]> {
- return commonSearch_go('/QhjMgr/QueryAccountInOutApply', req).catch((err) => {
- throw new Error(`查询充值提现: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 融资信息
- * 查询融资明细(合同) /QhjMgr/QueryContract
- * @param 合同id
- */
- export function queryContract(scfcontractid?: number): Promise<QhjContract[]> {
- return commonSearch_go('/QhjMgr/QueryContract', {}).catch((err) => {
- throw new Error(`查询融资明细(合同): ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 客户资料
- * 查询客户资料 /QhjMgr/QueryCustomerInfo
- * @param req
- */
- export function queryCustomerInfo(req: QueryCustomerInfoReq): Promise<QhjCustomer[]> {
- return commonSearch_go('/QhjMgr/QueryCustomerInfo', req).catch((err) => {
- throw new Error(`查询客户资料: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 查询提货商品
- * 查询客户资料 /QhjMgr/QueryPickGoods
- * @param req 状态(可多选,逗号隔开) - 1:正常 2:停用 3:注销
- */
- export function queryPickGoods(status?: string): Promise<QhjPickGoods[]> {
- const param = status ? { status } : {}
- return commonSearch_go('/QhjMgr/QueryPickGoods', param).catch((err) => {
- throw new Error(`查询提货商品: ${err}`);
- });
- }
- /**
- * -- 铂金宝 - 查询子机构列表
- * 查询子机构列表 /QhjMgr/QuerySubArea
- * @param req
- */
- export function querySubArea(req: QuerySubAreaReq): Promise<QhjMgrSubArea[]> {
- return commonSearch_go('/QhjMgr/QuerySubArea', req).catch((err) => {
- throw new Error(`查询子机构列表: ${err}`);
- });
- }
- /**
- * -- 铂金宝 -- 单据查询 -- 成交单
- * 查询成交明细 /QhjMgr/QueryTradeDetail
- * @param req
- */
- export function queryTradeDetail(req: QueryTradeDetailReq): Promise<QhjMgrTradeDetailRsp[]> {
- return commonSearch_go('/QhjMgr/QueryTradeDetail', req).catch((err) => {
- throw new Error(`查询持仓汇总: ${err}`);
- });
- }
- /**
- * -- 铂金宝 -- 单据查询 -- 委托单
- * 查询委托明细 /QhjMgr/QueryTradeOrderDetail
- * @param req
- */
- export function queryTradeOrderDetail(req: QueryTradeOrderDetailReq): Promise<QhjMgrTradeOrderDetailRsp[]> {
- return commonSearch_go('/QhjMgr/QueryTradeOrderDetail', req).catch((err) => {
- throw new Error(`查询持仓汇总: ${err}`);
- });
- }
- /**
- * -- 铂金宝 -- 单据查询 -- 待付端
- * 查询待付款单 /QhjMgr/QueryTradePayOrder
- * @param req
- */
- export function queryTradePayOrder(req: QueryTradePayOrderReq): Promise<QhjMgrTradePayOrder[]> {
- return commonSearch_go('/QhjMgr/QueryTradePayOrder', req).catch((err) => {
- throw new Error(`查询持仓汇总: ${err}`);
- });
- }
- /**
- * -- 铂金宝 -- 单据查询 -- 持仓
- * /QhjMgr/QueryTradePosition
- */
- export function queryTradePosition(req: QueryTradePositionReq): Promise<QhjMgrPosition[]> {
- return commonSearch_go('/QhjMgr/QueryTradePosition', req).catch((err) => {
- throw new Error(`查询持仓汇总: ${err}`);
- });
- }
- /****************** 大连千海金(协议和签约信息)(QhjSys) *********************/
- /**
- * 查询协议配置变更流水
- * /QhjSys/QueryAgreementChangeLog
- */
- export function queryAgreementChangeLog(req: QueryAgreementChangeLogReq): Promise<QhjAgreementChangeLog[]> {
- return commonSearch_go('/QhjSys/QueryAgreementChangeLog', req).catch((err) => {
- throw new Error(`查询协议配置变更流水: ${err}`);
- });
- }
- /**
- * 查询协议配置
- * /QhjSys/QueryAgreementConfig
- */
- export function queryAgreementConfig(req: QueryAgreementConfigReq): Promise<QhjAgreementConfig[]> {
- return commonSearch_go('/QhjSys/QueryAgreementConfig', req).catch((err) => {
- throw new Error(`查询协议配置: ${err}`);
- });
- }
- /**
- * 查询客户协议签约状态
- * /QhjSys/QueryCustomerSignStatus
- */
- export function queryCustomerSignStatus(req: QueryCustomerSignStatusReq): Promise<QhjCustomerSignStatus[]> {
- return commonSearch_go('/QhjSys/QueryCustomerSignStatus', req).catch((err) => {
- throw new Error(`查询客户协议签约状态: ${err}`);
- });
- }
|