import request from '@/utils/http/index';
// 获取未分派的资产统计
export const getLoanDistribute = (params) => {
  return request.get('/LoanDistribute/totalLoan', params);
};
// 案件管理统计
export const getLoantotal = (params) => {
  return request.get('/LoanDistribute/total', params);
};
// 资产列表
export const getLoanpage = (params) => {
  return request.get('/LoanDistribute/page', params);
};
// 分派到调节中心
export const distributeLoan = (tenantId, data) => {
  return request.post(`/LoanDistribute/distribute?toTenantId=${tenantId}`, data);
};
// 手动调整分派CPE,确认
export const confirm = (data) => {
  return request.post(`/LoanDistribute/confirm`, data);
};
// 系统自动分派; 分派到CPE
export const distributeCpe = (data) => {
  return request.post(`/LoanDistribute/distributeCpe?type=${data.type}`, data);
};
// 手动调整分派CPE
export const changeDistributeCpe = (data) => {
  return request.post(`/LoanDistribute/changeDistributeCpe`, data);
};
// 撤回案件
export const backDistribute = (ids) => {
  return request.get('/LoanDistribute/back', { ids });
};
// 撤案
export const withdraw = (ids) => {
  return request.get('/LoanDistribute/withdraw', { ids });
};
// 撤回案件
export const fullWithdraw = (ids) => {
  return request.get('/LoanDistribute/fullWithdraw', { ids });
};
// 留案
export const stayLoan = (ids) => {
  return request.get('/LoanDistribute/stay', { ids });
};

