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

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

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

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

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

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