
import request from '@/config/axios'

export interface jobVO {
  id: number,
  ticketId: number,
  groupId: number,
  pointId: number,
  pointStatus: number,
  lockId: number,
  lockedByKeyId: number,
  unlockedByKeyId: number,
  lockTime: string,
  unlockTime: string,
  prePointId: number,
  remark: string,
  workstationId: number,
  machineryId: number
}

export interface PageParam {
  pageNo: number
  pageSize: number
}

// 查询Job点位列表
export const getJobTicketPointsPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/job-ticket-points/getJobTicketPointsPage', params })
}

// 获取Job点位详细信息
export const selectJobTicketPointsById = async (id: number) => {
  return await request.get({ url: '/iscs/job-ticket-points/selectJobTicketPointsById', params: { id: id } })
}

// 新增Job 点位
export const insertJobTicketPoints = async (data: jobVO) => {
  return await request.post({ url: '/iscs/job-ticket-points/insertJobTicketPoints', data })
}
// 修改Job点位
export const updateJobTicketPoints = async (data: jobVO) => {
  return await request.put({ url: '/iscs/job-ticket-points/updateJobTicketPoints', data })
}

// 删除Job点位
export const deleteJobTicketPointsList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/job-ticket-points/deleteJobTicketPointsList?ids='+ids,
  })
}
