import { DicChkplatCell } from '@/types'
import request from '@/until/request'

/**
 * 获取工位列表
 * @param platId string
 */
const QueryWorkStationList = (platId: string) =>
    request({
        url: '/DicChkplatCellAction/list/' + platId,
        method: 'get'
    })

/**
* 新增工位
* @param data DicChkplatCell
*/
const AddWorkStation = (data: DicChkplatCell) =>
    request({
        url: '/DicChkplatCellAction/saveDicChkplatCell',
        method: 'post',
        data: data
    })

/**
* 编辑工位
* @param data DicChkplatCell
*/
const EditWorkStation = (data: DicChkplatCell) =>
    request({
        url: '/DicChkplatCellAction/updateDicChkplatCell',
        method: 'post',
        data: data
    })

/**
* 删除工位
* @param  id number
*/
const DeleteWorkStation = (id: number) =>
    request({
        url: '/DicChkplatCellAction/deleteDicChkplatCell/' + id,
        method: 'get',
    })

export default {
    QueryWorkStationList,
    AddWorkStation,
    EditWorkStation,
    DeleteWorkStation
}