
import request from '@/config/axios'

export interface SOPVo {
  id: number,
  sopId: number,
  groupId: number,
  pointId: number,
  prePointId: number,
  remark: string,
}

export interface PageParam {
  pageNo: number
  pageSize: number
}

// 查询SopPoint列表
export const getSopPointsPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/sop-points/getSopPointsPage', params })
}
// 查询SopPointlist
export const getSopPointsList = async (params: PageParam) => {
  return await request.get({ url: '/iscs/sop-points/getSopPointsList', params })
}
// 获取SopPoint详细信息
export const selectSopPointsById = async (id: number) => {
  return await request.get({ url: '/iscs/sop-points/selectSopPointsById', params: { id: id } })
}


// 新增SopPoint
export const insertSopPoints = async (data: SOPVo) => {
  return await request.post({ url: '/iscs/sop-points/insertSopPoints', data })
}

// 修改SopPoint
export const updateSopPoints= async (data: SOPVo) => {
  return await request.put({ url: '/iscs/sop-points/updateSopPoints', data })
}

// 删除SopPoint
export const deleteSopPointsList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/sop-points/deleteSopPointsList?ids='+ids,
  })
}
