import request from '@/utils/request';
import type { EmsActionResponse, EmsDetailResponse, PowerEnergySupervisionChecklistVO, EmsId, EmsIdParam, EmsListResponse, EmsQuery } from '../types';

// 查询动力能源部监督检查清单列表
export function listSupervisionChecklist(query?: EmsQuery): Promise<EmsListResponse<PowerEnergySupervisionChecklistVO>> {
  return request({
    url: '/ems/info/supervisionChecklist/list',
    method: 'get',
    params: query
  });
}

// 查询动力能源部监督检查清单详细
export function getSupervisionChecklist(id: EmsId): Promise<EmsDetailResponse<PowerEnergySupervisionChecklistVO>> {
  return request({
    url: '/ems/info/supervisionChecklist/' + id,
    method: 'get'
  });
}

// 新增动力能源部监督检查清单
export function addSupervisionChecklist(data: PowerEnergySupervisionChecklistVO): Promise<EmsActionResponse<PowerEnergySupervisionChecklistVO>> {
  return request({
    url: '/ems/info/supervisionChecklist',
    method: 'post',
    data: data
  });
}

// 修改动力能源部监督检查清单
export function updateSupervisionChecklist(data: PowerEnergySupervisionChecklistVO): Promise<EmsActionResponse<PowerEnergySupervisionChecklistVO>> {
  return request({
    url: '/ems/info/supervisionChecklist',
    method: 'put',
    data: data
  });
}

// 删除动力能源部监督检查清单
export function delSupervisionChecklist(id: EmsIdParam): Promise<EmsActionResponse> {
  return request({
    url: '/ems/info/supervisionChecklist/' + id,
    method: 'delete'
  });
}
