//值班排班
import request from "@/utils/request";
const api = "/mosty-api/mosty-qwzx";
// 分页查询
export function getQwZb(params) {
    return request({
        url: api + '/tbQwZb',
        method: 'GET',
        params
    })
}
// 查询我的值班记录
export function getQwZbByUser(params) {
    return request({
        url: api + '/tbQwZbpb/getMyZbpb',
        method: 'GET',
        params
    })
}
//新增
export function addQwZb(data) {
    return request({
        url: api + '/tbQwZbpb',
        method: 'POST',
        data
    })
}
//删除
export function deleteQwZb(id) {
    return request({
        url: api + `/tbQwZb/bacth?id=${id}`,
        method: 'delete'
    })
}
//详情
export function getQwZbInfo(id) {
    return request({
        url: api + `/tbQwZb/${id}`,
        method: 'GET',
    })
}

// 修改
export function updateQwZb(data) {
    return request({
        url: api + '/tbQwZb',
        method: 'put',
        data
    })
}
//判断当条数据是否存在
export function judgeQwZb(data) {
    return request({
        url: api + '/tbQwZb/checkPb',
        method: 'POST',
        data
    })
}

//值班排班新增
export function zbPbAdd(data) {
    return request({
        url: api + '/tbQwZbpb',
        method: 'POST',
        data
    })
}
//值班排班新增
export function zbPbLook(params) {
    return request({
        url: api + '/tbQwZbpb',
        method: 'GET',
        params
    })
}

//值班排班 获取详情
export function zbPbDetail(id) {
    return request({
        url: api +  `/tbQwZbpb/${id}`,
        method: 'GET',
    })
}
//值班排班 修改
export function zbPbUpdate(data) {
    return request({
        url: api +  '/tbQwZbpb',
        method: 'PUT',
        data
    })
}
//值班排班 修改
export function zbPbDelete(data) {
    return request({
        url: api +  '/tbQwZbpb',
        method: 'DELETE',
        data
    })
}

//根据日期查询值班排班信息
export function getZbbbByMonth(params) {
    return request({
        url: api + '/tbQwZbpb/getZbbbByMonth',
        method: 'GET',
        params
    })
}
//根据月份导出值班排班表
export function exportData(params) {
    return request({
        url: api + '/tbQwZbpb/exportData',
        method: 'GET',
        params
    })
}
