/*
 *    Copyright (c) 2018-2025, cyweb All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 */

import request from '/@/utils/request';

/**
 * 获取列表
 * @param query
 */
export const fetchList = (query?: any) => {
	return request({
		url: '/professional/teachersalary/page',
		method: 'get',
		params: query,
	});
};

/**
 * 新增
 * @param obj
 */
export const addObj = (obj: any) => {
	return request({
		url: '/professional/teachersalary',
		method: 'post',
		data: obj,
	});
};

/**
 * 获取详情
 * @param id
 */
export const getObj = (id: string | number) => {
	return request({
		url: `/professional/teachersalary/${id}`,
		method: 'get',
	});
};

/**
 * 查询用户信息
 * @param obj
 */
export const queryUserInfo = (obj: any) => {
	return request({
		url: '/professional/teachersalary/queryUserInfo',
		method: 'post',
		data: obj,
	});
};

/**
 * 设置可搜索
 * @param obj
 */
export const setCanSearch = (obj: any) => {
	return request({
		url: '/professional/teachersalary/setCanSearch',
		method: 'post',
		data: obj,
	});
};

/**
 * 清空培训池
 * @param obj
 */
export const clearTrainPool = (obj: any) => {
	return request({
		url: '/professional/teachersalary/clearTrainPool',
		method: 'post',
		data: obj,
	});
};

/**
 * 更新单个薪资
 * @param obj
 */
export const updateSingleSalary = (obj: any) => {
	return request({
		url: '/professional/teachersalary/updateSingleSalary',
		method: 'post',
		data: obj,
	});
};

/**
 * 批量删除
 * @param obj
 */
export const delBatch = (obj: any) => {
	return request({
		url: '/professional/teachersalary/delBatch',
		method: 'post',
		data: obj,
	});
};

/**
 * 计算薪资金额
 * @param obj
 */
export const countSalaryMoney = (obj: any) => {
	return request({
		url: '/professional/teachersalary/countSalaryMoney',
		method: 'post',
		data: obj,
	});
};

/**
 * 导出培训池
 * @param obj
 */
export const exportTrainPool = (obj: any) => {
	return request({
		url: '/professional/teachersalary/exportTrainPool',
		method: 'post',
		data: obj,
	});
};

/**
 * 删除
 * @param id
 */
export const delObj = (id: string | number) => {
	return request({
		url: `/professional/teachersalary/${id}`,
		method: 'delete',
	});
};

/**
 * 更新
 * @param obj
 */
export const putObj = (obj: any) => {
	return request({
		url: '/professional/teachersalary',
		method: 'put',
		data: obj,
	});
};

/**
 * 重新生成数据
 */
export const remakeData = () => {
	return request({
		url: '/professional/teachersalary/remakeData',
		method: 'get',
	});
};

/**
 * 检查权限
 */
export const checkAuth = () => {
	return request({
		url: '/professional/teachersalary/checkAuth',
		method: 'get',
	});
};

/**
 * 查询扩展薪资信息
 * @param obj
 */
export const queryExtendSalaryInfo = (obj: any) => {
	return request({
		url: '/professional/teachersalary/queryExtendSalaryInfo',
		method: 'post',
		data: obj,
	});
};

