import request from '@/utils/request'

// 查询报工报表列表
export function listReportWork(query) {
	return request({
		url: '/mes/reportWork/list',
		method: 'get',
		params: query
	});
}

// 查询报工报表详细
export function getReportWork(id) {
	return request({
		url: '/mes/reportWork/' + id,
		method: 'get'
		});
}

// 新增报工报表
export function addReportWork(data) {
	return request({
		url: '/mes/reportWork',
		method: 'post',
		data: data
	});
}

// 修改报工报表
export function updateReportWork(data) {
	return request({
		url: '/mes/reportWork',
		method: 'put',
		data: data
	});
}

// 删除报工报表
export function delReportWork(id) {
	return request({
		url: '/mes/reportWork/' + id,
		method: 'delete'
	});
}

// 查询工单的工序完成列表
export function getProcessFinishList(query) {
	return request({
		url: '/mes/reportWork/getProcessFinishList',
		method: 'get',
		params: query
	});
}
//成品产量报表
export function getProductionList(query) {
	return request({
		url: '/mes/reportWork/getProductionList',
		method: 'get',
		params: query
	});
}
//成品产量报表
export function getDailyReport(query) {
	return request({
		url: '/mes/reportWork/getDailyReport',
		method: 'get',
		params: query
	});
}

export function getWorkcenterList() {
	return request({
		url: '/mes/reportWork/getWorkcenterList',
		method: 'get'
	});
}

export function getLineChartData() {
	return request({
		url: '/mes/reportWork/getLineChartData',
		method: 'get'
	});
}

