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 });
};
