import request from '@/utils/request'
//查询收入
export function getIncome(unitNum,date) {
    return request({
      url: '/income/getIncome' +'/'+unitNum+'/'+date,
      method: 'get'
    })
  }

// 上传收入json
export function setIncomeInfo(jsona,userName,unitId,monthId) {
  return request({
    url: '/income/setIncomeInfo/' + userName + '/' + unitId + '/'+monthId,
    method: 'post',
    data:jsona
  })
}

//查询收入提交状态
export function getIncomeUploadStatus(userName,unitId,monthId) {
  return request({
    url: '/income/getIncomeStatus/'+userName + '/' + unitId + '/'+monthId,
    method: 'get'
  })
}

//查询当月收入成本统计
export function getMonthStatics(unitId) {
  return request({
    url: '/income/getMonthStatics/' + unitId,
    method: 'get'
  })
}

//查询范围收入成本统计
export function getMonthsStatics(unitId,fromTo) {
  return request({
    url: '/income/getMonthsStatics/' + unitId + '/'+fromTo,
    method: 'get'
  })
}
//财务管理查询全部部门
export function getAllUnits() {
  return request({
    url: '/finance/getAllUnits',
    method: 'get'
  })
}

//财务管理查询全部部门收入成本情况
export function getFinanceStatics(unitId,fromTo) {
  return request({
    url: '/finance/getFinanceStatics/' + unitId + '/'+fromTo,
    method: 'get'
  })
}

export function getDayFinanceStatics() {
  return request({
    url: '/finance/getDayFinanceStatics/',
    method: 'get'
  })
}
