import { WeaTools } from "ecCom";
import { postExportFetch, postFetch } from "../util/request";

//通用字典表 {enumClass:""}
export const commonEnumList = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/common/enum/list", "GET", params);
};

export const sysinfo = params => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/info", "GET", params);
};

export const sysOrderRule = params => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/orderRule", "GET", params);
};

//保存排序规则
export const updateOrderRule = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/updateOrderRule", params);
};

//导入规则详情信息
export const sysConfCodeRule = params => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code", "GET", params);
};
//保存导入规则
export const saveMatchEmployeeModeRule = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/saveMatchEmployeeModeRule", params);
};
//应用配置查询
export const queryAppsetting = (params) => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/app/setting", "GET", params);
};
//加密配置保存
export const saveEncryptSetting = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/app/setting/saveEncryptSetting", params);
};
//加密配置保存
export const appSettingSave = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/app/setting/save", params);
};
//获取加密进度条
export const getEncryptProgress = params => {
  return WeaTools.callApi("/api/bs/hrmsalary/sys/app/getEncryptProgress", "GET", params);
};
//保存报税规则
export const operateTaxDeclarationFunction = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/operateTaxDeclarationFunction", params);
};
//保存档案删除规则
export const saveArchiveDelete = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/saveArchiveDelete", params);
};
//保存系统规则开关
export const saveSysOperate = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/operate", params);
};
//保存个税申报撤回规则
export const saveWithDrawTaxDeclaration = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/saveWithDrawTaxDeclaration", params);
};
//保存匹配规则
export const saveSalaryAcctEmployeeRule = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/saveSalaryAcctEmployeeRule", params);
};
//保存薪酬统计报表
export const reportStatisticsReportSave = (params) => {
  return postFetch("/api/bs/hrmsalary/report/statistics/report/save", params);
};
//薪酬统计维度下拉列表
export const reportGetForm = params => {
  return WeaTools.callApi("/api/bs/hrmsalary/report/statistics/report/getForm", "GET", params);
};
//工资单反馈
export const saveSalarySendFeedback = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/saveSalarySendFeedback", params);
};
// 数据分析列表导出
export const exportDataReport = (params) => {
  return postExportFetch("/api/bs/hrmsalary/report/statistics/report/exportData", params);
};
//迁入配置
export const uploadConfig = (params) => {
  return postFetch("/api/bs/hrmsalary/sys/uploadConfig", params);
};
//迁入配置
export const downloadConfig = (params) => {
  return postExportFetch("/api/bs/hrmsalary/sys/downloadConfig", params);
};
