import {
    service
} from '../utils/request';
const api1 = "/mosty-base"
const api2 = "/mosty-qwzx"
const api3 = "/mosty-jcgl"
const api4 = "/mosty-sjzx"
const api5 = "/mosty-yjzl"
const api6 = '/mosty-hczx'


/**
 * APP获取我的排班信息
 * @param {*} id 
 */
export function getYestoday(params) {
    return service({
        url: api2 + `/tbQwXfbb/getMybbLastBySfzh`,
        method: 'GET',
        params
    })
}

// 
export function getXfllList(data) {
    return service({
        url: api3 + "/tbJcglXfll/getXfllList",
        method: "GET",
        params: data
    });
};

/*
 * 查询警情数据不分页
 *  return promise 实例对象
 */
export function getJqList(data) {
    return service({
        url: api4 + "/tbJq/getList",
        method: "GET",
        params: data
    });
};

// 查询请休假列表
export function getPleaseLeaveList(data) {
    return service({
        url: api2 + "/tbQwQxj",
        method: "GET",
        params: data
    });
};

// 新增请休假
export function addPleaseLeave(data) {
    return service({
        url: api2 + "/tbQwQxj",
        method: "POST",
        data
    });
};

// 查询不巡防申请列表
export function getNoPatrolList(data) {
    return service({
        url: api2 + "/tbQwXfBxfsq",
        method: "GET",
        params: data
    });
};

// 新增不巡防申请
export function addNoPatrol(data) {
    return service({
        url: api2 + "/tbQwXfBxfsq",
        method: "POST",
        data
    });
};

// 通过id查询不巡防申请
export function getNoPatrolById(data) {
    return service({
        url: api2 + "/tbQwXfBxfsq/{id}",
        method: "GET",
        params: data
    });
};

// 编辑不巡防申请
export function editNoPatrol(data) {
    return service({
        url: api2 + "/tbQwXfBxfsq",
        method: "PUT",
        data
    });
};

// 查询人员
export function getUsers(data) {
    return service({
        url: api1 + "/sysUser/selectUserDeptPage",
        method: "POST",
        data
    });
};

// 查询必巡点列表
export function getBxdList(data) {
    return service({
        url: api3 + "/tbJcglBxd/queryList",
        method: "GET",
        params: data
    });
};

// 查询我今天的报备
export function getMybbToday(data) {
    return service({
        url: api2 + "/tbQwXfbb/getMybbToday",
        method: "GET",
        params: data
    });
};

export function getMybbTodayNew(data) {
    return service({
        url: api2 + "/tbQwXfbb/getMybbTodayNew",
        method: "GET",
        params: data
    });
};

// APP获取我的排班信息
export function getMyXfpbToday(data) {
    return service({
        url: api2 + "/tbQwXfpb/getMyXfpbToday",
        method: "GET",
        params: data
    });
};

// 通过ID查询单条数据班次
export function getBcxx(data) {
    return service({
        url: api2 + `/tbQwQwbc/${data}`,
        method: "GET"
    });
};

// 查询快返点详情
export function getKfd(data) {
    return service({
        url: api3 + `/tpJcglKfd/selectByid`,
        method: "GET",
        params: data
    });
};

// 查询巡防区域详情
export function getXfqs(data) {
    return service({
        url: api3 + `/tbJcglXfqy/selectById`,
        method: "GET",
        params: data
    });
};

// 分页查询我的值班排班 /tbQwZbpb/getMyZbpb
export function getMypb(data) {
    return service({
        url: api2 + `/tbQwZbpb/getMyZbpb`,
        method: "GET",
        params: data
    });
};

// 分页查询我的巡防排班 /tbQwXfpb/getMyXfpb
export function getMyxfpb(data) {
    return service({
        url: api2 + `/tbQwXfpb/getMyXfpb`,
        method: "GET",
        params: data
    });
};

// 查询巡防排班详细信息 /tbQwXfpb/{id}
export function getMyxfpbDetail(data) {
    return service({
        url: api2 + `/tbQwXfpb/${data}`,
        method: "GET"
    });
};

// 分页查询报备
export function getBbList(data) {
    return service({
        url: api2 + `/tbQwXfbb`,
        method: "GET",
        params: data
    });
};

// 通过id查询报备
export function getBbListById(data) {
    return service({
        url: api2 + `/tbQwXfbb/${data}`,
        method: "GET"
    });
};

// 查询巡逻方案列表--分页
export function getXlfa(data) {
    return service({
        url: api3 + `/tbJcglXlfa`,
        method: "GET",
        params: data
    });
};

// 预警 预警列表
export function getYjList(data) {
    return service({
        url: api5 + `/yjzx/yjlb`,
        method: "GET",
        params: data
    });
};
//查询犯罪预测列表
export function queryListfzyc(data = {}) {
    return service({
        url: api5 + '/tbFzyc/queryListApp',
        method: "POST",
        data
    })
}
// 开始、结束报备
export function finishReport(data) {
    return service({
        url: api2 + "/tbQwXfbb/startOrEndBb",
        method: "POST",
        data
    });
};

// 查询街面巡组,力量,时长,里程
export function selectDeck1(data) {
    return service({
        url: api2 + `/tbQwXfbb/selectDeck`,
        method: "GET",
        params: data
    });
};

