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

// 查询电整点数据列表
export function listReportPointIOT(query?: EmsQuery): Promise<EmsListResponse<EmsReportPointIOTVO>> {
  return request({
    url: '/ems/report/reportPointIOT/list',
    method: 'get',
    params: query
  });
}

// 查询电整点数据详细
export function getReportPointIOT(objId: EmsId): Promise<EmsDetailResponse<EmsReportPointIOTVO>> {
  return request({
    url: '/ems/report/reportPointIOT/' + objId,
    method: 'get'
  });
}

// 新增电整点数据
export function addReportPointIOT(data: EmsReportPointIOTVO): Promise<EmsActionResponse<EmsReportPointIOTVO>> {
  return request({
    url: '/ems/report/reportPointIOT',
    method: 'post',
    data: data
  });
}

// 修改电整点数据
export function updateReportPointIOT(data: EmsReportPointIOTVO): Promise<EmsActionResponse<EmsReportPointIOTVO>> {
  return request({
    url: '/ems/report/reportPointIOT',
    method: 'put',
    data: data
  });
}

// 删除电整点数据
export function delReportPointIOT(objId: EmsIdParam): Promise<EmsActionResponse> {
  return request({
    url: '/ems/report/reportPointIOT/' + objId,
    method: 'delete'
  });
}
