//巡防排班
import request from "@/utils/request";
const api = "/mosty-api/mosty-qwzx";
// 分页查询
export function getXfpb(params) {
    return request({
        url: api + '/tbQwXfpb',
        method: 'GET',
        params
    })
}
// 查询我的巡防排班
export function getXfpbByUser(params) {
    return request({
        url: api + '/tbQwXfpb/getMyXfpb',
        method: 'GET',
        params
    })
}
//新增
export function addXfpb(data) {
    return request({
        url: api + '/tbQwXfpb',
        method: 'POST',
        data
    })
}
//删除
export function deleteXfpb(id) {
    return request({
        url: api + `/tbQwXfpb/${id}`,
        method: 'delete'
    })
}
//详情
export function getXfpbInfo(id) {
    return request({
        url: api + `/tbQwXfpb/${id}`,
        method: 'GET',
    })
}

// 修改
export function updateXfpb(data) {
    return request({
        url: api + '/tbQwXfpb',
        method: 'put',
        data
    })
}

//根据日期查询巡防排班信息
export function rlpbQuery(params) {
    return request({
        url: api + '/tbQwXfpb/rlpbQuery',
        method: 'GET',
        params
    })
}
//查询本月巡防排班
export function getThisMonthPbList(params) {
    return request({
        url: api + '/tbQwXfpb/getThisMonthPbList',
        method: 'GET',
        params
    })
}
//获取前一天警情数量
export function getJqNum(params) {
    return request({
        url: '/mosty-api/mosty-sjzx/tbJq/getJqCount',
        method: "GET",
        params
    })
}
export function getPbbbByMonth(data) {
	return request({
		url: api + "/tbQwXfpb/getPbbbByMonth",
		method: "GET",
		params: data
	});
};