import { stringify } from 'qs';
import { request } from 'umi';
import webpath from '@/utils/webPath';


export async function deleteByPrimaryKeyForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/get?${stringify(params)}`);
}


export async function insertForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForTjNbq(params = {}) {
    return request(`/${webpath.zngfserverpath}/web/api/service/tjnbq/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}