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

//根据code码查询数据字典
export function dictionaryFun(groupId) {
	return request({
		url: `${dict}/dataDictionary/findByGroupId/${groupId}`,
		method: 'get'
	})
}
//省级承储资格管理列表
export function getZgManager(data, limit) {
	return request({
		url: `${qualification}/qyzgZg/provinceFindByPage/${limit.page}/${limit.size}`,
		method: 'post',
		data: data
	})
}
//撤销企业资格信息
export function undoZg(data) {
	return request({
		url: `${qualification}/qyzgZg/cancelQualification`,
		method: 'post',
		data: data
	})
}
//承储资格申请统计列表
export function getZgStatistics(data, limit) {
	return request({
		url: `${qualification}/qyzgZgsq/findByPage/${limit.page}/${limit.size}`,
		method: 'post',
		data: data
	})
}
//根据id查询资格申请详情
export function getZgDetail(id) {
	return request({
		url: `${qualification}/qyzgZgsq/findById/${id}`,
		method: 'get'
	})
}
//根据流程ID查询详情(待办任务办理页面)
export function getLcDetail(lcslId) {
	return request({
		url: `${qualification}/qyzgZgsq/findByLcslId/${lcslId}`,
		method: 'get'
	})
}
//根据id查询省级承储资格管理列表详情
export function getManagerDetail(id) {
	return request({
		url: `${qualification}/qyzgZg/findById/${id}`,
		method: 'get'
	})
}

//根据流程ID生成流图
export function getLcImg(lcslId) {
	return request({
		url: `${qualification}/flowAble/findByLcslImage/${lcslId}`,
		method: 'get'
	})
}
//获取已办任务审核记录
export function findByAlreadyDone(taskId, procInstId) {
	return request({
		url: `${qualification}/flowAble/findByAlreadyDone/${taskId}/${procInstId}`,
		method: 'get'
	})
}
//根据流程id查看审核记录
export function findSpRecord(procInstId) {
	return request({
		url: `${qualification}/flowAble/findByProcessInfo/${procInstId}`,
		method: 'get'
	})
}
//根据流程id查看审核记录
export function shenhe(data) {
	return request({
		url: `${qualification}/qyzgZgsq/complete?fjid=${data.fjid}&taskName=${data.taskName}&taskId=${data.taskId}`,
		method: 'post',
		data: data
	})
}
//获取待办任务审核记录及返回的流程用按钮
// export function findByFormKeyByTaskId(taskId,procInstId) {
//   return request({
//     url:`${qualification}/flowAble/findByFormKeyByTaskId/${taskId}/${procInstId}`,
//     method: 'get'
//   })
// }
//工作流审批--点击通过，驳回等按钮
// export function startExamine(data) {
//   return request({
//     url: `${qualification}/flowAble/startExamine`,
//     method: 'post',
//     data: data
//   })
// }
//承储资格申请时，待办任务更新证书编号用
// export function upDateDb(data) {
//   return request({
//     url: `${qualification}/qyzgZgsq/updateZgsq`,
//     method: 'post',
//     data: data
//   })
// }
