import {
    service
} from '../utils/request';

//获取指令列表
export function getZlList(params = {}) {
    return service({
        url: '/mosty-yjzl/tbZl/getMyZlList',
        method: 'get',
        params,
    });
};

//获取指令统计数量
export function getZlTotal(params = {}) {
    return service({
        url: '/mosty-yjzl/tbZl/getMyZlCount',
        method: 'get',
        params,
    });
};

//获取指令处置流程数据
export function getZlczData(params = {}) {
    return service({
        url: '/mosty-yjzl/tbZl/getZxjlList',
        method: 'get',
        params,
    });
};
//获取由我抄送的指令
export const getMyCsList = (params = {}) => {
    return service({
        url: `/mosty-yjzl/tbZl/getMyZlList`,
        method: "get",
        params
    });
};
//获取指令详情
export function getZlDetail(id) {
    return service({
        url: `/mosty-yjzl/tbZl/${id}`,
        method: 'get',
    });
};

//新增指令处置流程
export function addZxjl(data = {}) {
    return service({
        url: `/mosty-yjzl/tbZl/addZxjl`,
        method: 'post',
        data
    });
};

//修改指令状态
export function updateZlStatus(data = {}) {
    return service({
        url: `/mosty-yjzl/tbZl/zlHandle`,
        method: 'post',
        data
    });
};

//指令跳转盘人盘车
export function zlPrPc(data = {}) {
    return service({
        url: `/mosty-yjzl/tbZl/addPcrycl`,
        method: 'post',
        data
    });
};
//保存NFC
export function saveNFC(data = {}) {
    return service({
        url: `/mosty-hczx/tbHcBpcry/saveBpcryNfc`,
        method: 'post',
        data
    });
};




// 指令处置流程（人员管控）
export function zlHandleRygk(data = {}) {
    return service({
        url: `/mosty-yjzl/tbZl/zlHandleRygk`,
        method: 'post',
        data
    });
};

// 获取拓尔思token
export function getToken(params) {
    return service({
        url: `/mosty-base/trs/token/new/getToken`,
        method: 'get',
        params
    });
};

//指令中心--首页指令排行统计信息
export const zlPhTjxx = (data) => {
    return service({
        url: `/mosty-yjzl/tbZlxxtj/zlPhTjxx`,
        method: "get",
        params: data
    });
};

//指令中心--首页指令周期统计信息
export const zlZqtjxx = (data) => {
    return service({
        url: `/mosty-yjzl/tbZlxxtj/zlZqtjxx`,
        method: "get",
        params: data
    });
};
//指令中心--首页指令等级统计信息
export const zlDjtjxx = (data) => {
    return service({
        url: `/mosty-yjzl/tbZlxxtj/zlDjtjxx`,
        method: "get",
        params: data
    });
};
//指令中心类型统计
export const getTjOfZllx = (params = {}) => {
    return service({
        url: `/mosty-yjzl/tbZl/getTjOfZllx`,
        method: "get",
        params
    });
};

//添加指令
export const addZlData = (data = {}) => {
    return service({
        url: `/mosty-yjzl/tbZl/addZl`,
        method: "post",
        data
    });
};
//获取由我发起的指令
export const getMyZlList = (params = {}) => {
    return service({
        url: `/mosty-yjzl/tbZl/getMySendZlList`,
        method: "get",
        params
    });
};