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


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


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


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


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


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


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


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



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


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


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

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


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


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