import request from '@/utils/httpRequest'
import { BUSINESS_PATH as prefix } from "../AppPath";

export default class EntryService{
	list (param) {
		return request({
			url: prefix +'/employeeEntry/findList',
			method: 'get',
			params: param
		})
	}

	saveForm (inputForm) {
		return request({
			url: prefix + `/employeeEntry/saveForm`,
			method: 'post',
			data: inputForm
		})
	}

	queryById (id) {
		return request({
			url: prefix +'/employeeEntry/findById',
			method: 'get',
			params: {id: id}
		})
	}

	updateStatusById(data) {
		return request({
			url: prefix + "/employeeEntry/updateStatusById",
			method: "post",
			data: data,
		})
	}
	delete (ids) {
		return request({
			url: prefix+"/employeeEntry/delete",
			method: 'delete',
			params: {id: ids}
		})
	}


	adminEditForm(param){
		return request({
			url: prefix + "/employeeEntry/adminEditForm",
			method: "post",
			data: param,
		})
	}

	exportTemplate() {
		return request({
			url: prefix + "/employeeEntry/import/template",
			method: "get",
			responseType: "blob"
		});
	}

	exportExcel (params) {
		return request({
			url: prefix + "/employeeEntry/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}

	importExcel(data) {
		return request({
			url: prefix + "/employeeEntry/import",
			method: "post",
			data: data,
		});
	}

	queryByApplyId(id){
		return request({
			url: prefix +'/employeeEntry/findByApplyId',
			method: 'get',
			params: {id: id}
		})
	}

	saveApplyForm (inputForm) {
		return request({
			url: prefix + `/employeeEntry/saveApplyForm`,
			method: 'post',
			data: inputForm
		})
	}

	updateStatusByApplyId(data) {
		return request({
			url: prefix + "/employeeEntry/updateStatusByApplyId",
			method: "post",
			data: data,
		})
	}

	getByPhone(mobilePhone){
		return request({
			url: prefix +'/employeeEntry/getByPhone',
			method: 'get',
			params: {mobilePhone: mobilePhone}
		})
	}


}
