import request from '@/utils/request'

export function fetchMyTemplates() {
    return request({
        url: '/illegalChargesAnalysis/fetchMyTemplates',
        method: 'get',
    })
}

export function insertNewTemplate(data) {
    return request({
        url: '/illegalChargesAnalysis/insertNewTemplate',
        method: 'post',
        data,
    })
}

export function deleteChosenTemplate(data) {
    return request({
        url: '/illegalChargesAnalysis/deleteTemplate',
        method: 'post',
        data,
    })
}

export function searchChargeItem(data) {
    return request({
        url: '/illegalChargesAnalysis/searchChargeItem',
        method: 'post',
        data,
    })
}

export function saveTemplateChanges(data) {
    return request({
        url: '/illegalChargesAnalysis/saveTemplateChanges',
        method: 'post',
        data,
    })
}

export function analyzeTargetData(data) {
    return request({
        url: '/illegalChargesAnalysis/analyzeTargetData',
        method: 'post',
        data,
    })
}

export function selectOrderPair(orderNo, conflictOrderNo) {
    return request({
        url: '/illegalChargesAnalysis/selectOrderPair',
        method: 'get',
        params: {orderNo, conflictOrderNo}
    })
}

export function queryHuanZheLiangCiRuYuanRiQi(data) {
    return request({
        url: '/illegalChargesAnalysis/queryHuanZheLiangCiRuYuanRiQi',
        method: 'post',
        data,
    })
}

export function chaXunHuanZheZhuYuanJianGe(startTime, endTime, tianShu) {
    return request({
        url: '/illegalChargesAnalysis/chaXunHuanZheZhuYuanJianGe',
        method: 'get',
        params: {startTime, endTime, tianShu}
    })
}
