import { request } from '../../boot/axios';
import { SystemSettingEntity } from './model/systemSetting';
const pathName = 'busController/';

class SystemSettingApi {
  // 获取过账日期
  getPostingDate = () => {
    return request.get(`${pathName}getPostingDate`);
  };
  // 获取系统配置项
  getControllerItem = () => {
    return request.get(`${pathName}getControllerItem`);
  };
  // 修改 配置项
  modifyControllerItem = (val: SystemSettingEntity) => {
    return request.post(`${pathName}modifyControllerItem`, val);
  };
  // SAP库存同步接口 设置为无限请求时间
  sapStockSynchronization = () => {
    return request.get(`${pathName}sapStockSynchronization`, {
      timeout: 0
    });
  };
  // SAP物料同步接口 设置为无限请求时间
  sapMaterialSynchronization = () => {
    return request.get(`${pathName}SapMaterialSynchronization`, {
      timeout: 0
    });
  };
}
const systemSettingApi = new SystemSettingApi();

export { systemSettingApi };
