import axios from 'axios';
// ----------------------列表-----------------------
const pageBillUrl = '/blackSmellyWater/blackSmellyWaterBill/page';
// 添加
const saveSewageBill = function (data) {
    return axios.post("/blackSmellyWater/blackSmellyWaterBill/importBatch",data)
}

// 删除
const removeSewageBill = function (id) {
    return axios.delete(`/blackSmellyWater/blackSmellyWaterBill/${id}`,)
}
// 批量删除
const removeBatchSewageBill = function (ids) {
    return axios.delete("/blackSmellyWater/blackSmellyWaterBill/batch",{data:ids})
}

// 修改
const updateSewageBill = function (data) {
    return axios.put("/blackSmellyWater/blackSmellyWaterBill",data)
}
// 审核
const verifySewageBill = function (data) {
    return axios.put("/blackSmellyWater/blackSmellyWaterBill/verify",data);
}
const getSewageBill = function (id) {
    return axios.get(`/blackSmellyWater/blackSmellyWaterBill/${id}`)
}
// -------------------------数据---------------------
const pageSewageUrl = '/blackSmellyWater/blackSmellyWater/page';
// 添加
const saveSewage = function (data) {
    return axios.post("/blackSmellyWater/blackSmellyWater",data)
}

// 删除
const removeSewage = function (id) {
    return axios.delete(`/blackSmellyWater/blackSmellyWater/${id}`,)
}
// 批量删除
const removeBatchSewage = function (ids) {
    return axios.delete("/blackSmellyWater/blackSmellyWater/batch",{data:ids})
}

// 修改
const updateSewage = function (data) {
        return axios.put("/blackSmellyWater/blackSmellyWater",data)
}

// -------------------------统计---------------------
const pageSewageStatisticUrl = '/blackSmellyWater/blackSmellyWater/statistic';
const statisticSourceUrl = '/blackSmellyWater/blackSmellyWater/statistic/source';
const statisticYearUrl = '/blackSmellyWater/blackSmellyWater/statistic/year';
const getHistoryyears = function () {
    return axios.get("/blackSmellyWater/blackSmellyWater/history-year")
}
const getColumnOptions = function(column){
    return axios.get("/blackSmellyWater/blackSmellyWater/options",{params:{column}})
}

export {
    pageBillUrl,
    saveSewageBill,
    removeSewageBill,
    updateSewageBill,
    removeBatchSewageBill,
    verifySewageBill,
    getSewageBill,
    pageSewageUrl,
    saveSewage,
    removeSewage,
    updateSewage,
    removeBatchSewage,
    pageSewageStatisticUrl,
    getHistoryyears,
    getColumnOptions,
    statisticSourceUrl,
    statisticYearUrl

}
