import { main, FileApi, dict } from '@/api'
import request from '@/utils/require'

// 提交
export function insertEntitySelective(data) {
	return request({
		url: `${main}/client/workOrder/insertEntitySelective`,
		method: 'post',
		data: data,
	})
}
//查询
export function selectPageByEntity(data) {
	return request({
		url: `${main}/client/workOrder/selectPageByEntity?pageNum=${data.pageNum}&pageSize=${data.pageSize}&pageType=${data.pageType}`,
		method: 'post',
		data: data
	})
}
//详情
export function selectById(data) {
	return request({
		url: `${main}/client/workOrder/selectById/${data.fid}`,
		method: 'get',
		data: data
	})
}
//修改
export function updateByEntitySelective(data) {
	return request({
		url: `${main}/client/workOrder/updateByEntitySelective`,
		method: 'put',
		data: data
	})
}
//获取字典表
export function findYWRYPDictCode(pdictCode) {
	return request({
		url: `${dict}/dataDictionary/findByGroupId/${pdictCode}`,
		method: 'get'
	})
}
//追加问题描述
export function addProblem(data) {
	return request({
		url: `${main}/client/workOrder/add_problem`,
		method: 'post',
		data: data
	})
}
//查询问题描述
export function GetlistProblem(data) {
	return request({
		url: `${main}/client/workOrder/list_problem?fid=${data.fid}`,
		method: 'get'
	})
}
//查看处理过程描述
export function GetlistSolve(data) {
	return request({
		url: `${main}/client/workOrder/list_solve?fid=${data.fid}`,
		method: 'get'
	})
}
///client/workOrder/remove/{fid}
export function removeList(data) {
	return request({
		url: `${main}/client/workOrder/remove/${data.fid}`,
		method: 'delete'
		// data:data
	})
}
//上传查询
export function findByIds(ids) {
	return request({
		url: `${FileApi}/file/findByIds?ids=${ids}`,
		method: 'get'
	})
}