/*
 * @Author: wrh
 * @Date: 2024-04-07 10:45:54
 * @LastEditors: wrh
 * @LastEditTime: 2024-08-22 09:31:26
 */
import request from '@/utils/request'

// 查询cmc借款申请列表
export function listBorrow(query) {
  return request({
    url: '/oa/borrow/list',
    method: 'get',
    params: query
  })
}

// 查询cmc借款申请详细
export function getBorrow(borrowId) {
  return request({
    url: '/oa/borrow/' + borrowId,
    method: 'get'
  })
}

// 新增cmc借款申请
export function addBorrow(data) {
  return request({
    url: '/oa/borrow',
    method: 'post',
    data: data
  })
}

// 修改cmc借款申请
export function updateBorrow(data) {
  return request({
    url: '/oa/borrow',
    method: 'put',
    data: data
  })
}

// 删除cmc借款申请
export function delBorrow(borrowId) {
  return request({
    url: '/oa/borrow/' + borrowId,
    method: 'delete'
  })
}

// 查询借款统计
export function getBorrowStatistic(query) {
  return request({
    url: '/oa/borrow/statistic',
    method: 'get',
    params: query
  })
}