// APP获取今天的指令处置情况
export function selectDeck2(data) {
    return service({
        url: api5 + `/yjzx/getTodayZl`,
        method: "GET",
        params: data
    });
};

// APP地图页人车盘查的统计接口
export function selectDeck3(data) {
    return service({
        url: api6 + `/hczx/getTodayBpcryAndBpccl`,
        method: "post",
        data
    });
};


// 保存被盘查人员信息
export function saveBpcry(data) {
    return service({
        url: api6 + `/tbHcBpcry/saveBpcry`,
        method: "post",
        data
    });
};

// APP_查询人员信息
export function selectRy(data) {
    return service({
        // url: api6 + `/tbHcBpcry/selectRy`,
        url: api6 + `/tbHcBpcry/selectNwRy`,
        method: "post",
        data
    });
};
// APP_人像查询
export function selectRx(data) {
    return service({
        url: api6 + "/tbHcBpcry/getRyListByBase64",
        method: "POST",
        data
    });
}
//APP_查询人员标签
export function selectRybq(data) {
    return service({
        url: api6 + `/tbHcBpcry/getRyBq`,
        method: "GET",
        params: data
    })
}

// APP_查询车辆信息
export function selectCl(data) {
    return service({
        // url: api6 + `/tbHcBpccl/selectCl`,
        url: api6 + `/tbHcBpccl/selectNwCl`,
        method: "post",
        data
    });
};

// 保存被盘查车辆信息
export function saveBpccl(data) {
    return service({
        url: api6 + `/tbHcBpccl/saveBpccl`,
        method: "post",
        data
    });
};

// 查询警情数据分页 
export function getJqInfo(data) {
    return service({
        url: api4 + `/tbJq/getPageList`,
        method: "GET",
        params: data
    });
};

// 新增警情数据 
export function addJq(data) {
    return service({
        url: api4 + "/tbJq",
        method: "POST",
        data
    });
};

// 大屏-查询街面巡组列表,附近警组
export function getNearXz(data) {
    return service({
        url: api2 + `/tbQwXfbb/selectDeckList`,
        method: "GET",
        params: data
    });
};

// 查询字典列表
export function getDictListByCode(data) {
    return service({
        url: api1 + `/sysDict/getSysDictByCode`,
        method: "GET",
        params: data
    });
};

// 查询人员特征标签
export function selectRytzbqList(data) {
    return service({
        url: api6 + `/tbHcRytzbq/selectList`,
        method: "post",
        data
    });
};

//条件查询盘查轨迹
export function getRypcList(data) {
    return service({
        url: api6 + `/tbHcBpcry/getRypcList`,
        method: "post",
        data
    });
};


//条件查询盘查数量统计
export function getRypcCount(data) {
    return service({
        url: api6 + `/tbHcBpcry/getRypcCount`,
        method: "post",
        data
    });
};


//条件查询盘查轨迹
export function getClpcPcList(data) {
    return service({
        url: api6 + `/tbHcBpccl/getClpcList`,
        method: "post",
        data
    });
};

//条件查询盘查数据统计
export function getClpcCount(data) {
    return service({
        url: api6 + `/tbHcBpccl/getClpcCount`,
        method: "post",
        data
    });
};

//条件查询盘查轨迹
export function getClOf2h(data = {}) {
    return service({
        url: api6 + `/tbHcBpccl/getClOf2h`,
        method: "post",
        data
    });
};

//两小时车辆绑定人员
export function getClry2h(data = {}) {
    return service({
        url: api6 + '/tbHcBpcry/getRyOf2h',
        method: "post",
        data
    })
}
//条件查询盘查轨迹
export function getClpcList(data) {
    return service({
        url: api6 + `/tbHcBpccl/selectCarList`,
        method: "get",
        params: data
    });
};

//图片上传
export function upImage(data) {
    return service({
        url: api1 + '/minio/image/upload/id',
        method: 'post',
        data
    })
}

//根据身份证号查询涉疫登记信息
export function getRySydjInfo(data) {
    return service({
        url: api6 + `/tbHcRytzbq/getRySydjInfo`,
        method: 'post',
        data
    })
}

//保存涉疫登记信息
export function saveSydj(data) {
    return service({
        url: api6 + '/tbHcRytzbq/sydjSaveOrEdit',
        method: 'post',
        data
    })
}

//条件查询盘查轨迹
export function getTrsToken(data) {
    return service({
        url: api1 + `/trs/token/new/getCookie`,
        method: "get",
        params: data
    });
};

//舆情列表 
export function getYqList(data) {
    return service({
        url: api1 + '/other/getYqList',
        method: "POST",
        data
    })
}

//我的轨迹列表
export function getWdgj(params) {
    return service({
        url: '/mosty-wzzx/gxga/rywz/getRygjList',
        method: "get",
        params
    })
}
//我的轨迹 地图数据
export function getMApWdgj(params) {
    return service({
        url: '/mosty-wzzx/gxga/rywz/getRywz',
        method: "get",
        params
    })
}
//视频 分片上传
export function bigDataUpload(data) {
    return service({
        url: '/mosty-base/other/bigDataUpload',
        method: "post",
        data
    })
}