import request from '@/http/request.js';

/**
 * 评级信息列表获取
 * @returns
 */
export const msdQueryPage = (data) => {
  return request({
    url: 'mds/baseData/queryPage.action',
    method: 'post',
    data,
  });
};

/** 评级目标 */

export const msdQueryComboxData = (data) => {
  return request({
    url: 'mds/baseRcs/queryComboxData.action',
    method: 'post',
    data,
  });
};

/** 交易对手评级 */
export const mdsFindAllCptysi18n = () => {
  return request({
    url: 'mds/sdscounterparty/findAllCptysi18n.action',
    method: 'post',
  });
};

/** 发行人评级 */
export const mdsFindAllIssuerCptysi18n = () => {
  return request({
    url: 'mds/sdscounterparty/findAllIssuerCptysi18n.action',
    method: 'post',
  });
};
/** 债券评级  */
export const mdsFindAllbonds = () => {
  return request({
    url: 'mds/sdsbonds/findAllbonds.action',
    method: 'post',
  });
};
/** 国家评级 */
export const mdsFindAllCountries = () => {
  return request({
    url: 'mds/sdsthirdparty/findAllCountries.action',
    method: 'post',
  });
};
/** 担保人评级 */
export const mdsFindAllGuarantees = () => {
  return request({
    url: 'mds/sdscounterparty/findAllGuarantees.action',
    method: 'post',
  });
};

/** 评级机构 */

export const msdFindRatingAgenciesByContainsTermRating = () => {
  return request({
    url: 'mds/sdsrating/findRatingAgenciesByContainsTermRating.action',
    method: 'post',
  });
};

export const msdFindRatingByAgencyIdAndTerm = (data) => {
  return request({
    url: 'mds/sdsrating/findRatingByAgencyIdAndTerm.action',
    method: 'post',
    data,
  });
};

export const msdHistoryQueryPage = (data) => {
  return request({
    url: 'mds/baseData/queryPage.action?queryParam.moduleName=mdsTargetRatingsHistory',
    method: 'post',
    data,
  });
};

// 数据集查询
export const msdFindAllDataSet = () => {
  return request({
    url: 'mds/mds/findAllDataSet.action',
    method: 'post',
  });
};

// 数据类型
export const msdQueryComboxDataAction = (data) => {
  return request({
    url: `mds/baseRcs/queryComboxData.action?codifierGrpCodes=${data}`,
    method: 'post',
  });
};

// 数据集管理列表
export const msdBaseQueryPage = (data) => {
  return request({
    url: 'mds/baseData/queryPage.action?queryParam.moduleName=mdsDataRicSetService',
    method: 'post',
    data,
  });
};

// 数据源
export const mdsFindAllDataSource = () => {
  return request({
    url: 'mds/mds/findAllDataSource.action',
    method: 'post',
  });
};
