/** ================================= 交易主体 ================================**/
import { getUserId } from '@/services/bus/user';
import { commonSearch_go } from '@/services/go';
import { Ermcp3SubjectReq, Ermcp3SubjectRsp } from './interface';

/**
 * 查询交易主体
 */
export function QueryPaAreaSubject(req?: Ermcp3SubjectReq): Promise<Ermcp3SubjectRsp[]> {
    const param: Ermcp3SubjectReq = {
        userid: getUserId()
    }
    if (req) {
        Object.assign(param, req);
    }
    return commonSearch_go('/Ermcp3/QueryPaAreaSubject', param).catch((err) => {
        throw new Error(`查询交易主体: ${err}`);
    });
}
