import request from '@/http/request.js';
import {
  callGetFile,
} from '@/http/api.call';
// 使用示例： const res = await this.$apis.pubQueryComboxData(data)

// 交易簿记/ 现金流预览
export const getdcsPreviewCashflows = (data) => {
  return request({
    url: 'dcs/flow/previewCashflows.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 新增获取id
export const getdcsDealNo = (data) => {
  return request({
    url: 'dcs/dcs/getDealNo.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 操作风险
export const getdcsdealActionFlow = (data) => {
  return request({
    url: 'dcs/flow/dealActionFlow.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 快速查询列表
export const getdealQueryqueryPage = (data) => {
  return request({
    url: 'dcs/dcs/dealQuery/queryPage.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 现金流 现金流
export const getdcsQueryCashFlowList = (data) => {
  return request({
    url: 'dcs/dcs/queryCashFlow.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 现金流 定盘
export const getdcsQueryObserveList = (data) => {
  return request({
    url: 'dcs/dcs/dealQuery/queryObserveList.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 提交
export const handledcsdealActionFlow = (data) => {
  return request({
    url: 'dcs/flow/dealActionFlow.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 是否节假日
export const getdcsisHolidayByUnderlying = (data) => {
  return request({
    url: 'dcs/dcs/isHolidayByUnderlying.action',
    method: 'post',
    data,
  });
};

// 交易簿记/ 按钮权限
export const getdcsdoGetFolderAuth = (data) => {
  return request({
    url: 'dcs/dcs/doGetFolderAuth.action',
    method: 'post',
    data,
  });
};

// 交易簿记/账户信息
export const getDCSqueryCptyName = (data) => {
  return request({
    url: 'dcs/dcs/queryCptyName.action',
    method: 'post',
    data,
  });
};
// 交易簿记/交易对手
export const getDCSqueryFolderById = (data) => {
  return request({
    url: 'dcs/dcs/queryFolderById.action',
    method: 'post',
    data,
  });
};

// 交易簿记
export const getDCSdoEvaluation = (data) => {
  return request({
    url: 'dcs/dcs/doEvaluation.action',
    method: 'post',
    data,
  });
};

// 交易簿记
export const getDCSgetSystemDate = (data) => {
  return request({
    url: 'dcs/dcs/getSystemDate.action',
    method: 'post',
    data,
  });
};

// 交易簿记
export const querySettle = (data) => {
  return request({
    url: 'settle6-web/query_settle.action',
    method: 'post',
    data,
  });
};
// 交易簿记
export const getdealQueryQueryList = (data) => {
  return request({
    url: 'dcs/dcs/dealQuery/queryList.action',
    method: 'post',
    data,
  });
};
// 交易簿记
export const getDcsOptions = (data) => {
  return request({
    url: 'dcs/dcs/queryComboxData.action',
    method: 'post',
    data,
  });
};
// 交易簿记 获取即期汇率
export const getdcsPairInfo = (data) => {
  return request({
    url: 'dcs/dcs/getPairInfo.action',
    method: 'post',
    data,
  });
};
// 交易簿记 获取起息日
export const getdcsValueDate = (data) => {
  return request({
    url: 'dcs/dcs/getValueDate.action',
    method: 'post',
    data,
  });
};

// 参数审批-统计接口
export const getParamsStaList = (data) => {
  return request({
    url: 'eflow/flow/doQueryNumber.action',
    method: 'post',
    data,
  });
};
// 参数审批-待处理接口
export const getParamsList = (data) => {
  return request({
    url: 'eflow/flow/doQueryPageWaiting.action',
    method: 'post',
    data,
  });
};
// 参数审批-已处理接口
export const getFinishList = (data) => {
  return request({
    url: 'eflow/flow/doQueryPageFinish.action',
    method: 'post',
    data,
  });
};
// 参数审批-已拒绝接口
export const getRefuseList = (data) => {
  return request({
    url: 'eflow/flow/doQueryPageRefuse.action',
    method: 'post',
    data,
  });
};
// 参数审批-我发起接口
export const getInitiateList = (data) => {
  return request({
    url: 'eflow/flow/doQueryPageMine.action',
    method: 'post',
    data,
  });
};

// 参数审批-批量审核
export const batchCheck = (data) => {
  return request({
    url: 'eflow/flow/approveBatch.action',
    method: 'post',
    data,
  });
};
// 参数审批-审批状态字典
export const getApproveData = (data) => {
  return request({
    url: 'eflow/flow/queryComboxData.action',
    method: 'post',
    data,
  });
};
// 参数审批-获取流程操作按钮
export const getUserFlowOperations = (data) => {
  return request({
    url: 'eflow/flow/getUserFlowOperations.action',
    method: 'post',
    data,
  });
};
// 参数审批-获取审批流程日志
export const getFlowLogBySerialNoRepeat = (data) => {
  return request({
    url: 'eflow/flow/getFlowLogBySerialNoRepeat.action',
    method: 'post',
    data,
  });
};

// 参数审批-获取变更数据
export const getFlowCompareData = (data) => {
  return request({
    url: 'pub/pub/eflowCompareData.action', // ?dealNo=174194761864137
    method: 'post',
    data,
  });
};
// 参数审批-退回发起下拉获取
export const getBackList = (data) => {
  return request({
    url: 'eflow/flow/queryComboxData.action',
    method: 'post',
    data,
  });
};
// 参数审批-退回发起提交
export const backSubmit = (data) => {
  return request({
    url: 'eflow/flow/approve.action',
    method: 'post',
    data,
  });
};
// 存续期事件管理 列表查询
export const getEventList = (data) => {
  return request({
    url: 'dcs/dcs/queryPage.action',
    method: 'post',
    data,
  });
};
// 存续期事件管理 撤销
export const batchRevoke = (data) => {
  return request({
    url: '',
    method: 'post',
    data,
  });
};
// 发送异常管理 补发
export const batchSendAgain = (data) => {
  return request({
    url: 'dcs/pub/sendExceptionReissue.action',
    method: 'post',
    data,
  });
};
// 发送异常管理 报文内容保存
export const messageSave = (data) => {
  return request({
    url: 'dcs/dcs/doUpdate.action',
    method: 'post',
    data,
  });
};
// queryParam.moduleName:"pubSendExceptionManager","queryParam.domain":"{"id":"20250327_1df210eb-a865-4a6b-accf-8db487d2508c","messageContent":{}}
// 获取数据源-通用
export const queryComboxData = (data) => {
  return request({
    url: 'dcs/dcs/queryComboxData.action',
    method: 'post',
    data: data,
  });
};
// 获取数据源-债券检索
export const queryBondList = (data) => {
  return request({
    url: 'dcs/dcs/queryBondList.action',
    method: 'post',
    data: data,
  });
};
// 获取数据源-交易对手
export const queryCptyPage = (data) => {
  return request({
    url: 'dcs/dcs/queryCptyPage.action',
    method: 'post',
    data: data,
  });
};
// 获取数据源-账户/账户组
export const queryFolderQueryAuthList = (data) => {
  return request({
    url: 'dcs/dcs/queryFolderQueryAuthList.action',
    method: 'post',
    data: data,
  });
};

// 自定义交易查询接口
export const dcsQueryPage = (data) => {
  return request({
    url: 'dcs/dcs/queryPage.action',
    method: 'post',
    data: data,
  });
};
// 自定义交易查询结果-产品表头
export const queryFieldByProduct = (data) => {
  return request({
    url: 'dcs/dcs/queryFieldByProduct.action',
    method: 'post',
    data: data,
  });
};
// 自定义交易查询-获取自定义查询组合
export const queryList = (data) => {
  return request({
    url: 'dcs/dcs/queryList.action',
    method: 'post',
    data: data,
  });
};
//
export const pubqueryList = (data) => {
  return request({
    url: 'pub/pub/queryList.action',
    method: 'post',
    data: data,
  });
};
// 自定义交易查询-保存自定义查询组合
export const doSave = (data) => {
  return request({
    url: 'dcs/dcs/doSave.action',
    method: 'post',
    data: data,
  });
};
// 自定义交易查询-删除自定义查询组合
export const doDelete = (data) => {
  return request({
    url: 'dcs/dcs/doDelete.action',
    method: 'post',
    data: data,
  });
};
// 自定义交易查询结果-账户详情
export const getFolderInfo = (data) => {
  return request({
    url: 'dcs/dcs/getFolderInfo.action',
    method: 'post',
    data: data,
  });
};

// 导出
export const exportData = (data) => {
  return request({
    url: 'dcs/baseQuery/exportAll.action',
    method: 'post',
    // headers: { 'Content-Type': 'multipart/form-data' },
    data,
  });
};

// 下载模板
export const downLoadTemplate = callGetFile('pub/baseData/downloadTemplate.action');
// export const downLoadTemplate = (data) => {
//   return axios.request({
//     url: 'pub/baseData/downloadTemplate.action',
//     method: 'get',
//     data,
//   });
// };

// 导入校验
export const importCheck = (data) => {
  return request({
    url: 'pub/baseData/importCheck.action',
    method: 'post',
    // headers: { 'Content-Type': 'multipart/form-data' },
    data,
  });
};
// 确认导入
export const importData = (data) => {
  return request({
    url: 'pub/baseData/importData.action',
    method: 'post',
    data,
  });
};

// 查询导入结果
export const getProcess = (data) => {
  return request({
    url: 'pub/baseData/queryResult.action',
    method: 'post',
    data,
  });
};

export const getPosOptions = (data) => {
  return request({
    url: 'pos/pos/queryComboxData.action',
    method: 'post',
    data,
  });
};
// 外汇账户明细字典
export const getForList = (data) => {
  return request({
    url: 'dcs/dcs/queryComboxData.action?codifierGrpCodes=static_currencies,FolderStatus,AccountingSection,HomeType',
    method: 'get',
    data,
  });
};
// 自定义交易查询结果-账户详情
export const queryDealOperateLog = (data) => {
  return request({
    url: 'dcs/dcs/queryDealOperateLog.action',
    method: 'post',
    data: data,
  });
};

// 交易模块查询历史版本
export const getCompareVersionLog = (data) => {
  return request({
    url: 'dcs/getCompareVersionLog.action',
    method: 'get',
    data,
  });
};

// 公共模块查询历史版本详细信息
export const compareVersionLog = (data) => {
  return request({
    url: 'dcs/compareVersionLog.action',
    method: 'post',
    data,
  });
};

// 获取历史版本版本号列表
export const versionsLogCombox = (data) => {
  return request({
    url: 'dcs/versionsLogCombox.action',
    method: 'post',
    data,
  });
};

// 获取历史头寸配置
export const getOneQueryComponent = (data) => {
  return request({
    url: 'pos/pub/getOneQueryComponent.action',
    method: 'post',
    data,
  });
};

// 获取登录账户
export const getUserInfo = (data) => {
  return request({
    url: 'pos/pos/getUserInfo.action',
    method: 'post',
    data,
  });
};

// 获取登录用户信息
export const findPreferenceDtoByUserIdAndType = (data) => {
  return request({
    url: 'pos/pos/findPreferenceDtoByUserIdAndType.action',
    method: 'post',
    data,
  });
};
// 历史头寸获取时间
export const getPosSystemDate = (data) => {
  return request({
    url: 'pos/baseRcs/getSystemDate.action',
    method: 'post',
    data,
  });
};

// 交易主要信息
export const getQueryMainInfo = (data) => {
  return request({
    url: 'dcs/dcs/queryMainInfo.action',
    method: 'post',
    data,
  });
};

// 交易派生信息
export const getQueryDeriveInfo = (data) => {
  return request({
    url: 'dcs/dcs/queryDeriveInfo.action',
    method: 'post',
    data,
  });
};

// 交易审批信息
export const getQueryAuditInfo = (data) => {
  return request({
    url: 'dcs/dcs/queryAuditInfo.action',
    method: 'post',
    data,
  });
};

// 交易收据模板
export const queryDealReceipt = (data) => {
  return request({
    url: 'dcs/dcs/queryDealReceipt.action',
    method: 'post',
    data,
  });
};

// 交易跟踪记录
export const queryDealTrace = (data) => {
  return request({
    url: 'dcs/dcs/queryDealTrace.action',
    method: 'post',
    data,
  });
};

// 交易收据数据
export const queryDealQueryList = (data) => {
  return request({
    url: 'dcs/dcs/dealQuery/queryList.action',
    method: 'post',
    data,
  });
};
