import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 查询产地监测点列表
 * @param query
 * @returns {*}
 */

export const originCpyList = (query?: any): any => {
    return request({
        url: '/dgtmedicine/originCpy/list',
        method: 'get',
        params: query
    });
};
/**
 * 检测点统计
 * @param query
 * @returns {*}
 */
export const queryOriginCpyCount = (query?: any): any => {
    return request({
        url: '/dgtmedicine/originCpy/queryOriginCpyCount',
        method: 'get',
        params: query
    });
};
/**
 * 添加监测点企业信息
 * @param query
 * @returns {*}
 */
export const listByPage = (query?: any): any => {
    return request({
        url: 'dgtmedicine/originCpy/chooseOriginCpy',
        method: 'get',
        params: query
    });
};
/**
 * 添加监测点
 * @param query
 * @returns {*}
 */
export const addOriginCpy = (query?: any): any => {
    return request({
        url: '/dgtmedicine/originCpy/addOriginCpy',
        method: 'post',
        data: query
    });
};

/**
 * 批量删除检测点
 * @param query
 * @returns {*}
 */
export const deleteOriginCpy = (query?: any): any => {
    return request({
        url: '/dgtmedicine/originCpy/delOriginCpy',
        method: 'post',
        data: query
    });
};
/**
 * 批量修改检测点有效期
 * @param query
 * @returns {*}
 */
export const updateOriginCpy = (query?: any): any => {
    return request({
        url: '/dgtmedicine/originCpy/editValidDate',
        method: 'post',
        data: query
    });
};

/**
 * 获取产地检测点详细信息
 * @param query
 * @returns {*}
 */
export const originCpyInfo = (id?: any): any => {
    return request({
        url: `/dgtmedicine/originCpy/getInfo/${id}`,
        method: 'get'
    });
};
