/*
 * @Author: ysh
 * @Date: 2024-06-21 18:51:09
 * @LastEditors: wrh
 * @LastEditTime: 2025-07-17 10:09:46
 */
import request from '@/utils/request'

// 查询cmc合同评审列表
export function listContract(query) {
  return request({
    url: '/oa/contract/list',
    method: 'get',
    params: query
  })
}

// 模糊查询cmc合同评审列表
export function listContractFuzzy(query) {
  return request({
    url: '/oa/contract/listFuzzy',
    method: 'get',
    params: query
  })
}

// 查询cmc合同评审详细
export function getContract(contractId) {
  return request({
    url: '/oa/contract/' + contractId,
    method: 'get'
  })
}

// 新增cmc合同评审
export function addContract(data) {
  return request({
    url: '/oa/contract',
    method: 'post',
    data: data
  })
}

// 修改cmc合同评审
export function updateContract(data) {
  return request({
    url: '/oa/contract',
    method: 'put',
    data: data
  })
}

// 删除cmc合同评审
export function delContract(contractId) {
  return request({
    url: '/oa/contract/' + contractId,
    method: 'delete'
  })
}
// 合同统计
export function getContractStatistic(query) {
  return request({
    url: '/oa/contract/statistic',
    method: 'get',
    params: query
  })
}

// 合同统计
export function getContractStatisticById(contractId) {
  return request({
    url: '/oa/contract/statistic/' + contractId,
    method: 'get',
  })
}

// 合同排序
export function getContractStatisticSortByField(query) {
  return request({
    url: '/oa/contract/sort',
    method: 'get',
    params: query
  })
}