import request from '@/utils/request'

// 查询工位签到记录列表
export function listStationEmpHistory(query) {
	return request({
		url: '/basic/stationEmpHistory/list',
		method: 'get',
		params: query
	})
}

// 高级查询工位签到记录列表
export function advListStationEmpHistory(query) {
	return request({
		url: '/basic/stationEmpHistory/advList',
		method: 'get',
		params: query
	})
}

// 查询工位签到记录详细
export function getStationEmpHistory(id) {
	return request({
		url: '/basic/stationEmpHistory/' + id,
		method: 'get'
	})
}

// 新增工位签到记录(empCode, stationId)
export function addStationEmpHistory(data) {
	return request({
		url: '/basic/stationEmpHistory',
		method: 'post',
		data: data
	})
}

// 新增工位签退记录(签到记录id)
export function handleSignOut(id) {
	return request({
		url: '/basic/stationEmpHistory/' + id,
		method: 'post'
	})
}

// 修改工位签到记录
export function updateStationEmpHistory(data) {
	return request({
		url: '/basic/stationEmpHistory',
		method: 'put',
		data: data
	})
}

// 删除工位签到记录
export function delStationEmpHistory(id) {
	return request({
		url: '/basic/stationEmpHistory/' + id,
		method: 'delete'
	})
}