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 = (params) => {
  return request.get('/LoanBack/withdraw', params);
};
// 强制撤案
export const fullWithdraw = (params) => {
  return request.get('/LoanBack/fullWithdraw', params);
};
// 回收
export const back = (params) => {
  return request.get('/LoanBack/back', params);
};
// 强制回收
export const fullBack = (params) => {
  return request.get('/LoanBack/fullBack', params);
};
// 留案
export const stayLoan = (params) => {
  return request.get('/LoanDistribute/stay', params);
};
// 根据调节中心获取不同角色用户
export const getTenantUsers = (params) => {
  return request.get('/tenant/getTenantUsers', params);
};
// 获取回收的资产统计
export const getLoanBack = (params) => {
  return request.get('/LoanBack/totalLoan', params);
};
// 案件管理统计
export const getLoanBacktotal = (params) => {
  return request.get('/LoanBack/total', params);
};
// 资产列表
export const getLoanBackpage = (params) => {
  return request.get('/LoanBack/page', params);
};