import request from '@/config/axios';
import type { TableData } from './types';

/** 获取表格数据 */
export const getKyjyStatisticsListApi = (data: any) => {
  return request.postJson({ url: '/KyjyStatistics/spi/KyjyStatistics/KyjyStatistics/KyjyStatisticsQueryPage', data });
};


/** 删除 */
export const delKyjyStatisticsApi = (): Promise<IResponse> => {
  return request.postJson({ url: '/KyjyStatistics/spi/KyjyStatistics/KyjyStatistics/KyjyStatisticsDelete', data: {  } });
};

/** 保存 */
export const saveKyjyStatisticsApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.postJson({ url: '/KyjyStatistics/spi/KyjyStatistics/KyjyStatistics/KyjyStatisticsSave', data });
};

/** 查询单条数据 */
export const queryKyjyStatisticsApi = (): Promise<IResponse> => {
  return request.postJson({ url: '/KyjyStatistics/spi/KyjyStatistics/KyjyStatistics/KyjyStatisticsQueryOne', data: {  } });
};

/** 同步导入 */
export const importExcelApiUrl = '/KyjyStatistics/sui/KyjyStatistics/KyjyStatistics/KyjyStatisticsImportExcel';

/** 异步导入 */
export const importExcelAsyncApiUrl = '/KyjyStatistics/sui/KyjyStatistics/KyjyStatistics/KyjyStatisticsImportAsyncExcel';

/** 导出 */
export const exportExcelApi = (params: any) => {
  return request.doExport({ url: '/KyjyStatistics/sdi/KyjyStatistics/KyjyStatistics/KyjyStatisticsExportXls', params });
};

/** 获取某个字典 */
export const getCsckCheckType = ({ paramName, systemCode }): Promise<IResponse> => {
  return request.postJson({
    url: '/param/spi/param/systemparam',
    data: {
      paramName: paramName,
      systemCode: systemCode,
    },
  });
};

