import request from '@/utils/request'
//查询审批历史
export const getApprovelHistory = (instanceId) => {
    return request({
        url: `/system/check/approval/history/instance/${instanceId}`,
        method: 'get',
    })
}

//根据用户查部门负责人
export const selectDeptLeaderByUserId = (data) => {
    return request({
        url: `/system/user/selectDeptLeaderByUserId`,
        method: 'get',
        data
    })
}

//审批通过
export const approvePass = (taskId,data) => {
    return request({
        url: `/system/approval/approve/${taskId}`,
        method: 'put',
        data
    })
}

//审批驳回
export const approveReject = (taskId,data) => {
    return request({
        url: `/system/approval/reject/${taskId}`,
        method: 'put',
        data
    })
}

//批量审批通过
export const approvePassBatch = (data) => {
    return request({
        url: `/system/approval/approve/list`,
        method: 'put',
        data
    })
}

//批量审批驳回
export const approveRejectBatch = (data) => {
    return request({
        url: `/system/approval/reject/list`,
        method: 'put',
        data
    })
}

//查询审批列表
export const getApproveList = (data) => {
    return request({
        url: `/system/approval/reject/list`,
        method: 'get',
        data
    })
}

//整改审批通过
export const rectifyApprovePass = (data) => {
    return request({
        url: `/check/checkCorrection/approveTaskBatch`,
        method: 'post',
        data
    })
}
//整改审批驳回
export const rectifyApproveReject = (data) => {
    return request({
        url: `/check/checkCorrection/rejectTaskBatch`,
        method: 'post',
        data
    })
}