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

// 查询蒸汽实时数据列表
export function listRecordSteamInstant(query?: EmsQuery): Promise<EmsListResponse<EmsRecordSteamInstantVO>> {
  return request({
    url: '/ems/record/recordSteamInstant/list',
    method: 'get',
    params: query
  });
}

// 查询蒸汽实时数据详细
export function getRecordSteamInstant(objId: EmsId): Promise<EmsDetailResponse<EmsRecordSteamInstantVO>> {
  return request({
    url: '/ems/record/recordSteamInstant/' + objId,
    method: 'get'
  });
}

// 新增蒸汽实时数据
export function addRecordSteamInstant(data: EmsRecordSteamInstantVO): Promise<EmsActionResponse<EmsRecordSteamInstantVO>> {
  return request({
    url: '/ems/record/recordSteamInstant',
    method: 'post',
    data: data
  });
}

// 修改蒸汽实时数据
export function updateRecordSteamInstant(data: EmsRecordSteamInstantVO): Promise<EmsActionResponse<EmsRecordSteamInstantVO>> {
  return request({
    url: '/ems/record/recordSteamInstant',
    method: 'put',
    data: data
  });
}

// 删除蒸汽实时数据
export function delRecordSteamInstant(objId: EmsIdParam): Promise<EmsActionResponse> {
  return request({
    url: '/ems/record/recordSteamInstant/' + objId,
    method: 'delete'
  });
}
