import type { GunSelfCheckModel, GasAdditiveInventory, ScheduleTask, FormTankWaterModel } from './model';

import type { BaseResult } from '#/api/base-result';

import { requestClient } from '#/api/request';

// API路径常量枚举
enum Api {
  // 油枪自检列表
  gunSelfCheckList = '/formGunSelfCheck/check/list',
  // 添加剂库存列表
  gasAdditiveInventoryList = '/gasAdditiveInventory/inventory/list',
  // 待办任务列表
  scheduleTasksList = '/scheduleTasks/tasks/list',
  // 量缸试水列表
  formTankWaterList = '/formTankWater/water/list',
}

/**
 * 查询油枪自检列表
 * @param params 查询参数
 * @returns 油枪自检列表
 */
export function getGunSelfCheckList(params: any) {
  return requestClient.get<BaseResult<GunSelfCheckModel[]>>(Api.gunSelfCheckList, {
    params,
  });
}

/**
 * 查询添加剂库存列表
 * @param params 查询参数
 * @returns 添加剂库存列表
 */
export function getGasAdditiveInventoryList(params: any) {
  return requestClient.get<BaseResult<GasAdditiveInventory[]>>(Api.gasAdditiveInventoryList, {
    params,
  });
}

/**
 * 查询待办任务列表
 * @param params 查询参数
 * @returns 待办任务列表
 */
export function getScheduleTasksList(params: any) {
  return requestClient.get<BaseResult<ScheduleTask[]>>(Api.scheduleTasksList, {
    params,
  });
}

/**
 * 查询量缸试水列表
 * @param params 查询参数
 * @returns 量缸试水列表
 */
export function getFormTankWaterList(params: any) {
  return requestClient.get<BaseResult<FormTankWaterModel[]>>(Api.formTankWaterList, {
    params,
  });
}
